[MLton] bug in MLton and bug in basis

Florian Weimer fw@deneb.enyo.de
Thu, 18 Aug 2005 17:13:07 +0200


* Wesley W. Terpstra:

> Are you sure that's still the case?

Yes, Sun is well-known for its backwards compatibility. 8-)

> I'm looking at io.c from libst which says:

>       if (getsockopt(fd->osfd, SOL_SOCKET, SO_ERROR, (char *)&err,
>                      (socklen_t *)&n) < 0)
>         return -1;
>       if (err) {
>         errno = err;
>         return -1;
>       }

As far as I can see, this sets errno correctly both on Solaris and
non-Solaris systems.  The logic is just reversed, compared to the code
I posted.