Only use tmpfile workaround for MSVC and not MinGW and friends

Fixes #1270
This commit is contained in:
Martin Hořeňovský 2018-04-30 23:06:26 +02:00
parent 7f791fa08f
commit ae590fe216
2 changed files with 2 additions and 2 deletions

View File

@ -15,7 +15,7 @@
#include <sstream>
#include <stdexcept>
#if defined(CATCH_PLATFORM_WINDOWS)
#if defined(_MSC_VER)
#include <io.h> //_dup and _dup2
#define dup _dup
#define dup2 _dup2

View File

@ -66,7 +66,7 @@ namespace Catch {
private:
std::FILE* m_file = nullptr;
#if defined(CATCH_PLATFORM_WINDOWS)
#if defined(_MSC_VER)
char m_buffer[L_tmpnam] = { 0 };
#endif
};