summaryrefslogtreecommitdiff
path: root/src/interfaces
diff options
context:
space:
mode:
authorAndrew Dunstan2011-12-10 20:35:41 +0000
committerAndrew Dunstan2011-12-10 20:35:41 +0000
commit1a0c76c32fe470142d3663dd84ac960d75a4e8db (patch)
treed783c0f17e41b6a627b3750e92bb60b301215a8b /src/interfaces
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')
-rw-r--r--src/interfaces/ecpg/test/resultmap3
-rw-r--r--src/interfaces/libpq/win32.h6
2 files changed, 9 insertions, 0 deletions
diff --git a/src/interfaces/ecpg/test/resultmap b/src/interfaces/ecpg/test/resultmap
index 95ea5831ccb..aef7338e819 100644
--- a/src/interfaces/ecpg/test/resultmap
+++ b/src/interfaces/ecpg/test/resultmap
@@ -1,9 +1,12 @@
compat_informix/dec_test:stdout:i.86-pc-win32vc=compat_informix-dec_test-MinGW32.stdout
compat_informix/dec_test:stdout:i.86-pc-mingw32=compat_informix-dec_test-MinGW32.stdout
compat_informix/dec_test:stdout:x86_64-w64-mingw32=compat_informix-dec_test-MinGW32.stdout
+compat_informix/dec_test:stdout:i.86-w64-mingw32=compat_informix-dec_test-MinGW32.stdout
pgtypeslib/num_test:stdout:i.86-pc-win32vc=pgtypeslib-num_test-MinGW32.stdout
pgtypeslib/num_test:stdout:i.86-pc-mingw32=pgtypeslib-num_test-MinGW32.stdout
pgtypeslib/num_test:stdout:x86_64-w64-mingw32=pgtypeslib-num_test-MinGW32.stdout
+pgtypeslib/num_test:stdout:i.86-w64-mingw32=pgtypeslib-num_test-MinGW32.stdout
pgtypeslib/num_test2:stdout:i.86-pc-win32vc=pgtypeslib-num_test2-MinGW32.stdout
pgtypeslib/num_test2:stdout:i.86-pc-mingw32=pgtypeslib-num_test2-MinGW32.stdout
pgtypeslib/num_test2:stdout:x86_64-w64-mingw32=pgtypeslib-num_test2-MinGW32.stdout
+pgtypeslib/num_test2:stdout:i.86-w64-mingw32=pgtypeslib-num_test2-MinGW32.stdout
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