在 2025-12-19 21:45, Pali Rohár 写道:
I have two ideas now:

1. Implement mkdtemp for mingw-w64 as copy of mingw-w64 mkstemp and
replacing "creating file" by "creating directory". This does not fully
address the test issue as the POSIX mkdtemp is taking template string,
which would be needed in the test to generate from GetTempPathA().

OR

2. Provide test-only function named e.g. tmpdir() available only in
mingw-w64-crt/testcases/ and its implementation would be same as
existing C89 function in mingw-w64-crt/stdio/tmpfile.c just it will
return file descriptor of newly created directory which test can use it.


You can call `CoCreateGuid()` to create a UUID and use it as the directory name.


--
Best regards,
LIU Hao

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to