Closed stephen-sorley closed 4 years ago
@svillemot The changes look very good to me now. Before merging I'd like to get your feedback. Do you see any issues with mkdtemp on Debian platforms? Should we enable mkdtemp only for POSIX systems? Thanks a lot.
No problem for using mkdtemp()
on Debian. But you may indeed have to disable it for non-POSIX systems (for example, I don’t think it is available under MinGW).
@tbeu Any further changes that you need me to make to this?
What platforms do you support besides Windows/Linux/macOS? Apart from Windows, looks like AIX is the main one that's missing mkdtemp: http://lists.llvm.org/pipermail/llvm-dev/2010-August/034081.html
Solaris provides it, however: https://docs.oracle.com/cd/E36784_01/html/E36874/mkdtemp-3c.html
@tbeu Any further changes that you need me to make to this?
No, it all looks fine. I only was reluctant to merge since @svillemot mentioned MinGW. I need to give it one more try after I observed no issues when I tested it locally last time.
I only was reluctant to merge since @svillemot mentioned MinGW. I need to give it one more try after I observed no issues when I tested it locally last time.
I rebased (and force-pushed) your branch to confirm that it builds with MinGW.
What platforms do you support besides Windows/Linux/macOS? Apart from Windows, looks like AIX is the main one that's missing mkdtemp: http://lists.llvm.org/pipermail/llvm-dev/2010-August/034081.html
I have no chance to build on AIX. I believe we should exclude it from the two readme files, where AIX is mentioned as supported platform. OK for you?
Yeah, excluding AIX sounds good to me. I don't have any way to test on it, either.
Thanks for the pull request.
Use mkdtemp() to create a temporary directory with a unique name, then add a constant filename to the path after that. This allows us to construct a unique path without any race conditions, and without having to use mktemp().
Hopefully doing it this way avoids the issues you were having with getting mkstemp() to work in #43.