Re: [Mingw-w64-public] [PATCH 01/10] crt: Add emulation of _get_daylight() function for pre-msvcr80 import libs

2025-08-01 Thread Martin Storsjö
On Sun, 13 Jul 2025, Pali Rohár wrote: Function _get_daylight() is available in msvcr80+ and UCRT. --- mingw-w64-crt/Makefile.am | 2 ++ mingw-w64-crt/misc/_get_daylight.c | 20 2 files changed, 22 insertions(+) create mode 100644 mingw-w64-crt/misc/_get_daylight.c

[Mingw-w64-public] [PATCH 3/4] crt: Enable 32-bit x86 kernel32.dll symbols from WinSDK thunk32.lib library

2025-08-01 Thread Pali Rohár
All those symbols are present in thunk32.lib import library which imports them from kernel32.dll runtime DLL library. --- mingw-w64-crt/lib32/kernel32.def | 130 +++ 1 file changed, 65 insertions(+), 65 deletions(-) diff --git a/mingw-w64-crt/lib32/kernel32.def b/mingw

[Mingw-w64-public] [PATCH 1/4] crt: Remove VLM symbols from 32-bit x86 kernel32.def file

2025-08-01 Thread Pali Rohár
VLM functions were introduced for DEC Alpha version of Windows 2000 and during Windows 2000 development versions stub implementations were available also in 32-bit x86 kernel32.dll library. These stubs symbols were removed in Windows 2000 RC3 version and hence no 32-bit x86 production release of Wi

[Mingw-w64-public] [PATCH 0/4] crt: Fix 32-bit x86 kernel32.def symbols

2025-08-01 Thread Pali Rohár
Few changes to fix lib32/kernel32.def file. Pali Rohár (4): crt: Remove VLM symbols from 32-bit x86 kernel32.def file crt: Comment duplicate lz32.dll symbols in 32-bit x86 kernel32.def file crt: Enable 32-bit x86 kernel32.dll symbols from WinSDK thunk32.lib library crt: Fix decorat

[Mingw-w64-public] [PATCH 2/4] crt: Comment duplicate lz32.dll symbols in 32-bit x86 kernel32.def file

2025-08-01 Thread Pali Rohár
According to MS documentation all those LZ functions from lzexpand.h header file should be linked against the lz32.dll via lz32.lib (liblz32.a in mingw): https://learn.microsoft.com/en-us/windows/win32/api/lzexpand/nf-lzexpand-lzinit MS Windows SDK Kernel32.lib import library does not export these

[Mingw-w64-public] [PATCH 4/4] crt: Fix decoration for 32-bit x86 kernel32.def InterlockedPushListSList symbol

2025-08-01 Thread Pali Rohár
Function InterlockedPushListSList() is declared mingw-w64 header file ntifs.h with fastcall calling convention and MS documentation says same: https://learn.microsoft.com/en-us/windows/win32/sync/interlockedpushlistslist Trying to compile simple code which uses InterlockedPushListSList() #inclu

Re: [Mingw-w64-public] [PATCH] crt: Make i386 _NLG_Dispatch2 and _NLG_Return symbols compatible with msvc

2025-08-01 Thread Pali Rohár
On Friday 01 August 2025 12:36:45 LIU Hao wrote: > 在 2025-7-6 21:44, Pali Rohár 写道: > > These two symbols _NLG_Dispatch2 and _NLG_Return are available only in > > 32-bit x86 crt dll libraries, starting in msvcr80.dll. > > > > msvc import library msvcrt.lib from the beginning since Visual C++ 2005

Re: [Mingw-w64-public] Deduplicate lib32 and lib-common def files

2025-08-01 Thread Pali Rohár
On Thursday 31 July 2025 15:55:25 Martin Storsjö wrote: > On Sun, 20 Jul 2025, Pali Rohár wrote: > > > On Saturday 28 June 2025 16:20:46 LIU Hao wrote: > > > 在 2025-6-28 05:12, Pali Rohár 写道: > > > > > > > > So is the idea of deduplicating lib32 and lib-common def files > > > > abandoned? Or is t

Re: [Mingw-w64-public] [PATCH] headers: Deduplicate *wprintf/*wscanf functions across UCRT/msvcrt builds

2025-08-01 Thread Pali Rohár
On Thursday 31 July 2025 16:21:26 Martin Storsjö wrote: > On Sun, 13 Jul 2025, Pali Rohár wrote: > > > All these functions have same declarations in #ifdef _UCRT and #else > > blocks. The only difference is that in non-UCRT block functions vfwscanf, > > vswscanf and vwscanf are declared without __

Re: [Mingw-w64-public] [PATCH 1/2] crt: Fix LTO -Ofast compilation

2025-08-01 Thread Pali Rohár
On Thursday 31 July 2025 16:02:20 Martin Storsjö wrote: > On Sun, 20 Jul 2025, Pali Rohár wrote: > > > On Thursday 17 July 2025 22:08:41 Pali Rohár wrote: > > > When mingw-w64 is compiled with LTO support (-flto and -ffat-lto-objects > > > in > > > CFLAGS and LDFLAGS) then compiling any applicati

Re: [Mingw-w64-public] [PATCH] crt: Fix the size passed to _vsnwprintf in emu__vscwprintf

2025-08-01 Thread Martin Storsjö
On Thu, 31 Jul 2025, Jacek Caban via Mingw-w64-public wrote: On 31.07.2025 14:32, Martin Storsjö wrote: The parameter to _vsnwprintf is a number of wchar_t's, not a number of bytes. Reported-by: Julien Vary --- mingw-w64-crt/stdio/_vscwprintf.c | 2 +- 1 file changed, 1 insertion(+), 1 dele