Fix some non-standard parts of our test suite. Reported by STL

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@267131 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Eric Fiselier
2016-04-22 10:33:56 +00:00
parent 59f2aea750
commit 5ccbc48774
22 changed files with 45 additions and 31 deletions

View File

@@ -15,8 +15,6 @@
#ifndef PLATFORM_SUPPORT_H
#define PLATFORM_SUPPORT_H
#include <__config>
// locale names
#ifdef _WIN32
// WARNING: Windows does not support UTF-8 codepages.
@@ -54,7 +52,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string>
#if defined(_LIBCPP_MSVCRT) || defined(__MINGW32__)
#if defined(_WIN32) || defined(__MINGW32__)
#include <io.h> // _mktemp
#else
#include <unistd.h> // close
@@ -67,12 +65,12 @@ extern "C" {
}
#endif
#ifndef _LIBCPP_HAS_NO_GLOBAL_FILESYSTEM_NAMESPACE
#ifndef __CloudABI__
inline
std::string
get_temp_file_name()
{
#if defined(_LIBCPP_MSVCRT) || defined(__MINGW32__)
#if defined(_WIN32) || defined(__MINGW32__)
char Path[MAX_PATH+1];
char FN[MAX_PATH+1];
do { } while (0 == GetTempPath(MAX_PATH+1, Path));
@@ -93,6 +91,6 @@ get_temp_file_name()
return Name;
#endif
}
#endif // _LIBCPP_HAS_NO_GLOBAL_FILESYSTEM_NAMESPACE
#endif // __CloundABI__
#endif // PLATFORM_SUPPORT_H