From 8453c1259a3b6fe89d67b6e783cc535b60f298c1 Mon Sep 17 00:00:00 2001 From: Sebastian Schuberth Date: Wed, 11 Sep 2013 18:06:31 +0200 Subject: 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 Signed-off-by: Junio C Hamano --- compat/nedmalloc/malloc.c.h | 2 ++ compat/poll/poll.c | 2 +- git-compat-util.h | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/compat/nedmalloc/malloc.c.h b/compat/nedmalloc/malloc.c.h index ed4f1fa5af..f216a2a7d3 100644 --- a/compat/nedmalloc/malloc.c.h +++ b/compat/nedmalloc/malloc.c.h @@ -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 #define HAVE_MMAP 1 #define HAVE_MORECORE 0 diff --git a/compat/poll/poll.c b/compat/poll/poll.c index 44103103a4..31163f2ae7 100644 --- a/compat/poll/poll.c +++ b/compat/poll/poll.c @@ -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 diff --git a/git-compat-util.h b/git-compat-util.h index 9549de6318..7776f126d3 100644 --- a/git-compat-util.h +++ b/git-compat-util.h @@ -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 */ -- cgit v1.2.1