On Fri, 6 May 2016 10:33:32 -0400 in , Yaron Minsky wrote: > Looping in the Core mailing list, since this seems like a > core-specific issue. > > I already have a convenient script to setup cygwin with all modules > > and to compile opam and it works fine. Just when compiling core, > > there are two Unix features not implemented in cygwin. One is > > O_ASYNC. It is easy to patch it away and also easy to make this > > system dependent in the C file (unix_stubs.c), but I wonder how I > > could handle this in a portable way in the OCaml wrapper. It looks > > like this: > > Most people that need to make portable code handle flag dependencies on open() - or other flags on standard functions - in the buildsystem with a little piece of C code that open() a file created by the buildsystem with different flags and catch the return code : #include #include #include ... int retasync = open(/path/to/test/file, O_ASYNC); ... then define a boolean inside the buildsystem to make conditional compilation based on the boolean. Cheers. -- 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