Fwd: Cygwin64: errno.h error values
Jan Nijtmans
jan.nijtmans@gmail.com
Thu May 2 20:14:00 GMT 2013
Hi all,
Comparing errno.h from cygwin with the ones from mingw(-64) and VS10, the first
ones on the list have equal values, but later on values are diverging. I already
reported that to the mingw-w64 people, and they adapted the list making
it the same as VS10. See:
<http://sourceforge.net/tracker/?func=detail&atid=983354&aid=3448042&group_id=202880>
Cygwin apparently started with initial values of some early Visual
Studio, and added
the missing ones, using succeeding values. Having different values in Cygwin and
MS might cause unexpected problems: every time when transferring error-codes
between some MS dll and cygwin, proper translation must be done between the
two domains when the error-codes are different.
Wouldn't it be a lot easier when Cygwin started to use the same error-values
than Visual Studio? Then the mingw-w64 cross-compiler doesn't need its own
errno.h (or sys/errno.h) any more, the one from cygwin would work fine as well.
And mingw-w64 would not need constructs like:
#ifndef EAFNOSUPPORT
#define EAFNOSUPPORT 102
#endif
something they only do because of possible conflicting definitions in
mingw/cygwin.
Now that Cygwin64 is not officially released yet, I hope it is not too
late yet to
change this: I realize this is a binary incompatibility and all packages need
to be recompiled.
Here is a test program (main.c) which - when compiled with VS10+ -
just outputs "THE END". It can be used to test whether all errno
values are really the same as the ones from VS10+. I also included
a patch for sys/errno.h, which changes the errno values to be
the same as the values from Visual Studio.
Regards,
Jan Nijtmans
-------------- next part --------------
A non-text attachment was scrubbed...
Name: errno.h.diff
Type: application/octet-stream
Size: 8796 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin/attachments/20130502/afd60105/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: main.c
Type: text/x-csrc
Size: 668 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin/attachments/20130502/afd60105/attachment.bin>
-------------- next part --------------
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
More information about the Cygwin
mailing list