[MLton-devel] Posix.FileSys.pathconf

Emden R. Gansner erg@research.att.com
Tue, 09 Sep 2003 17:33:19 -0400


> I think that given the desire to have an open-ended implementation 
> framework
> that we have to view NONE as false when applied to boolean variables.
> 

We have to allow NONE for boolean values, but this should be described
as denoting unbounded or undefined, not false. The POSIX spec is
poorly written concerning boolean values, and it even notes that most
of the errors for pathconf are optional. Although POSIX specifies that
EINVAL corresponds to an implementation not associating a value with a
name, the Linux implementation takes advantage of this looseness with a 
sloppy implementation, using -1 without setting errno to mean unspecified
as well as unbounded. Note also that the Linux man page for pathconf clearly 
indicates the function should follow the standard C convention of nonzero 
being true.

HP/UX also uses -1 without changing errno to mean undefined, but it is
clear about this in its man page.

We certainly can't be more precise than whatever POSIX gives us.

    Emden



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
MLton-devel mailing list
MLton-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mlton-devel