On Sat, 24 May 2025, Pali Rohár wrote:
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_s() which makes getopt() to work in
both normal and UWP builds.
---
mingw-w64-crt/misc/getopt.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
Other than the comment about which msvcrt.dll versions provide getenv_s, I
think this patchset looks ok to me.
// Martin
_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public