diff options
| author | Andrew Dunstan <andrew@dunslane.net> | 2011-04-09 17:59:27 -0400 | 
|---|---|---|
| committer | Andrew Dunstan <andrew@dunslane.net> | 2011-04-09 17:59:27 -0400 | 
| commit | 2ea865de5660f75f44f6b1ba78090e41e070cb4c (patch) | |
| tree | 6eb67948302b7235400b04fb2a85790005498c8b /src/include/port/win32.h | |
| parent | 00bf707113a297aa85c38beda8fb1247fe4bd304 (diff) | |
Backport changes to allow building with MinGW 64 bit compiler.
These changes have been in HEAD for some time with no ill effect. They
are only being backported to 9.0, as the required WINNT version was not
high enough before that.
Diffstat (limited to 'src/include/port/win32.h')
| -rw-r--r-- | src/include/port/win32.h | 18 | 
1 files changed, 17 insertions, 1 deletions
| diff --git a/src/include/port/win32.h b/src/include/port/win32.h index 1473d9e8c3c..5d41fd3ac74 100644 --- a/src/include/port/win32.h +++ b/src/include/port/win32.h @@ -4,7 +4,16 @@  #define WIN32_ONLY_COMPILER  #endif +/*  + * Make sure _WIN32_WINNT has the minumum required value.  + * Leave a higher value in place. +*/ +#if defined(_WIN32_WINNT) && _WIN32_WINNT < 0x0501 +#undef _WIN32_WINNT +#endif +#ifndef _WIN32_WINNT  #define _WIN32_WINNT 0x0501 +#endif  /*   * Always build with SSPI support. Keep it as a #define in case   * we want a switch to disable it sometime in the future. @@ -17,10 +26,17 @@  #undef mkdir  #undef ERROR + +/*  + * The Mingw64 headers choke if this is already defined - they + * define it themselves. + */ +#if !defined(WIN64) || defined(WIN32_ONLY_COMPILER)  #define _WINSOCKAPI_ -#include <windows.h> +#endif  #include <winsock2.h>  #include <ws2tcpip.h> +#include <windows.h>  #undef small  #include <process.h>  #include <signal.h> | 
