Skip to content

Commit

Permalink
Windows: do not redefine _WIN32_WINNT
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
sschuberth committed Sep 24, 2013
1 parent 72631c9 commit ab94cf6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions compat/nedmalloc/malloc.c.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion compat/poll/poll.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
4 changes: 3 additions & 1 deletion git-compat-util.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,9 @@
#define _SGI_SOURCE 1

#if defined(WIN32) && !defined(__CYGWIN__) /* Both MinGW and MSVC */
#define _WIN32_WINNT 0x0502
# if !defined(_WIN32_WINNT)
# define _WIN32_WINNT 0x0502
# endif
#define WIN32_LEAN_AND_MEAN /* stops windows.h including winsock.h */
#include <winsock2.h>
#include <windows.h>
Expand Down

0 comments on commit ab94cf6

Please sign in to comment.