On Thursday 19 June 2025 16:14:34 Martin Storsjö wrote: > On Sat, 24 May 2025, Pali Rohár wrote: > > > --- > > 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-crt/lib-common/msvcrt.def.in > > b/mingw-w64-crt/lib-common/msvcrt.def.in > > index ab7eeed49ce7..0de1bf54b2d0 100644 > > --- a/mingw-w64-crt/lib-common/msvcrt.def.in > > +++ b/mingw-w64-crt/lib-common/msvcrt.def.in > > @@ -1803,7 +1803,7 @@ freopen_s > > fscanf_s > > fwprintf_s > > fwscanf_s > > -getenv_s > > +F_ARM_ANY(getenv_s) ; i386 and x64 getenv_s replaced by emu > > Can you mention in which versions of msvcrt.dll the function does exist, as > it was exposed here in the .def file for all architectures beforehand? > > (This info would be useful to include in the commit message.) > > // Martin
Per mingw-w64-crt/lib-common/msvcrt.def.in comments the symbol was introduced in Windows Vista. So I would propose following commit message: Provide mingw-w64 emulation of getenv_s function for all CRT import libraries Function getenv_s() is available in msvcr80+, UCRT and also in msvcrt since Windows Vista. For other CRT libraries provides mingw-w64 emulation. _______________________________________________ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public