reflecting differences between Linux and Cygwin in basis library
Henry Cejtin
henry@sourcelight.com
Sun, 24 Feb 2002 18:38:22 -0600
In general, especially where POSIX takes a stand, I think that the right
thing to do is to have almost all of MLton use the POSIX stand, and to then
implement that on non-compilant systems in extra files. I did that a lot
with Scheme-48 and it was very nice.
In the specific example you give, I would provide a Cygwin .h file which
defines the constant and a new C routine which checks for the new bogus value
and raises an exception. In Scheme-48, when I could not name the added C
functions what I wanted to, because I needed access to the native routine of
the same name to implement the `correct' functionality, I used #define's.
I.e., I would add
#define real-posix-name real-posix-name-with-zulu-suffix
then in the C code to implement the work-around, I would initially do
#undef real-posix-name
This was some-what gross, but the point was that only broken systems needed
to look at the grossness. On correctly functioning systems, the #define was
not used and everything worked as documented by POSIX.
I would definitely not go the intersection route in general.