Re: [Mingw-w64-public] [PATCH 1/9] crt: exe: Enable per-thread locale if user asked for it

2025-05-14 Thread LIU Hao
在 2025-5-15 01:57, Martin Storsjö 写道: Sure, something like that sounds reasonable. What do you think about calling _configthreadlocale with the undocumented parameter -1 here, when we don't have any other reference for the number than "msvc's crt startup seems to do this"? I don't mind that

Re: [Mingw-w64-public] [PATCH 1/9] crt: exe: Enable per-thread locale if user asked for it

2025-05-14 Thread Martin Storsjö
On Wed, 14 May 2025, LIU Hao wrote: 在 2025-5-14 18:46, Martin Storsjö 写道: On Fri, 9 May 2025, Pali Rohár wrote: msvc has more object configuration files which are supposed to be passed to linker, and they change behavior of the startup code. Documentation: https://learn.microsoft.com/en-us/cp

Re: [Mingw-w64-public] [PATCH 1/9] crt: exe: Enable per-thread locale if user asked for it

2025-05-14 Thread LIU Hao
在 2025-5-14 18:46, Martin Storsjö 写道: On Fri, 9 May 2025, Pali Rohár wrote: msvc has more object configuration files which are supposed to be passed to linker, and they change behavior of the startup code. Documentation: https://learn.microsoft.com/en-us/cpp/c-runtime-library/link-options In w

Re: [Mingw-w64-public] [PATCH] crt: Fix missing fstat64 symbol in 64-bit msvcrt and 32-bit msvcr70/71 import libraries

2025-05-14 Thread Martin Storsjö
On Tue, 13 May 2025, Pali Rohár wrote: On 64-bit are _fstati64 and _fstat64 functions same, both uses 64-bit time_t and 64-bit off_t. On 32-bit is _fstati64 using 32-bit time_t. 64-bit msvcrt DLL library provides both native _fstati64 and _fstat64 symbols. And other 64-bit CRT DLL libraries (ms

Re: [Mingw-w64-public] [PATCH 1/9] crt: exe: Enable per-thread locale if user asked for it

2025-05-14 Thread Martin Storsjö
On Fri, 9 May 2025, Pali Rohár wrote: On Tuesday 06 May 2025 17:38:40 Martin Storsjö wrote: On Tue, 6 May 2025, Martin Storsjö wrote: On Thu, 17 Apr 2025, Pali Rohár wrote: There is missing call _configthreadlocale(-1) in pre_c_init function. Startup code from Visual C++ runtime is doing sa

Re: [Mingw-w64-public] [PATCH 2/9] crt: exe: Inline pre_c_init() and pre_cpp_init() into _CRT_INIT()

2025-05-14 Thread Martin Storsjö
On Fri, 9 May 2025, Pali Rohár wrote: On Tuesday 06 May 2025 19:58:15 Martin Storsjö wrote: On Thu, 17 Apr 2025, Pali Rohár wrote: This allows to remove the whole pre_c_init() and pre_cpp_init() functions and registration of __mingw_pcinit and __mingw_pcppinit hooks. Inlining the code allows