Re: [Mingw-w64-public] [PATCH 3/6] crt: Fix return type of __mingw_get_msvcrt_handle() function

2025-01-10 Thread Martin Storsjö
On Fri, 10 Jan 2025, Martin Storsjö wrote: On Wed, 8 Jan 2025, Pali Rohár wrote: Function GetModuleHandle() returns HMODULE, not HANDLE. So function __mingw_get_msvcrt_handle() has to also return HMODULE. --- mingw-w64-crt/include/msvcrt.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

Re: [Mingw-w64-public] [PATCH 1/2] crt: Fix msvcrt40.dll __(w)getmainargs() ABI for Windows XP and new

2025-01-10 Thread Martin Storsjö
On Fri, 10 Jan 2025, Pali Rohár wrote: On Friday 10 January 2025 12:32:41 Martin Storsjö wrote: On Mon, 6 Jan 2025, Pali Rohár wrote: All 32-bit Windows NT systems contains system OS library msvcrt40.dll which should be compatible with the original Visual C++ 4.0/4.1 msvcrt40.dll library. Th

Re: [Mingw-w64-public] [PATCH 5/6] crt: Replace repeated code for loading of msvcrt.dll function by common code from msvcrt_or_emu_glue.h

2025-01-10 Thread Martin Storsjö
On Fri, 10 Jan 2025, Pali Rohár wrote: On Friday 10 January 2025 16:18:38 Martin Storsjö wrote: On Wed, 8 Jan 2025, Pali Rohár wrote: --- mingw-w64-crt/misc/_create_locale.c | 25 ++- mingw-w64-crt/misc/_free_locale.c| 25 ++- mingw-w64-crt/misc/_get_current_locale.c | 32 +

Re: [Mingw-w64-public] [PATCH 1/2] crt: Fix msvcrt40.dll __(w)getmainargs() ABI for Windows XP and new

2025-01-10 Thread Pali Rohár
On Friday 10 January 2025 12:32:41 Martin Storsjö wrote: > On Mon, 6 Jan 2025, Pali Rohár wrote: > > > All 32-bit Windows NT systems contains system OS library msvcrt40.dll which > > should be compatible with the original Visual C++ 4.0/4.1 msvcrt40.dll > > library. > > > > The Windows NT implem

Re: [Mingw-w64-public] [PATCH 6/6] crt: Enable _create_locale.c, _free_locale.c and _get_current_locale.c for all pre-msvcr80 import libraries

2025-01-10 Thread Pali Rohár
On Thursday 09 January 2025 15:58:11 Jacek Caban wrote: > On 8.01.2025 21:40, Pali Rohár wrote: > > With the previous change, these 3 files can be compiled and included also > > for non-msvcrt-os import library. > > --- > > mingw-w64-crt/Makefile.am | 3 +++ > > 1 file changed, 3 insertions(+) >

Re: [Mingw-w64-public] [PATCH 5/6] crt: Replace repeated code for loading of msvcrt.dll function by common code from msvcrt_or_emu_glue.h

2025-01-10 Thread Pali Rohár
On Friday 10 January 2025 16:18:38 Martin Storsjö wrote: > On Wed, 8 Jan 2025, Pali Rohár wrote: > > > --- > > mingw-w64-crt/misc/_create_locale.c | 25 ++- > > mingw-w64-crt/misc/_free_locale.c| 25 ++- > > mingw-w64-crt/misc/_get_current_locale.c | 32 - > > mingw-w64-c

Re: [Mingw-w64-public] [PATCH 2/6] crt: Use GetModuleHandleA() in __mingw_get_msvcrt_handle()

2025-01-10 Thread Pali Rohár
On Friday 10 January 2025 15:00:01 Martin Storsjö wrote: > On Wed, 8 Jan 2025, Pali Rohár wrote: > > > This allows to get msvcrt module also on non-NT systems, on which > > GetModuleHandleW() always returns NULL. > > --- > > mingw-w64-crt/include/msvcrt.h | 2 +- > > 1 file changed, 1 insertion(+),

Re: [Mingw-w64-public] getmainargs changes

2025-01-10 Thread Pali Rohár
On Friday 10 January 2025 19:35:30 Lasse Collin wrote: > On 2025-01-04 Pali Rohár wrote: > > Interesting... What is not clear is if the research team reported this > > bug to Microsoft and if Microsoft is going to address this issue at > > some level, or at least document best practices what should

Re: [Mingw-w64-public] getmainargs changes

2025-01-10 Thread Lasse Collin
On 2025-01-04 Pali Rohár wrote: > Interesting... What is not clear is if the research team reported this > bug to Microsoft and if Microsoft is going to address this issue at > some level, or at least document best practices what should affected > applications do. There is a blog post with more de

Re: [Mingw-w64-public] [PATCH 2/6] crt: Use GetModuleHandleA() in __mingw_get_msvcrt_handle()

2025-01-10 Thread Martin Storsjö
On Wed, 8 Jan 2025, Pali Rohár wrote: This allows to get msvcrt module also on non-NT systems, on which GetModuleHandleW() always returns NULL. --- mingw-w64-crt/include/msvcrt.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mingw-w64-crt/include/msvcrt.h b/mingw-w64-crt/inc

Re: [Mingw-w64-public] [PATCH 3/6] crt: Fix return type of __mingw_get_msvcrt_handle() function

2025-01-10 Thread Martin Storsjö
On Wed, 8 Jan 2025, Pali Rohár wrote: Function GetModuleHandle() returns HMODULE, not HANDLE. So function __mingw_get_msvcrt_handle() has to also return HMODULE. --- mingw-w64-crt/include/msvcrt.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Patches 1-3 seem definitely ok with me - we

Re: [Mingw-w64-public] [PATCH] crt: Split fseeki64.c into _fseeki64.c and _ftelli64.c

2025-01-10 Thread Martin Storsjö
On Wed, 8 Jan 2025, Pali Rohár wrote: File fseeki64.c provides two functions _fseeki64() and _ftelli64(). Function _fseeki64() is available in all CRT ARM versions, including system msvcrt.dll. For x86 versions, it is available since msvcr80.dll, for system msvcrt.dll it is disabled for backward

Re: [Mingw-w64-public] [PATCH] crt: Update description about function in mingw-w64-crt/stdio/scanf.S file

2025-01-10 Thread Martin Storsjö
On Wed, 8 Jan 2025, Pali Rohár wrote: --- mingw-w64-crt/stdio/scanf.S | 33 + 1 file changed, 17 insertions(+), 16 deletions(-) LGTM, thanks! I pushed this one. // Martin ___ Mingw-w64-public mailing list Mingw-w64-pu

Re: [Mingw-w64-public] [PATCH v2] headers: Add RtlIsEcCode declaration.

2025-01-10 Thread Martin Storsjö
On Fri, 10 Jan 2025, Jacek Caban wrote: Based on patch by Billy Laws. Signed-off-by: Jacek Caban --- mingw-w64-headers/include/winnt.h | 1 + 1 file changed, 1 insertion(+) LGTM, thanks! // Martin ___ Mingw-w64-public mailing list Mingw-w64-pub

[Mingw-w64-public] [PATCH v2] headers: Add RtlIsEcCode declaration.

2025-01-10 Thread Jacek Caban
Based on patch by Billy Laws. Signed-off-by: Jacek Caban --- mingw-w64-headers/include/winnt.h | 1 + 1 file changed, 1 insertion(+) diff --git a/mingw-w64-headers/include/winnt.h b/mingw-w64-headers/include/winnt.h index 366bd807e..dcea5e79a 100644 --- a/mingw-w64-headers/include/winnt.h +++

Re: [Mingw-w64-public] [PATCH] headers: Declare RtlIsEcCode helper when building for ARM64EC

2025-01-10 Thread Jacek Caban
On 10.01.2025 12:50, Martin Storsjö wrote: It does seem to be missing from the arm32 version of kernel32.dll though. Not sure if we strictly need to add ifdefs to the .def.in to make sure it's not included in the import library there - but I think the header ifdef here could be wider, to al

Re: [Mingw-w64-public] [PATCH] headers: Declare RtlIsEcCode helper when building for ARM64EC

2025-01-10 Thread Martin Storsjö
On Fri, 10 Jan 2025, Jacek Caban wrote: On 10.01.2025 10:05, Martin Storsjö wrote: On Fri, 10 Jan 2025, Martin Storsjö wrote: On Thu, 9 Jan 2025, Jacek Caban wrote: From: Billy Laws Signed-off-by: Jacek Caban --- mingw-w64-headers/include/winnt.h | 3 +++ 1 file changed, 3 insertions(+)

Re: [Mingw-w64-public] [PATCH] headers: Declare RtlIsEcCode helper when building for ARM64EC

2025-01-10 Thread Jacek Caban
On 10.01.2025 10:05, Martin Storsjö wrote: On Fri, 10 Jan 2025, Martin Storsjö wrote: On Thu, 9 Jan 2025, Jacek Caban wrote: From: Billy Laws Signed-off-by: Jacek Caban --- mingw-w64-headers/include/winnt.h | 3 +++ 1 file changed, 3 insertions(+) This looks ok. However - we have RtlIsEc

Re: [Mingw-w64-public] [RFC PATCH 1/2] crt: Remove @ stdcall mangling when processing lib-common/*.def.in files for non-I386 builds

2025-01-10 Thread Jacek Caban
On 29.12.2024 16:35, Martin Storsjö wrote: Complexity wise, I think this bit looks acceptable to me though. I agree. Thanks, Jacek ___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/lis

Re: [Mingw-w64-public] [PATCH 2/2] crt: Fix __(w)getmainargs wrappers for msvcrt40.dll/msvcrt.dll

2025-01-10 Thread Martin Storsjö
On Mon, 6 Jan 2025, Pali Rohár wrote: Enusure that the output arguments are not changed on the library __(w)getmainargs function failure. --- mingw-w64-crt/misc/msvcrt__getmainargs.c | 13 - mingw-w64-crt/misc/msvcrt__wgetmainargs.c | 13 - 2 files changed, 16 insertions(+

Re: [Mingw-w64-public] [PATCH 1/2] crt: Fix msvcrt40.dll __(w)getmainargs() ABI for Windows XP and new

2025-01-10 Thread Martin Storsjö
On Mon, 6 Jan 2025, Pali Rohár wrote: All 32-bit Windows NT systems contains system OS library msvcrt40.dll which should be compatible with the original Visual C++ 4.0/4.1 msvcrt40.dll library. The Windows NT implementation of msvcrt40.dll is very simple, it just redirects function calls via sy

Re: [Mingw-w64-public] [PATCH] headers: Declare RtlIsEcCode helper when building for ARM64EC

2025-01-10 Thread Martin Storsjö
On Fri, 10 Jan 2025, Martin Storsjö wrote: On Thu, 9 Jan 2025, Jacek Caban wrote: From: Billy Laws Signed-off-by: Jacek Caban --- mingw-w64-headers/include/winnt.h | 3 +++ 1 file changed, 3 insertions(+) This looks ok. However - we have RtlIsEcCode available unconditionally for all arch

Re: [Mingw-w64-public] [PATCH] headers: Declare RtlIsEcCode helper when building for ARM64EC

2025-01-10 Thread Martin Storsjö
On Thu, 9 Jan 2025, Jacek Caban wrote: From: Billy Laws Signed-off-by: Jacek Caban --- mingw-w64-headers/include/winnt.h | 3 +++ 1 file changed, 3 insertions(+) This looks ok. However - we have RtlIsEcCode available unconditionally for all architectures in mingw-w64-crt/lib-common/kernel3