This is an automated email from the ASF dual-hosted git repository.

leginee pushed a commit to branch win7-floor-trunk
in repository https://gitbox.apache.org/repos/asf/openoffice.git

commit c8734844d258af7c4e13e7e5b3ba90e5c857a02c
Author: Peter <[email protected]>
AuthorDate: Wed Nov 4 23:16:26 2026 +0100

    solenv: do not pin _WIN32_IE -- let the SDK derive it
    
    f74c7b08f2 set _WIN32_IE=0x0800 next to _WIN32_WINNT=0x0601.  That is the
    value the Windows SDK derives at 0x0601, but a fixed value is not the same
    thing as a derived one: sal/systools/win32/uwinapi's CopyFileEx{A,W}.cpp
    define _WIN32_WINNT 0x0400 themselves, and sdkddkver.h rejects an NT4
    _WIN32_WINNT next to an IE above 6.0 SP1:
    
      sdkddkver.h(296): fatal error C1189: _WIN32_WINNT settings conflicts
      with _WIN32_IE setting
    
    Leave _WIN32_IE unset, as the Bazel build does, so each translation unit
    gets the value matching its own _WIN32_WINNT.  Everything at the floor still
    compiles at 0x0800.
    
    Co-Authored-By: Claude Opus 5.5 <[email protected]>
---
 main/solenv/gbuild/platform/windows.mk |  1 -
 main/solenv/inc/wntmsci11.mk           | 15 +++++++++------
 main/solenv/inc/wntmscx.mk             | 15 +++++++++------
 win10-msvc/README.md                   |  9 ++++++++-
 4 files changed, 26 insertions(+), 14 deletions(-)

diff --git a/main/solenv/gbuild/platform/windows.mk 
b/main/solenv/gbuild/platform/windows.mk
index 07b6a61cce..606f127ef6 100644
--- a/main/solenv/gbuild/platform/windows.mk
+++ b/main/solenv/gbuild/platform/windows.mk
@@ -59,7 +59,6 @@ endif
 gb_OSDEFS := \
        -DWINVER=0x0601 \
        -D_WIN32_WINNT=0x0601 \
-       -D_WIN32_IE=0x0800 \
        -DNT351 \
        -DWIN32 \
        -DWNT \
diff --git a/main/solenv/inc/wntmsci11.mk b/main/solenv/inc/wntmsci11.mk
index 9b3a923529..1011d87f57 100644
--- a/main/solenv/inc/wntmsci11.mk
+++ b/main/solenv/inc/wntmsci11.mk
@@ -221,12 +221,15 @@ MODULES_WITH_WARNINGS :=
 # The Windows API floor: Windows 7 SP1.  Trunk builds only with a VS2015-or-
 # newer toolset (Python 3.11 needs one, and its runtime does not install on
 # anything older than Windows 7 SP1), so the old Windows 2000 values (0x0500)
-# described a platform the result cannot run on.  _WIN32_IE is the value the
-# Windows SDK derives from _WIN32_WINNT 0x0601.  A few modules state their own
-# value (fpicker and sal/systools/win32/kill replace it with -U/-D, shell adds
-# a second -D, openssl builds with its own flags).  Python builds with its own
-# project files and gets the same floor from python-3.11.15-win7.patch.
-CDEFS+=-D_MT -DWINVER=0x0601 -D_WIN32_WINNT=0x0601 -D_WIN32_IE=0x0800
+# described a platform the result cannot run on.  _WIN32_IE is deliberately not
+# set: the SDK derives it per translation unit from the _WIN32_WINNT that unit
+# ends up with (0x0800 at 0x0601), and a fixed value breaks the files that
+# lower _WIN32_WINNT to NT4 themselves (sal uwinapi, C1189 in sdkddkver.h).
+# A few modules state their own _WIN32_WINNT: fpicker and
+# sal/systools/win32/kill replace it with -U/-D, shell adds a second -D,
+# openssl builds with its own flags.  Python builds with its own project files
+# and gets the same floor from python-3.11.15-win7.patch.
+CDEFS+=-D_MT -DWINVER=0x0601 -D_WIN32_WINNT=0x0601
 .IF "$(COMEX)" == "11"
 _VC_MANIFEST_BASENAME=__VC80
 .ELSE
diff --git a/main/solenv/inc/wntmscx.mk b/main/solenv/inc/wntmscx.mk
index 6e216c319c..1d96bccb10 100644
--- a/main/solenv/inc/wntmscx.mk
+++ b/main/solenv/inc/wntmscx.mk
@@ -228,12 +228,15 @@ MODULES_WITH_WARNINGS :=
 # The Windows API floor: Windows 7 SP1.  Trunk builds only with a VS2015-or-
 # newer toolset (Python 3.11 needs one, and its runtime does not install on
 # anything older than Windows 7 SP1), so the old Windows 2000 values (0x0500)
-# described a platform the result cannot run on.  _WIN32_IE is the value the
-# Windows SDK derives from _WIN32_WINNT 0x0601.  A few modules state their own
-# value (fpicker and sal/systools/win32/kill replace it with -U/-D, shell adds
-# a second -D, openssl builds with its own flags).  Python builds with its own
-# project files and gets the same floor from python-3.11.15-win7.patch.
-CDEFS+=-D_MT -DWINVER=0x0601 -D_WIN32_WINNT=0x0601 -D_WIN32_IE=0x0800
+# described a platform the result cannot run on.  _WIN32_IE is deliberately not
+# set: the SDK derives it per translation unit from the _WIN32_WINNT that unit
+# ends up with (0x0800 at 0x0601), and a fixed value breaks the files that
+# lower _WIN32_WINNT to NT4 themselves (sal uwinapi, C1189 in sdkddkver.h).
+# A few modules state their own _WIN32_WINNT: fpicker and
+# sal/systools/win32/kill replace it with -U/-D, shell adds a second -D,
+# openssl builds with its own flags.  Python builds with its own project files
+# and gets the same floor from python-3.11.15-win7.patch.
+CDEFS+=-D_MT -DWINVER=0x0601 -D_WIN32_WINNT=0x0601
 .IF "$(COMEX)" == "11"
 _VC_MANIFEST_BASENAME=__VC80
 .ELSE
diff --git a/win10-msvc/README.md b/win10-msvc/README.md
index ac7bf01e07..083ac8dc7a 100644
--- a/win10-msvc/README.md
+++ b/win10-msvc/README.md
@@ -259,7 +259,14 @@ result actually needs, with the values the Bazel build 
compiles and runs at:
 | | dmake (`wntmsci11.mk`, `wntmscx.mk`) and gbuild (`platform/windows.mk`) |
 | --- | --- |
 | `WINVER`, `_WIN32_WINNT` | `0x0601` (Windows 7) |
-| `_WIN32_IE` | `0x0800`, the value the SDK derives from `0x0601` |
+| `_WIN32_IE` | not set — the SDK derives it per translation unit (`0x0800` at 
`0x0601`) |
+
+Not setting `_WIN32_IE` is load-bearing, and it is what the Bazel build does
+too. `sal/systools/win32/uwinapi`'s `CopyFileEx{A,W}.cpp` define
+`_WIN32_WINNT 0x0400` themselves, and the SDK rejects an NT4 `_WIN32_WINNT`
+next to an IE above 6.0 SP1 (`sdkddkver.h`: C1189 "_WIN32_WINNT settings
+conflicts with _WIN32_IE setting"); a derived value follows whatever the file
+ends up with.
 
 The floor is in the base files, not in `wntmsc14.mk`: there is no VC9 build of
 trunk left for a conditional to protect, so the "VC9 stays byte-identical"

Reply via email to