On Sat, 7 May 2016 08:37:22 +0000 in <0F7D3B1B3C4B894D824F5B822E3E5A172CEEFECE@IRSMSX102.ger.corp.intel.com>, "Soegtrop, Michael" wrote: > Dear Jérôme, > > it is easy to detect with preprocessor defines if O_ASYNC is > supported or not on the C level. I wondered what would be the most > appropriate way to inform OCaml of the situation. I guess I should > just call caml_failwith("O_ASYNC not supported by Cygwin") in the > async function on cygwin? So you want to catch the system call specificities at runtime inside OCaml ? Not sure it's a good idea to maintain a list of supported features, std functions flags, etc. linked to uname -o output inside OCaml. Most FOSS software simply compile out code not supported by system X and rely on error handling in the underlying layer and propagate the error number, message in the upper layer. > Maybe a "not supported" standard exception > would be a nice thing to handle system dependencies. Maybe I fail to understand what you want to achieve, Cygwin do not report an error that OCaml propagate if you use an unsupported flag with open() ? Regards, -- Jérôme Benoit aka fraggle Piment Noir - http://piment-noir.org OpenPGP Key ID : 9FE9161D Key fingerprint : 9CA4 0249 AF57 A35B 34B3 AC15 FAA0 CB50 9FE9 161D