[Mingw-w64-public] mingw-w64 new compile warning: initialized and declared extern

2025-03-22 Thread Pali Rohár
Hello, I started getting new compile warnings during compilation of mingw-w64 runtime. In file included from math/modfl.c:6: .../mingw-w64-headers/crt/fenv.h:64:39: warning: ‘__mingw_fe_dfl_env’ initialized and declared ‘extern’ extern const __MINGW_SELECTANY fenv_t __mingw_fe_dfl_env = { 0, 0 }

[Mingw-w64-public] [PATCH 01/11] crt: Remove workarounds for defining non-inline versions of inline functions

2025-03-22 Thread Martin Storsjö
We stopped providing these functions as inline in 30c0b623dbaf9dcc218c9068625f5e857aab. Signed-off-by: Martin Storsjö --- mingw-w64-crt/stdio/ucrt__snwprintf.c | 16 mingw-w64-crt/stdio/ucrt_fwprintf.c | 16 2 files changed, 32 deletions(-) diff --git a/m

[Mingw-w64-public] [PATCH] crt, headers: Use headers to redirect __ms_v*scanf functions to v*scanf functions.

2025-03-22 Thread Jacek Caban
--- mingw-w64-crt/Makefile.am| 11 ++- mingw-w64-crt/def-include/crt-aliases.def.in | 8 - mingw-w64-crt/lib-common/msvcr120_app.def.in | 1 - mingw-w64-crt/lib32/msvcr120.def.in | 1 - mingw-w64-crt/lib64/msvcr120.def.in | 1 - mingw-w64-crt/libar

[Mingw-w64-public] [PATCH v2 6/7] crt: Build with -fno-builtin.

2025-03-22 Thread Jacek Caban
mingw-w64-crt implements a number of functions that the compiler considers built-in. Currently, we must be cautious about compiler optimizations, as they may not align with our intentions. In theory, the compiler could optimize an implementation of such a function back into a call to itself. Rathe

[Mingw-w64-public] [PATCH v2 1/7] crt: Remove redundant STARTUPINFO initialization.

2025-03-22 Thread Jacek Caban
--- mingw-w64-crt/crt/crtexewin.c | 1 - 1 file changed, 1 deletion(-) diff --git a/mingw-w64-crt/crt/crtexewin.c b/mingw-w64-crt/crt/crtexewin.c index 26179fa90..af860f3e7 100644 --- a/mingw-w64-crt/crt/crtexewin.c +++ b/mingw-w64-crt/crt/crtexewin.c @@ -56,7 +56,6 @@ int _tmain (int __UNUS

[Mingw-w64-public] [PATCH v2 2/7] crt: Avoid memset calls in libsrc/ws2tcpip.

2025-03-22 Thread Jacek Caban
--- mingw-w64-crt/libsrc/ws2tcpip/in6_set_addr_loopback.c| 2 +- mingw-w64-crt/libsrc/ws2tcpip/in6_set_addr_unspecified.c | 2 +- mingw-w64-crt/libsrc/ws2tcpip/in6addr_setany.c | 5 + mingw-w64-crt/libsrc/ws2tcpip/in6addr_setloopback.c | 7 --- 4 files changed, 3 inserti

[Mingw-w64-public] [PATCH v2 7/7] crt: Implement sincos in C.

2025-03-22 Thread Jacek Caban
--- mingw-w64-crt/Makefile.am | 19 + mingw-w64-crt/math/arm-common/sincosl.c | 13 +++ mingw-w64-crt/math/arm/sincos.S | 32 mingw-w64-crt/math/arm/sincosf.S| 29 -- mingw-w64-crt/math/arm64/sincos.S | 34 ---

[Mingw-w64-public] [PATCH v2 5/7] crt: Avoid memset call in profile_ctl.

2025-03-22 Thread Jacek Caban
--- mingw-w64-crt/profile/profil.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mingw-w64-crt/profile/profil.c b/mingw-w64-crt/profile/profil.c index 0c0387136..c566bb6dd 100644 --- a/mingw-w64-crt/profile/profil.c +++ b/mingw-w64-crt/profile/profil.c @@ -185,7 +185,7 @@ pro

[Mingw-w64-public] [PATCH v2 3/7] crt: Avoid memset calls in stat functions implementation.

2025-03-22 Thread Jacek Caban
--- mingw-w64-crt/stdio/_findfirst64i32.c | 2 +- mingw-w64-crt/stdio/_findnext64i32.c | 2 +- mingw-w64-crt/stdio/_fstat64i32.c | 2 +- mingw-w64-crt/stdio/_stat.c| 4 ++-- mingw-w64-crt/stdio/_stat64i32.c | 2 +- mingw-w64-crt/stdio/_wfindfirst64i32.c | 2 +- mingw-w64-

[Mingw-w64-public] [PATCH v2 4/7] crt: Avoid memset calls in stdio format functions.

2025-03-22 Thread Jacek Caban
--- mingw-w64-crt/stdio/mingw_pformat.c | 21 +++-- mingw-w64-crt/stdio/mingw_sformat.c | 10 -- mingw-w64-crt/stdio/mingw_swformat.c | 10 +- mingw-w64-crt/stdio/mingw_vfscanf.c | 4 +--- mingw-w64-crt/stdio/mingw_vfwscanf.c | 4 +--- mingw-w64-crt/stdio/mingw

Re: [Mingw-w64-public] stat, _stat, and _stat64i32 issues

2025-03-22 Thread Lasse Collin
On 2025-03-20 Pali Rohár wrote: > On Wednesday 12 March 2025 16:33:42 Lasse Collin wrote: > > stat.h has "struct stat *" and stat64i32.c has "struct _stat64i32 > > *". On Linux and "clang -fsanitize=function", this kind of argument > > type mismatch doesn't work if the function is called indirectly