Unconditionally use the WSA equivalents of Socket error constants.

This change will only apply to mingw compilers, and has been found
necessary by late versions of the mingw-w64 compiler. It's the same as
what is done elsewhere for the Microsoft compilers.

If this doesn't upset older compilers in the buildfarm, it will be
backpatched to 9.1.

Problem reported by Michael Cronenworth, although not his patch.
This commit is contained in:
Andrew Dunstan 2013-08-20 14:11:36 -04:00
parent b3cc173e19
commit 73838b5251

View File

@ -272,36 +272,26 @@ typedef int pid_t;
#undef EINTR #undef EINTR
#define EINTR WSAEINTR #define EINTR WSAEINTR
#define EAGAIN WSAEWOULDBLOCK #define EAGAIN WSAEWOULDBLOCK
#ifndef EMSGSIZE #undef EMSGSIZE
#define EMSGSIZE WSAEMSGSIZE #define EMSGSIZE WSAEMSGSIZE
#endif #undef EAFNOSUPPORT
#ifndef EAFNOSUPPORT
#define EAFNOSUPPORT WSAEAFNOSUPPORT #define EAFNOSUPPORT WSAEAFNOSUPPORT
#endif #undef EWOULDBLOCK
#ifndef EWOULDBLOCK
#define EWOULDBLOCK WSAEWOULDBLOCK #define EWOULDBLOCK WSAEWOULDBLOCK
#endif #undef ECONNRESET
#ifndef ECONNRESET
#define ECONNRESET WSAECONNRESET #define ECONNRESET WSAECONNRESET
#endif #undef EINPROGRESS
#ifndef EINPROGRESS
#define EINPROGRESS WSAEINPROGRESS #define EINPROGRESS WSAEINPROGRESS
#endif #undef ENOBUFS
#ifndef ENOBUFS
#define ENOBUFS WSAENOBUFS #define ENOBUFS WSAENOBUFS
#endif #undef EPROTONOSUPPORT
#ifndef EPROTONOSUPPORT
#define EPROTONOSUPPORT WSAEPROTONOSUPPORT #define EPROTONOSUPPORT WSAEPROTONOSUPPORT
#endif #undef ECONNREFUSED
#ifndef ECONNREFUSED
#define ECONNREFUSED WSAECONNREFUSED #define ECONNREFUSED WSAECONNREFUSED
#endif #undef EBADFD
#ifndef EBADFD
#define EBADFD WSAENOTSOCK #define EBADFD WSAENOTSOCK
#endif #undef EOPNOTSUPP
#ifndef EOPNOTSUPP
#define EOPNOTSUPP WSAEOPNOTSUPP #define EOPNOTSUPP WSAEOPNOTSUPP
#endif
/* /*
* For Microsoft Visual Studio 2010 and above we intentionally redefine * For Microsoft Visual Studio 2010 and above we intentionally redefine