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

[PATCH] Windows: Do not redefine _WIN32_WINNT

From
Sebastian Schuberth <sschuberth@gmail.com>
Date
Sep 11, 2013, 16:06 UTC
Message-ID
<52309507.1090908@gmail.com>

With MinGW runtime version 4.0 this interferes with the previous definition from sdkddkver.h.

Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com>
---
 compat/nedmalloc/malloc.c.h | 2 ++
 git-compat-util.h           | 2 ++
 2 files changed, 4 insertions(+)
diff --git a/compat/nedmalloc/malloc.c.h b/compat/nedmalloc/malloc.c.h
index 1401a67..930d03b 100644
--- a/compat/nedmalloc/malloc.c.h
+++ b/compat/nedmalloc/malloc.c.h
@@ -495,7 +495,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
diff --git a/git-compat-util.h b/git-compat-util.h
index 664305c..f5c756d 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -93,7 +93,9 @@
 #undef __NO_INLINE__
 
 #ifdef WIN32 /* Both MinGW and MSVC */
+#ifndef _WIN32_WINNT
 #define _WIN32_WINNT 0x0502
+#endif
 #define WIN32_LEAN_AND_MEAN  /* stops windows.h including winsock.h */
 #include <winsock2.h>
 #include <windows.h>
-- 
1.8.3.mingw.1.2.g56240b5.dirty
Next: Junio C Hamano
Message 1 of 5 in “Windows: Do not redefine _WIN32_WINNT”
  1. Windows: Do not redefine _WIN32_WINNTSebastian Schuberth, Sep 11, 2013
  2. Junio C HamanoSep 11, 2013
  3. Sebastian SchuberthSep 11, 2013
  4. Junio C HamanoSep 11, 2013
  5. Sebastian SchuberthSep 12, 2013

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.