[Mingw-w64-public] [PATCH] headers: Fix the signature of wcstok() for UCRT in string.h

2023-02-12 Thread Martin Storsjö
This was fixed in wchar.h in 7a2c4749ecbd8d99e0f0b6bcc2737dd36e4a2341 in 2021, but this function can be declared by either string.h or wchar.h - thus fix the other case to be consistent too. Signed-off-by: Martin Storsjö --- mingw-w64-headers/crt/string.h | 4 1 file changed, 4

[Mingw-w64-public] [PATCH] crt: Implement __gets_chk

2023-02-12 Thread Martin Storsjö
When a subset of ssp functions were implemented in 7478c20848f60e6238547db63d1a5bc450d468cc, only functions that were referenced with _FORTIFY_SOURCE were added. This set of functions accidentally missed __gets_chk, which we do reference if fortification is enabled. Thus, this fixes an accidental

Re: [Mingw-w64-public] [PATCH?] headers: _FORTIFY_SOURCE: Remove usage of __gets_chk() for gets()

2023-02-12 Thread Martin Storsjö
On Sun, 12 Feb 2023, Christian Franke wrote: During testing of _FORTIFY_SOURCE on current MSYS2, I found that __gets_chk() is no longer provided. The *_chk() Functions from libssp.a were apparently moved to libmingwex.a, but without __gets_chk(). Is this possibly because the FILE types of

Re: [Mingw-w64-public] [PATCH] headers: Fix ambigous declaration of the LeaseObtained and LeaseExpires fields of the IP_ADAPTER_INFO structure in iptypes.h

2023-02-12 Thread Mateusz Wajchęprzełóż
The 32-bit version of the iphlpapi.dll library (where the GetAdaptersInfo function is implemented) expects these two fields (LeaseObtained and LeaseExpires) to be 32-bit. The iptypes.h header declares these fields as time_t. time_t type in the 32-bit build can be either 32-bit or 64-bit,

Re: [Mingw-w64-public] [PATCH] headers: Fix ambigous declaration of the LeaseObtained and LeaseExpires fields of the IP_ADAPTER_INFO structure in iptypes.h

2023-02-12 Thread Biswapriyo Nath
> MSDN recommends defining the _USE_32BIT_TIME_T macro in translation units That macro is already being used in many crt headers to set correct time_t type. Would you like to explain what issue this patch fixes and how? ___ Mingw-w64-public mailing

[Mingw-w64-public] [PATCH?] headers: _FORTIFY_SOURCE: Remove usage of __gets_chk() for gets()

2023-02-12 Thread Christian Franke
During testing of _FORTIFY_SOURCE on current MSYS2, I found that __gets_chk() is no longer provided. The *_chk() Functions from libssp.a were apparently moved to libmingwex.a, but without __gets_chk(). Is this possibly because the FILE types of UCRT and MSVCRT differ? If this change was

[Mingw-w64-public] [PATCH] headers: _FORTIFY_SOURCE: Add [v]s[n]printf() for UCRT

2023-02-12 Thread Christian Franke
Still missing after this patch: [v]s[n]wprintf() for UCRT and MSVCRT. -- Regards, Christian From 7d04fa1ddd86a0d46ec3222a1e09455e4b8dd85a Mon Sep 17 00:00:00 2001 From: Christian Franke Date: Sun, 12 Feb 2023 15:24:46 +0100 Subject: [PATCH] headers: _FORTIFY_SOURCE: Add [v]s[n]printf() for

[Mingw-w64-public] [PATCH] headers: Fix ambigous declaration of the LeaseObtained and LeaseExpires fields of the IP_ADAPTER_INFO structure in iptypes.h

2023-02-12 Thread Mateusz Wajchęprzełóż
The LeaseObtained and LeaseExpires fields of the IP_ADAPTER_INFO structure are declared as time_t, which on 32-bit target can be either 32-bit or 64-bit, but the 32-bit version of the GetAdaptersInfo function requires these fields to be 32-bit. MSDN recommends defining the _USE_32BIT_TIME_T macro