mingw: set _WIN32_WINNT explicitly for Git for Windows
authorJohannes Schindelin <johannes.schindelin@gmx.de>
Wed, 3 Oct 2018 19:43:43 +0000 (12:43 -0700)
committerJunio C Hamano <gitster@pobox.com>
Thu, 4 Oct 2018 12:39:56 +0000 (05:39 -0700)
Previously, we only ever declared a target Windows version if compiling
with Visual C.

Which meant that we were relying on the MinGW headers to guess which
Windows version we want to target...

Let's be explicit about it, in particular because we actually want to
bump the target Windows version to Vista (which we will do in the next
commit).

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-compat-util.h
index 5f2e90932f9990419d75d803d9552acf2f14adef..3ba93d9c155e6ec2eecbe78e8dc5ea98b2a4f6eb 100644 (file)
 #define _SGI_SOURCE 1
 
 #if defined(WIN32) && !defined(__CYGWIN__) /* Both MinGW and MSVC */
-# if defined (_MSC_VER) && !defined(_WIN32_WINNT)
+# if !defined(_WIN32_WINNT)
 #  define _WIN32_WINNT 0x0502
 # endif
 #define WIN32_LEAN_AND_MEAN  /* stops windows.h including winsock.h */