]> granicus.if.org Git - postgresql/commitdiff
Unconditionally use the WSA equivalents of Socket error constants.
authorAndrew Dunstan <andrew@dunslane.net>
Mon, 26 Aug 2013 18:55:00 +0000 (14:55 -0400)
committerAndrew Dunstan <andrew@dunslane.net>
Mon, 26 Aug 2013 18:55:00 +0000 (14:55 -0400)
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.

Backpatch of commit 73838b5251e.

Problem reported by Michael Cronenworth, although not his patch.

src/include/port/win32.h

index 34f40041298e4378d9d9d9a0ec2f5bceaf2a497c..6a40a322268a21e20e04a3a808acb9537f427219 100644 (file)
@@ -264,15 +264,25 @@ typedef int pid_t;
 #undef EINTR
 #define EINTR WSAEINTR
 #define EAGAIN WSAEWOULDBLOCK
+#undef EMSGSIZE
 #define EMSGSIZE WSAEMSGSIZE
+#undef EAFNOSUPPORT
 #define EAFNOSUPPORT WSAEAFNOSUPPORT
+#undef EWOULDBLOCK
 #define EWOULDBLOCK WSAEWOULDBLOCK
+#undef ECONNRESET
 #define ECONNRESET WSAECONNRESET
+#undef EINPROGRESS
 #define EINPROGRESS WSAEINPROGRESS
+#undef ENOBUFS
 #define ENOBUFS WSAENOBUFS
+#undef EPROTONOSUPPORT
 #define EPROTONOSUPPORT WSAEPROTONOSUPPORT
+#undef ECONNREFUSED
 #define ECONNREFUSED WSAECONNREFUSED
+#undef EBADFD
 #define EBADFD WSAENOTSOCK
+#undef EOPNOTSUPP
 #define EOPNOTSUPP WSAEOPNOTSUPP
 
 /*