summaryrefslogtreecommitdiff
path: root/src/interfaces/libpq/win32.h
diff options
context:
space:
mode:
authorAndrew Dunstan <andrew@dunslane.net>2011-12-10 15:35:41 -0500
committerAndrew Dunstan <andrew@dunslane.net>2011-12-10 15:35:41 -0500
commit1a0c76c32fe470142d3663dd84ac960d75a4e8db (patch)
treed783c0f17e41b6a627b3750e92bb60b301215a8b /src/interfaces/libpq/win32.h
parentab7d4213f93f0ef0e45b9b9343725974f196b091 (diff)
Enable compiling with the mingw-w64 32 bit compiler.
Original patch by Lars Kanis, reviewed by Nishiyama Tomoaki and tweaked some by me. This compiler, or at least the latest version of it, is currently broken, and only passes the regression tests if built with -O0.
Diffstat (limited to 'src/interfaces/libpq/win32.h')
-rw-r--r--src/interfaces/libpq/win32.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/interfaces/libpq/win32.h b/src/interfaces/libpq/win32.h
index b65da9ada14..be00ea73cbb 100644
--- a/src/interfaces/libpq/win32.h
+++ b/src/interfaces/libpq/win32.h
@@ -22,9 +22,15 @@
#undef EAGAIN /* doesn't apply on sockets */
#undef EINTR
#define EINTR WSAEINTR
+#ifndef EWOULDBLOCK
#define EWOULDBLOCK WSAEWOULDBLOCK
+#endif
+#ifndef ECONNRESET
#define ECONNRESET WSAECONNRESET
+#endif
+#ifndef EINPROGRESS
#define EINPROGRESS WSAEINPROGRESS
+#endif
/*
* support for handling Windows Socket errors