Le mardi 16 janvier 2007 à 12:44 +0100, Bruno Haible a écrit : > Yoann Vandoorselaere wrote: > > - gnulib-sys_socket-error.diff: > > Under MinGW, map error code required by the poll module (namely > > ESHUTDOWN, ECONNRESET, ECONNABORTED, ENETRESET, ENOTCONN), plus some > > other useful error code. > > The conditional should be > #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ > rather than > #if defined _WIN32 || defined __WIN32__ > because the users of <sys/socket.h> use functions which, under Cygwin, > come from cygwin.dll, rather than from the native Woe32 DLLs.
[...] Thanks for letting me know, here is an updated patch. -- Yoann Vandoorselaere | Responsable R&D / CTO | PreludeIDS Technologies Tel: +33 (0)8 70 70 21 58 Fax: +33(0)4 78 42 21 58 http://www.prelude-ids.com
Index: lib/socket_.h =================================================================== RCS file: /cvsroot/gnulib/gnulib/lib/socket_.h,v retrieving revision 1.7 diff -u -p -r1.7 socket_.h --- lib/socket_.h 21 Jun 2006 21:21:42 -0000 1.7 +++ lib/socket_.h 16 Jan 2007 12:21:51 -0000 @@ -57,4 +57,14 @@ # define SHUT_RDWR SD_BOTH #endif +#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ +# define ENOTSOCK WSAENOTSOCK +# define EADDRINUSE WSAEADDRINUSE +# define ENETRESET WSAENETRESET +# define ECONNABORTED WSAECONNABORTED +# define ECONNRESET WSAECONNRESET +# define ENOTCONN WSAENOTCONN +# define ESHUTDOWN WSAESHUTDOWN +#endif + #endif /* _SYS_SOCKET_H */