aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2016-04-21 16:16:19 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2016-04-21 16:16:19 -0400
commit5b13ad976a0143fbed15612db8962faa33e8d979 (patch)
treed88d278cd71fc4ff9b1cb6db46f2bf8499549804 /src
parentb2bb59bd51849d4eec777171f6e402581e00d654 (diff)
downloadpostgresql-5b13ad976a0143fbed15612db8962faa33e8d979.tar.gz
postgresql-5b13ad976a0143fbed15612db8962faa33e8d979.zip
Remove dead code in win32.h.
There's no longer a need for the MSVC-version-specific code stanza that forcibly redefines errno code symbols, because since commit 73838b52 we're unconditionally redefining them in the stanza before this one anyway. Now it's merely confusing and ugly, so get rid of it; and improve the comment that explains what's going on here. Although this is just cosmetic, back-patch anyway since I'm intending to back-patch some less-cosmetic changes in this same hunk of code.
Diffstat (limited to 'src')
-rw-r--r--src/include/port/win32.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/include/port/win32.h b/src/include/port/win32.h
index fc2222be680..37f1dcc5855 100644
--- a/src/include/port/win32.h
+++ b/src/include/port/win32.h
@@ -259,11 +259,18 @@ typedef int pid_t;
/*
* Supplement to <errno.h>.
+ *
+ * We redefine network-related Berkeley error symbols as the corresponding WSA
+ * constants. This allows elog.c to recognize them as being in the Winsock
+ * error code range and pass them off to pgwin32_socket_strerror(), since
+ * Windows' version of plain strerror() won't cope. Note that this will break
+ * if these names are used for anything else besides Windows Sockets errors.
+ * See TranslateSocketError() when changing this list.
*/
#undef EAGAIN
+#define EAGAIN WSAEWOULDBLOCK
#undef EINTR
#define EINTR WSAEINTR
-#define EAGAIN WSAEWOULDBLOCK
#undef EMSGSIZE
#define EMSGSIZE WSAEMSGSIZE
#undef EAFNOSUPPORT