forked from OSchip/llvm-project
[libcxx] [test] Fix the get_temp_file_name() function for mingw
Add the missing includes for getting the defines and functions used in the mingw version of get_temp_file_name(). This fixes 31 tests when built in a mingw configuration. Also remove a redundant ifdef; _WIN32 is defined in mingw targets too. Differential Revision: https://reviews.llvm.org/D97456
This commit is contained in:
parent
f5f3a59837
commit
d07e5c23b4
|
@ -56,8 +56,10 @@
|
||||||
#include <codecvt>
|
#include <codecvt>
|
||||||
#include <locale>
|
#include <locale>
|
||||||
#include <string>
|
#include <string>
|
||||||
#if defined(_WIN32) || defined(__MINGW32__)
|
#if defined(_WIN32)
|
||||||
|
# define WIN32_LEAN_AND_MEAN // Reduce overhead of including windows.h
|
||||||
# include <io.h> // _mktemp_s
|
# include <io.h> // _mktemp_s
|
||||||
|
# include <windows.h> // MAX_PATH, GetTempPath, GetTempFileName
|
||||||
#else
|
#else
|
||||||
# include <unistd.h> // close
|
# include <unistd.h> // close
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue