在 2025-12-20 00:24, Pali Rohár 写道:
POSIX mkdtemp() function creates a unique temporary directory from input template string.Implementation is copied from mingw-w64-crt/misc/mkstemp.c file with replaced _sopen() call by the _mkdir() call. --- mingw-w64-crt/Makefile.am | 3 +- mingw-w64-crt/misc/mkdtemp.c | 83 ++++++++++++++++++++++++++++++++++ mingw-w64-headers/crt/stdlib.h | 1 + 3 files changed, 86 insertions(+), 1 deletion(-) create mode 100644 mingw-w64-crt/misc/mkdtemp.c diff --git a/mingw-w64-headers/crt/stdlib.h b/mingw-w64-headers/crt/stdlib.h index a53c2ecb1c51..23c653d186f6 100644 --- a/mingw-w64-headers/crt/stdlib.h +++ b/mingw-w64-headers/crt/stdlib.h @@ -355,6 +355,7 @@ _CRTIMP int __cdecl ___mb_cur_max_func(void); size_t __cdecl mbstowcs(wchar_t * __restrict__ _Dest,const char * __restrict__ _Source,size_t _MaxCount); _CRTIMP size_t __cdecl _mbstowcs_l(wchar_t * __restrict__ _Dest,const char * __restrict__ _Source,size_t _MaxCount,_locale_t _Locale); int __cdecl mkstemp(char *template_name); + char *__cdecl mkdtemp(char *template_name);
The name of this parameter has to be uglified. I will do that in a separate commit. Other than that, this patch looks good to me. Pushed now. -- Best regards, LIU Hao
OpenPGP_signature.asc
Description: OpenPGP digital signature
_______________________________________________ Mingw-w64-public mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
