mirror of
https://github.com/darlinghq/darling-libcxx.git
synced 2024-12-13 23:08:46 +00:00
Fix possible test breakage for MinGW
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@267968 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
59f8126f68
commit
7aa3806b8c
@ -67,16 +67,17 @@ extern "C" {
|
||||
|
||||
#ifndef __CloudABI__
|
||||
inline
|
||||
std::string
|
||||
get_temp_file_name()
|
||||
std::string get_temp_file_name()
|
||||
{
|
||||
#if defined(_WIN32) || defined(__MINGW32__)
|
||||
#if defined(__MINGW32__)
|
||||
char Path[MAX_PATH + 1];
|
||||
char FN[MAX_PATH + 1];
|
||||
do { } while (0 == GetTempPath(MAX_PATH+1, Path));
|
||||
do { } while (0 == GetTempFileName(Path, "libcxx", 0, FN));
|
||||
return FN;
|
||||
#elif defined(_WIN32)
|
||||
char Name[] = "libcxx.XXXXXX";
|
||||
|
||||
if (_mktemp_s(Name, sizeof(Name)) != 0) {
|
||||
abort();
|
||||
}
|
||||
|
||||
if (_mktemp_s(Name, sizeof(Name)) != 0) abort();
|
||||
return Name;
|
||||
#else
|
||||
std::string Name;
|
||||
|
Loading…
Reference in New Issue
Block a user