1
0
mirror of https://github.com/skeeto/w64devkit.git synced 2026-10-23 06:08:56 +03:00

Default x86 Windows target version in headers

This commit is contained in:
Peter0x44
2026-08-09 18:56:42 -05:00
committed by Christopher Wellons
parent 83f3251d4a
commit 0f358cbe71
2 changed files with 19 additions and 2 deletions

View File

@@ -254,7 +254,6 @@ RUN cat $PREFIX/src/gcc-*.patch | patch -d/dl/gcc -p1 \
--prefix=/bootstrap \
--with-sysroot=/bootstrap \
--with-arch-32=pentium4 \
"--with-specs=%{m32:%{!D_WIN32_WINNT*:-D_WIN32_WINNT=0x0501}}" \
--target=$ARCH \
--enable-static \
--disable-shared \
@@ -470,7 +469,6 @@ RUN cat $PREFIX/src/crossgcc-*.patch | patch -d/dl/gcc -p1 \
--with-sysroot=$PREFIX \
--with-native-system-header-dir=/include \
--with-arch-32=pentium4 \
"--with-specs=%{m32:%{!D_WIN32_WINNT*:-D_WIN32_WINNT=0x0501}}" \
--target=$ARCH \
--host=$ARCH \
--enable-static \

View File

@@ -0,0 +1,19 @@
headers: default 32-bit x86 to Windows XP
The x86_64 multilib toolchain shares one header tree between its 64-bit
and 32-bit targets. Keep the configured mingw-w64 default for x86_64 and
other architectures, but preserve w64devkit's Windows XP default when
the compiler targets i686. An explicit user definition still takes
precedence through the existing outer guard.
--- a/mingw-w64-headers/crt/_mingw.h.in
+++ b/mingw-w64-headers/crt/_mingw.h.in
@@ -255,3 +255,7 @@
#ifndef _WIN32_WINNT
-#define _WIN32_WINNT @DEFAULT_WIN32_WINNT@
+# if defined(__i386__)
+# define _WIN32_WINNT 0x0501
+# else
+# define _WIN32_WINNT @DEFAULT_WIN32_WINNT@
+# endif
#endif