summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrew Dunstan <andrew@dunslane.net>2013-08-26 14:56:49 -0400
committerAndrew Dunstan <andrew@dunslane.net>2013-08-26 14:56:49 -0400
commite912963a22ba5c1bd909d6ee53f41b8ae6c69166 (patch)
tree5f44cfcc149766f6d40eba0cf30517a675b20b94 /src
parent005f583ba4e6d4d19b62959ef8e70a3da4d188a5 (diff)
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. Backpatch of commit 73838b5251e. Problem reported by Michael Cronenworth, although not his patch.
Diffstat (limited to 'src')
-rw-r--r--src/include/port/win32.h30
1 files changed, 10 insertions, 20 deletions
diff --git a/src/include/port/win32.h b/src/include/port/win32.h
index a00ec897d29..6457d6b1c61 100644
--- a/src/include/port/win32.h
+++ b/src/include/port/win32.h
@@ -270,36 +270,26 @@ typedef int pid_t;
#undef EINTR
#define EINTR WSAEINTR
#define EAGAIN WSAEWOULDBLOCK
-#ifndef EMSGSIZE
+#undef EMSGSIZE
#define EMSGSIZE WSAEMSGSIZE
-#endif
-#ifndef EAFNOSUPPORT
+#undef EAFNOSUPPORT
#define EAFNOSUPPORT WSAEAFNOSUPPORT
-#endif
-#ifndef EWOULDBLOCK
+#undef EWOULDBLOCK
#define EWOULDBLOCK WSAEWOULDBLOCK
-#endif
-#ifndef ECONNRESET
+#undef ECONNRESET
#define ECONNRESET WSAECONNRESET
-#endif
-#ifndef EINPROGRESS
+#undef EINPROGRESS
#define EINPROGRESS WSAEINPROGRESS
-#endif
-#ifndef ENOBUFS
+#undef ENOBUFS
#define ENOBUFS WSAENOBUFS
-#endif
-#ifndef EPROTONOSUPPORT
+#undef EPROTONOSUPPORT
#define EPROTONOSUPPORT WSAEPROTONOSUPPORT
-#endif
-#ifndef ECONNREFUSED
+#undef ECONNREFUSED
#define ECONNREFUSED WSAECONNREFUSED
-#endif
-#ifndef EBADFD
+#undef EBADFD
#define EBADFD WSAENOTSOCK
-#endif
-#ifndef EOPNOTSUPP
+#undef EOPNOTSUPP
#define EOPNOTSUPP WSAEOPNOTSUPP
-#endif
/*
* For Microsoft Visual Studio 2010 and above we intentionally redefine