Re: [Mingw-w64-public] [PATCH 15/15] crt: msvcrt.def.in: Reorder symbols chronologically and add comments

2024-04-04 Thread Martin Storsjö
On Mon, 1 Apr 2024, Pali Rohár wrote: Library msvcrt.dll was used by Visual C++ versions 4.2 - 6.0 and is also part of the Windows system starting with NT 4.0 and 98. Currently the file msvcrt.def.in contains mix of all symbols in semi alphabetical order, with ad-hoc symbol aliases which some

Re: [Mingw-w64-public] [PATCH 12/15] crt: msvcrt.def.in: Add symbols introduced in Windows Vista I386 and X64

2024-04-04 Thread Martin Storsjö
On Mon, 1 Apr 2024, Pali Rohár wrote: --- mingw-w64-crt/lib-common/msvcrt.def.in | 136 - 1 file changed, 88 insertions(+), 48 deletions(-) diff --git a/mingw-w64-crt/lib-common/msvcrt.def.in b/mingw-w64-crt/lib-common/msvcrt.def.in index 818d5149b156..71a6efcde3c9

Re: [Mingw-w64-public] [PATCH] crt: Use LoadLibraryA() in delayimp.c for char* type

2024-04-04 Thread Martin Storsjö
On Mon, 1 Apr 2024, Pali Rohár wrote: dli.szDll is of LPCSTR type, which is always const char* (and not wchar_t*). So instead of LoadLibrary() (which may take wchar_t* if _UNICODE macro is defined by compiler) use LoadLibraryA() (which always takes char*). --- mingw-w64-crt/misc/delayimp.c | 2

Re: [Mingw-w64-public] [PATCH 01/15] crt: msvcrt.def.in: Add I386 C++ symbols

2024-04-04 Thread Martin Storsjö
On Mon, 1 Apr 2024, Pali Rohár wrote: In msvcrt.def.in file are already defined mangled C++ symbols for X64 and ARM32 versions of msvcrt.dll, so add also them for I386 version. These symbols are present in Visual C++ 4.2 version of msvcrt.dll and same set of symbols are in Visual C++ 5.0 and

Re: [Mingw-w64-public] [PATCH 12/15] crt: msvcrt.def.in: Add symbols introduced in Windows Vista I386 and X64

2024-04-04 Thread Pali Rohár
On Friday 05 April 2024 00:02:02 Martin Storsjö wrote: > On Mon, 1 Apr 2024, Pali Rohár wrote: > > > --- > > mingw-w64-crt/lib-common/msvcrt.def.in | 136 - > > 1 file changed, 88 insertions(+), 48 deletions(-) > > > > diff --git a/mingw-w64-crt/lib-common/msvcrt.def.in >

Re: [Mingw-w64-public] [PATCH 04/15] crt: msvcrt.def.in: Export _Crt* symbols also on I386 and X64

2024-04-04 Thread Martin Storsjö
On Mon, 1 Apr 2024, Pali Rohár wrote: They are present in msvcrt.dll since Windows Vista. --- mingw-w64-crt/lib-common/msvcrt.def.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mingw-w64-crt/lib-common/msvcrt.def.in b/mingw-w64-crt/lib-common/msvcrt.def.in index

Re: [Mingw-w64-public] [PATCH 06/15] crt: msvcrt.def.in: Do not export symbol wcsnlen on I386 and X64

2024-04-04 Thread Martin Storsjö
On Mon, 1 Apr 2024, Pali Rohár wrote: Symbol wcsnlen was first introduced in Windows Vista version of msvcrt.dll and mingw-w64 already provides replacement implementation in libmingwex. So always use the replacement implementation on I386 and X64 and do not export it. Also remove DATA keyword

Re: [Mingw-w64-public] [PATCH 1/3] crt: Add non-inline variant of UCRT _scprintf, _snprintf and _snscanf functions

2024-04-04 Thread Martin Storsjö
On Sat, 30 Mar 2024, Pali Rohár wrote: On Monday 25 March 2024 13:59:49 LIU Hao wrote: 在 2024-03-24 23:17, Pali Rohár 写道: I see... The problem is that inline version of that function in stdio.h conflicts with non-inline version in ucrt__scprintf.c file. One option how to avoid this problem

Re: [Mingw-w64-public] [PATCH 1/3] crt: msvcrt20.def.in: Document different msvcrt20.dll versions

2024-04-04 Thread Martin Storsjö
On Mon, 1 Apr 2024, Pali Rohár wrote: The original msvcrt20.dll version from Visual C++ 2.0 does not contain some symbols, which are present in the version from Visual C++ 2.1 Upgrade. Also Win32s version of msvcrt20.dll from Visual C++ 2.0 does not contain all symbols as full version. Follow

[Mingw-w64-public] [PATCH 2/5] crt: msvcrt.def.in: Do not export symbols unavailable on X64 since Vista

2024-04-04 Thread Pali Rohár
Symbols _getdllprocaddr, _heapadd, _heapused, _loaddll and _unloaddll are available also in Windows XP x64 but were removed in Windows Vista x64 and not present in any later Windows x64 version. So do not export these symbols for X64. --- mingw-w64-crt/lib-common/msvcrt.def.in | 10 +- 1

[Mingw-w64-public] [PATCH 1/5] crt: msvcrt.def.in: Consistently use lowercase word "replaced"

2024-04-04 Thread Pali Rohár
--- mingw-w64-crt/lib-common/msvcrt.def.in | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mingw-w64-crt/lib-common/msvcrt.def.in b/mingw-w64-crt/lib-common/msvcrt.def.in index d03b79314c12..a6f6da184274 100644 --- a/mingw-w64-crt/lib-common/msvcrt.def.in +++

[Mingw-w64-public] [PATCH 3/5] crt: msvcrt.def.in: Do not export symbol __CxxCallUnwindDelDtor on X64

2024-04-04 Thread Pali Rohár
Symbol __CxxCallUnwindDelDtor is not available in any X64 version of msvcrt.dll library. So do not export it on X64. --- mingw-w64-crt/lib-common/msvcrt.def.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mingw-w64-crt/lib-common/msvcrt.def.in

[Mingw-w64-public] [PATCH 4/5] crt: msvcrt.def.in: Move symbol tanhf to correct section

2024-04-04 Thread Pali Rohár
Symbol tanhf is available since Windows Vista x64. It is not available on any 32-bit x86 version. So move this symbol from ARM-only section into since-Vista section. --- mingw-w64-crt/lib-common/msvcrt.def.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[Mingw-w64-public] [PATCH 5/5] crt: msvcrt.def.in: Fix aliases for time related symbols on X64

2024-04-04 Thread Pali Rohár
Windows XP x64 does not provide 32-bit time functions. Those are provided on X64 systems since Windows Vista x64. Main function symbols (those without suffixes) are 64-bit on all Windows x64 systems. So remove aliasing of X64 "time" symbol to "_time64" symbol as it is not needed. Symbol