summaryrefslogtreecommitdiff
path: root/src/include/port/win32.h
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2016-04-21 16:58:47 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2016-04-21 16:59:17 -0400
commit9028f404ef9605b585c176f7b0924069884cabfe (patch)
tree346625d68a5fdcfbfd1bb90d1e4dd002272caf25 /src/include/port/win32.h
parent5b13ad976a0143fbed15612db8962faa33e8d979 (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/port/win32.h')
-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 37f1dcc5855..4f4f67acb9f 100644
--- a/src/include/port/win32.h
+++ b/src/include/port/win32.h
@@ -277,20 +277,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.