Windows: do not redefine _WIN32_WINNT
authorSebastian Schuberth <sschuberth@gmail.com>
Wed, 11 Sep 2013 16:06:31 +0000 (18:06 +0200)
committerJunio C Hamano <gitster@pobox.com>
Wed, 11 Sep 2013 21:50:19 +0000 (14:50 -0700)
With MinGW runtime version 4.0 this interferes with the previous
definition from sdkddkver.h.

Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
compat/nedmalloc/malloc.c.h
compat/poll/poll.c
git-compat-util.h
index ed4f1fa5af8d911382101116c8ee522ef1e9b629..f216a2a7d3d57b5ca7e791494b01f9604ba51e3e 100644 (file)
@@ -499,7 +499,9 @@ MAX_RELEASE_CHECK_RATE   default: 4095 unless not HAVE_MMAP
 #endif  /* WIN32 */
 #ifdef WIN32
 #define WIN32_LEAN_AND_MEAN
+#ifndef _WIN32_WINNT
 #define _WIN32_WINNT 0x403
+#endif
 #include <windows.h>
 #define HAVE_MMAP 1
 #define HAVE_MORECORE 0
index 44103103a4a71ff25e5e8e1d106221a9dd2e9908..31163f2ae7b71857889f561dea0b3ffecff61989 100644 (file)
@@ -39,7 +39,7 @@
 
 #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
 # define WIN32_NATIVE
-# if defined (_MSC_VER)
+# if defined (_MSC_VER) && !defined(_WIN32_WINNT)
 #  define _WIN32_WINNT 0x0502
 # endif
 # include <winsock2.h>
index 9549de6318147839c73b60b1fc72ceb44d9adb47..7776f126d3bd4facfe987bd844a339c8a17b102a 100644 (file)
@@ -86,7 +86,7 @@
 #define _SGI_SOURCE 1
 
 #if defined(WIN32) && !defined(__CYGWIN__) /* Both MinGW and MSVC */
-# if defined (_MSC_VER)
+# if defined (_MSC_VER) && !defined(_WIN32_WINNT)
 #  define _WIN32_WINNT 0x0502
 # endif
 #define WIN32_LEAN_AND_MEAN  /* stops windows.h including winsock.h */