Re: [Mingw-w64-public] Deduplicate lib32 and lib-common def files

2025-05-24 Thread Pali Rohár
On Saturday 24 May 2025 19:32:31 LIU Hao wrote: > 在 2025-5-24 18:29, Pali Rohár 写道: > > On Saturday 24 May 2025 18:25:35 LIU Hao wrote: > > > 在 2025-5-24 18:12, Pali Rohár 写道: > > > > > And it deduplicated 496 def files. What do you think about it? Just a > > > > > robotic change and can decrease n

Re: [Mingw-w64-public] getopt changes

2025-05-24 Thread Pali Rohár
On Friday 18 April 2025 22:20:42 Lasse Collin wrote: > On 2025-04-18 Pali Rohár wrote: > > On Friday 18 April 2025 21:27:06 Lasse Collin wrote: > > > On 2025-04-18 Pali Rohár wrote: > > > > On Saturday 25 January 2025 18:17:23 Lasse Collin wrote: > > > > > On 2025-01-25 Pali Rohár wrote: >

[Mingw-w64-public] [PATCH 4/4] crt: getopt: Use getenv_s() instead of getenv()

2025-05-24 Thread Pali Rohár
mingw-w64's winstorecompat provides just dummy getenv() implementation which always returns NULL. So it is not very usable for winstorecompat UWP builds. But mingw-w64's winstorecompat provides getenv_s() which returns the real environment variable content. So replace getenv() call by the getenv_

[Mingw-w64-public] [PATCH 0/4] crt: getopt: Fix POSIXLY_CORRECT

2025-05-24 Thread Pali Rohár
CRT getopt() function should use CRT's getenv function instead of WinAPI GetEnvironmentVariableW because CRT env does not have to be in sync with WinAPI (e.g. when changing 3rd argument of main() or when changing global environ variable). Usage of CRT getenv() is not suitable for UWP builds as in

[Mingw-w64-public] [PATCH 1/4] crt: Provide mingw-w64 emulation of getenv_s function for all CRT import libraries

2025-05-24 Thread Pali Rohár
--- mingw-w64-crt/Makefile.am | 2 + mingw-w64-crt/lib-common/msvcrt.def.in | 2 +- mingw-w64-crt/secapi/getenv_s.c| 61 ++ 3 files changed, 64 insertions(+), 1 deletion(-) create mode 100644 mingw-w64-crt/secapi/getenv_s.c diff --git a/mingw-w64-cr

[Mingw-w64-public] [PATCH 2/4] winstorecompat: Provide getenv_s() function

2025-05-24 Thread Pali Rohár
Implement getenv_s() via WinAPI GetEnvironmentVariableA() function. WinAPI function GetEnvironmentVariableA() is available in: Windows 8 API Sets - https://web.archive.org/web/20131207081913/http://msdn.microsoft.com/en-us/library/windows/desktop/dn505783(v=vs.85).aspx Windows 8.1 API Sets - htt

[Mingw-w64-public] [PATCH 3/4] Revert "crt: use GetEnvironmentVariableW in getopt"

2025-05-24 Thread Pali Rohár
This reverts commit 8917aca09469d45a4c0c6fe58b36a8eb5b572836. WinAPI function GetEnvironmentVariableW() should not be used in CRT code as it reads the variable from the process block, not from the CRT storage. CRT storage and process block may be out of the sync, for example when using the CRT's _

Re: [Mingw-w64-public] Deduplicate lib32 and lib-common def files

2025-05-24 Thread LIU Hao
在 2025-5-24 18:29, Pali Rohár 写道: On Saturday 24 May 2025 18:25:35 LIU Hao wrote: 在 2025-5-24 18:12, Pali Rohár 写道: And it deduplicated 496 def files. What do you think about it? Just a robotic change and can decrease number of def files which needs to be maintained. I don't have a specific o

Re: [Mingw-w64-public] Deduplicate lib32 and lib-common def files

2025-05-24 Thread Pali Rohár
On Saturday 24 May 2025 18:25:35 LIU Hao wrote: > 在 2025-5-24 18:12, Pali Rohár 写道: > > > And it deduplicated 496 def files. What do you think about it? Just a > > > robotic change and can decrease number of def files which needs to be > > > maintained. > > I don't have a specific opinion on this

Re: [Mingw-w64-public] Deduplicate lib32 and lib-common def files

2025-05-24 Thread Pali Rohár
Any opinion? On Sunday 18 May 2025 14:21:40 Pali Rohár wrote: > Hello, what do you think about doing one-time automatic deduplication of > lib32 and lib-common def files? > > Since commit cf211ae90565ff02e78c93d93a913501d100f30f ("crt: Remove > @ stdcall mangling when processing lib-common/*.def.

Re: [Mingw-w64-public] [PATCH 1/2] crt: Introduce F_ARM_NATIVE

2025-05-24 Thread Jacek Caban via Mingw-w64-public
On 23.05.2025 19:12, Martin Storsjö wrote: On Fri, 23 May 2025, Jacek Caban via Mingw-w64-public wrote: And use it for exports not available on ARM64EC. --- mingw-w64-crt/def-include/func.def.in    | 9 ++--- .../lib-common/api-ms-win-crt-math-l1-1-0.def.in | 2 +- min

Re: [Mingw-w64-public] Deduplicate lib32 and lib-common def files

2025-05-24 Thread LIU Hao
在 2025-5-24 18:12, Pali Rohár 写道: And it deduplicated 496 def files. What do you think about it? Just a robotic change and can decrease number of def files which needs to be maintained. I don't have a specific opinion on this change. Frankly speaking, I am not too happy about the characteristi

Re: [Mingw-w64-public] [PATCH 3/9] crt: exe: Invoke gcc c++ constructors after msvc c++ constructors

2025-05-24 Thread Pali Rohár
On Sunday 18 May 2025 14:57:12 Martin Storsjö wrote: > On Sun, 18 May 2025, Pali Rohár wrote: > > > On Friday 09 May 2025 18:07:22 Pali Rohár wrote: > > > On Tuesday 06 May 2025 19:59:31 Martin Storsjö wrote: > > > > On Thu, 17 Apr 2025, Pali Rohár wrote: > > > > > > > > > Function __main() is fu