On Mon, 19 Jan 2026, LIU Hao wrote:

在 2026-1-19 05:58, Martin Storsjö 写道:
Concretely, with current busybox code, it wouldn't work as is, because their platform.h actively undefs HAVE_MKDTEMP on this platform: https://github.com/rmyorston/busybox-w32/blob/master/include/ platform.h#L470-L475

But overall, if this is how mingw-w64 headers are going to be in the future, then busybox-w32 probably will need to adapt to it in some way. I guess it's just up to us to see if that can be done in some good enough way (so that it works with both older and newer headers), or if we should revert this to ease things for them. (In this case, the main desire for the function was for our own testcases, right?)

Maybe we can rename it to `_mkdtemp` for now.

That's also a possibility - it avoids this issue for now, and lets us use it in our testcases still.

But from the public API of mingw-w64, it feels a bit pointless, as there's no existing precedent for that function name (neither Microsoft, nor the C standard or POSIX) - so having it doesn't really help portability for any existing piece of code.

The current most acceptable suggestion for busybox is to just keep the replacement function if "__MINGW64_VERSION_MAJOR < 14"; that should work for the rest of git snapshots going forward - it'd only fail for older git snapshots since the last stable release. Not ideal, but probably acceptable.

I'd like to include you in the discussion at https://github.com/rmyorston/busybox-w32/issues/555, so that we hopefully can settle a direction without too much risk of conflicts if we change things on both sides, I'll CC you there.

// Martin

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

Reply via email to