[MLton] Re: [MLton-commit] r4510

Ville Laurikari ville@laurikari.net
Wed, 10 May 2006 21:53:32 +0300


On Wed, May 10, 2006 at 02:17:25PM -0400, Matthew Fluet wrote:
> >Defined all of the SIG and tty constants with #ifndef in the
> >platform-independent code, so that each platform doesn't have to
> >define the missing ones.
> 
> We've now used this technique for the _SC (sysconf) and _PC (pathconf) 
> constants, and the E (errno) constants.  While it is certainly expedient, 
> I'm worried that it masks issues.

Does this mean that application writers must be aware of which
constants and things from Posix are _really_ there and which ones are
not actually usable?  This makes writing portable applications hard.

I noticed a similar thing with nonblocking socket IO implemented with
MSG_DONTWAIT.  This flag doesn't exist on Cygwin, MinGW, HP-UX, or
AIX, it was just #defined to 0 so it was basically ignored.  I though
it was bad enough so that I fixed it by simulating the flag on
platforms where it doesn't exist (not committed to svn yet, will be
included in the AIX patch).  Will there now be dozens of flags which
may or may not really be available?  Do you think this is a bad thing
or irrelevant?

-- 
http://www.iki.fi/vl/