Windows: do not redefine _WIN32_WINNT
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>
Sebastian Schuberth committed
Sep 11, 2013 at 18:06 UTC
8453c1259a3b6fe89d67b6e783cc535b60f298c1
3 files changed
+4
-2
compat/nedmalloc/malloc.c.h
+2
@@ -499,7 +499,9 @@ MAX_RELEASE_CHECK_RATE default: 4095 unless not HAVE_MMAP
499
#endif /* WIN32 */
500
#ifdef WIN32
501
#define WIN32_LEAN_AND_MEAN
502
+#ifndef _WIN32_WINNT
503
#define _WIN32_WINNT 0x403
504
+#endif
505
#include <windows.h>
506
#define HAVE_MMAP 1
507
#define HAVE_MORECORE 0
compat/poll/poll.c
+1
-1
@@ -39,7 +39,7 @@
39
40
#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
41
# define WIN32_NATIVE
42
-# if defined (_MSC_VER)
42
+# if defined (_MSC_VER) && !defined(_WIN32_WINNT)
43
# define _WIN32_WINNT 0x0502
44
# endif
45
# include <winsock2.h>
git-compat-util.h
+1
-1
@@ -86,7 +86,7 @@
86
#define _SGI_SOURCE 1
87
88
#if defined(WIN32) && !defined(__CYGWIN__) /* Both MinGW and MSVC */
89
-# if defined (_MSC_VER)
89
+# if defined (_MSC_VER) && !defined(_WIN32_WINNT)
90
# define _WIN32_WINNT 0x0502
91
# endif
92
#define WIN32_LEAN_AND_MEAN /* stops windows.h including winsock.h */