>> This patch tweaks the mapping of error codes in the errno module and in >> winsock.c, so that under mingw EWOULDBLOCK is not different from EAGAIN. > > Why should this be done? POSIX [1] does not require this. Portable > applications > have to check against both EAGAIN and EWOULDBLOCK.
But it allows it, and most POSIX implementations have this feature. >> It was inspired by the flock patch. > > flock() is documented to use EWOULDBLOCK in some cases. Yes, and it seemed strange to return a WSA error code even though its return code is supported by the run-time library (as EAGAIN). > The right action in > this case IMO is to make the 'flock' module depend on the 'errno' module. That's a good thing anyway, and orthogonal to this patch. Paolo