summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorTom Lane2016-04-21 20:58:47 +0000
committerTom Lane2016-04-21 20:58:47 +0000
commit125ad539a275db5ab8f4647828b80a16d02eabd2 (patch)
treed026def8ccb244b83a1c1e5de9f73486fb261c82 /src/include
parente54528155a3c4159b01327534691c3342a371cab (diff)
Improve TranslateSocketError() to handle more Windows error codes.
The coverage was rather lean for cases that bind() or listen() might return. Add entries for everything that there's a direct equivalent for in the set of Unix errnos that elog.c has heard of.
Diffstat (limited to 'src/include')
-rw-r--r--src/include/port/win32.h16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/include/port/win32.h b/src/include/port/win32.h
index c9390d1124..bd2ad99c11 100644
--- a/src/include/port/win32.h
+++ b/src/include/port/win32.h
@@ -285,20 +285,32 @@ typedef int pid_t;
#define EAFNOSUPPORT WSAEAFNOSUPPORT
#undef EWOULDBLOCK
#define EWOULDBLOCK WSAEWOULDBLOCK
+#undef ECONNABORTED
+#define ECONNABORTED WSAECONNABORTED
#undef ECONNRESET
#define ECONNRESET WSAECONNRESET
#undef EINPROGRESS
#define EINPROGRESS WSAEINPROGRESS
+#undef EISCONN
+#define EISCONN WSAEISCONN
#undef ENOBUFS
#define ENOBUFS WSAENOBUFS
#undef EPROTONOSUPPORT
#define EPROTONOSUPPORT WSAEPROTONOSUPPORT
#undef ECONNREFUSED
#define ECONNREFUSED WSAECONNREFUSED
-#undef EBADFD
-#define EBADFD WSAENOTSOCK
+#undef ENOTSOCK
+#define ENOTSOCK WSAENOTSOCK
#undef EOPNOTSUPP
#define EOPNOTSUPP WSAEOPNOTSUPP
+#undef EADDRINUSE
+#define EADDRINUSE WSAEADDRINUSE
+#undef EADDRNOTAVAIL
+#define EADDRNOTAVAIL WSAEADDRNOTAVAIL
+#undef EHOSTUNREACH
+#define EHOSTUNREACH WSAEHOSTUNREACH
+#undef ENOTCONN
+#define ENOTCONN WSAENOTCONN
/*
* Extended locale functions with gratuitous underscore prefixes.