mirror of
https://github.com/libretro/RetroArch.git
synced 2026-11-09 03:29:43 -10:00
griffin: say 9x with the 9x macro on the three old-Windows targets
libretro-common's LEGACY_WIN32 (the ANSI Win32 path) no longer falls
out of a low _WIN32_WINNT, because that is the NT scale and NT is
Unicode-native - it was forcing ANSI on NT 3.51 and NT 4.0, which never
needed it, while missing 9x whenever a build left the macro alone. It
now keys off _WIN32_WINDOWS, which is the macro that means "targets
9x": Windows95 0x0400, Windows98 0x0410, WindowsME 0x0500.
Three targets here were relying on the old behaviour and would
otherwise move to the W path, which on 9x is a stub that fails with
ERROR_CALL_NOT_IMPLEMENTED:
windows_msvc6_x86 _WIN32_WINNT=0x0351 + _WIN32_WINDOWS=0x0400
windows_msvc2003_x86 _WIN32_WINNT=0x0400 + _WIN32_WINDOWS=0x0400
windows_msvc2005_x86 _WIN32_WINNT=0x0410 -> 0x0400, and
_WIN32_WINDOWS=0x0410
The last one was already the bug in miniature: 0x0410 is Windows 98, a
_WIN32_WINDOWS value, sitting on the NT scale where it reads as "NT
4.1" - a version that never existed. Every SDK gate it passes is an NT
4.0 gate, so moving it to 0x0400 and putting the 98 on the macro it was
always meant for changes no API exposure and finally states the target.
The two minimums are independent and both apply: NT builds get the
wide path, these three keep the ANSI one, and nothing else in the tree
sets either macro. Verified by evaluating the gate with each target's
exact flags on a Windows target: all three still resolve to
LEGACY_WIN32.
This commit is contained in:
1 parent
266285f2f7
commit
032c1a80c0
1 file changed
+13
-3
+13
-3
@@ -397,7 +397,11 @@ else ifeq ($(platform), windows_msvc6_x86)
|
||||
CXX = cl.exe
|
||||
LD = link.exe
|
||||
|
||||
PLATCFLAGS += -D_WIN32 -D_WIN32_WINNT=0x0351 -D__STDC_CONSTANT_MACROS -D_MBCS
|
||||
# _WIN32_WINDOWS says this build runs on 9x, which is what selects
|
||||
# libretro-common's ANSI Win32 path. It used to fall out of the low
|
||||
# _WIN32_WINNT below, but that is the NT scale and NT is
|
||||
# Unicode-native; the two are independent minimums and both apply.
|
||||
PLATCFLAGS += -D_WIN32 -D_WIN32_WINNT=0x0351 -D_WIN32_WINDOWS=0x0400 -D__STDC_CONSTANT_MACROS -D_MBCS
|
||||
LDFLAGS += shell32.lib user32.lib gdi32.lib comdlg32.lib winmm.lib ole32.lib
|
||||
|
||||
VCDIR ?= $(shell reg query "HKLM\SOFTWARE\Wow6432Node\Microsoft\DevStudio\6.0\Products\Microsoft Visual C++" -v "ProductDir" | grep -io '[A-Z]:\\.*')
|
||||
@@ -445,7 +449,9 @@ else ifeq ($(platform), windows_msvc2003_x86)
|
||||
CXX = cl.exe
|
||||
LD = link.exe
|
||||
|
||||
PLATCFLAGS += -D_WIN32 -DWINVER=0x0400 -D_WIN32_WINNT=0x0400 -D__STDC_CONSTANT_MACROS -D_MBCS -D_VC80_UPGRADE=0x0710
|
||||
# See the msvc6 target: _WIN32_WINDOWS is the 9x minimum, _WIN32_WINNT
|
||||
# the NT one.
|
||||
PLATCFLAGS += -D_WIN32 -DWINVER=0x0400 -D_WIN32_WINNT=0x0400 -D_WIN32_WINDOWS=0x0400 -D__STDC_CONSTANT_MACROS -D_MBCS -D_VC80_UPGRADE=0x0710
|
||||
PLATCFLAGS += -DHAVE_GFX_WIDGETS
|
||||
LDFLAGS += shell32.lib user32.lib gdi32.lib comdlg32.lib winmm.lib ole32.lib
|
||||
|
||||
@@ -508,7 +514,11 @@ else ifeq ($(platform), windows_msvc2005_x86)
|
||||
CXX = cl.exe
|
||||
LD = link.exe
|
||||
|
||||
PLATCFLAGS += -D_WIN32 -D_WIN32_WINNT=0x0410 -D__STDC_CONSTANT_MACROS -D_MBCS
|
||||
# 0x0410 is Windows 98 - a _WIN32_WINDOWS value. On the NT scale it
|
||||
# reads as "NT 4.1", a version that does not exist; every SDK gate it
|
||||
# passes is an NT 4.0 gate, so moving it to the macro it was always
|
||||
# meant for changes no API exposure and states the actual target.
|
||||
PLATCFLAGS += -D_WIN32 -D_WIN32_WINNT=0x0400 -D_WIN32_WINDOWS=0x0410 -D__STDC_CONSTANT_MACROS -D_MBCS
|
||||
PLATCFLAGS += -DHAVE_OPENGL -DHAVE_OPENGL1 -DHAVE_GLSL -DHAVE_OZONE -DHAVE_GFX_WIDGETS -DHAVE_CC_RESAMPLER
|
||||
PLATCFLAGS += -DHAVE_ONLINE_UPDATER -DHAVE_UPDATE_ASSETS -DHAVE_UPDATE_CORES
|
||||
PLATCFLAGS += -DHAVE_UPDATE_CORE_INFO
|
||||
|
||||
Reference in new issue
Block a user