git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 2/3] mingw: set _WIN32_WINNT explicitly for Git for Windows

From
Johannes Schindelin via GitGitGadget <gitgitgadget@gmail.com>
Date
Oct 3, 2018, 19:43 UTC
Message-ID
<47966fb1f55bf3014d93b8aa2d746ef22f8b5a7c.1538595818.git.gitgitgadget@gmail.com>
In-Reply-To
<pull.44.git.gitgitgadget@gmail.com>
From: Johannes Schindelin <johannes.schindelin@gmx.de>

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>
---
 git-compat-util.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/git-compat-util.h b/git-compat-util.h
index 5f2e90932f..3ba93d9c15 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -146,7 +146,7 @@
 #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 */
-- 
gitgitgadget
Previous: Johannes Schindelin via GitGitGadgetNext: Johannes Schindelin via GitGitGadget
Message 3 of 9 in “mingw: require Windows Vista or later (and fix the Windows CI builds)”
  1. 0/3 mingw: require Windows Vista or later (and fix the Windows CI builds)Johannes Schindelin via GitGitGadget, Oct 3, 2018
  2. 1/3 compat/poll: prepare for targeting Windows VistaJohannes Schindelin via GitGitGadget, Oct 3, 2018
  3. 2/3 mingw: set _WIN32_WINNT explicitly for Git for WindowsJohannes Schindelin via GitGitGadget, Oct 3, 2018
  4. 3/3 mingw: bump the minimum Windows version to VistaJohannes Schindelin via GitGitGadget, Oct 3, 2018
  5. Ævar Arnfjörð BjarmasonOct 10, 2018
  6. Junio C HamanoOct 11, 2018
  7. Johannes SchindelinOct 14, 2019
  8. Johannes SchindelinOct 14, 2019
  9. Johannes SchindelinOct 14, 2019

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.