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 f67b92869476fba82395f7b2c37f5de00523887d
Author: Peter <[email protected]>
AuthorDate: Thu Nov 5 03:35:24 2026 +0100

    sal/uwinapi: build the psapi thunks with PSAPI_VERSION 1
    
    At the Windows 7 floor (_WIN32_WINNT 0x0601) psapi.h defaults to
    PSAPI_VERSION 2 and maps GetModuleFileNameExA/W to the K32 names, so the
    uwinapi thunks were defined as K32GetModuleFileNameExA/W while uwinapi.dxp
    exports the classic names: LNK2001 + LNK1120.  Pin version 1 for this
    module only; callers elsewhere keep the default and bind to kernel32.
    
    Co-Authored-By: Claude Opus 5.5 <[email protected]>
---
 main/sal/systools/win32/uwinapi/makefile.mk | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/main/sal/systools/win32/uwinapi/makefile.mk 
b/main/sal/systools/win32/uwinapi/makefile.mk
index d81a02fa02..50419c4c8d 100644
--- a/main/sal/systools/win32/uwinapi/makefile.mk
+++ b/main/sal/systools/win32/uwinapi/makefile.mk
@@ -43,6 +43,13 @@ CXXFLAGS+= $(LFS_CFLAGS)
 CFLAGSCXX+=-Wno-unused-parameter -Wno-return-type
 .ENDIF
 
+# The thunks define the psapi entry points under their classic names, which
+# uwinapi.dxp exports.  From _WIN32_WINNT 0x0601 on psapi.h defaults to
+# PSAPI_VERSION 2 and maps GetModuleFileNameExA/W to K32GetModuleFileNameExA/W,
+# so the definitions would land under the K32 names and the export would not
+# resolve (LNK2001).  Callers elsewhere keep the default and bind to kernel32.
+CDEFS+=-DPSAPI_VERSION=1
+
 .IF "$(COMEX)"=="9"
 .IF "$(PSDK_HOME)"!=""
 # Since the 02/2003 PSDK the "new" linker is needed here.

Reply via email to