From ae590fe2163270685ebec4ed1541d3e8e9401692 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Ho=C5=99e=C5=88ovsk=C3=BD?= Date: Mon, 30 Apr 2018 23:06:26 +0200 Subject: [PATCH] Only use tmpfile workaround for MSVC and not MinGW and friends Fixes #1270 --- include/internal/catch_output_redirect.cpp | 2 +- include/internal/catch_output_redirect.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/internal/catch_output_redirect.cpp b/include/internal/catch_output_redirect.cpp index fabf9cf1..07d4a33c 100644 --- a/include/internal/catch_output_redirect.cpp +++ b/include/internal/catch_output_redirect.cpp @@ -15,7 +15,7 @@ #include #include -#if defined(CATCH_PLATFORM_WINDOWS) +#if defined(_MSC_VER) #include //_dup and _dup2 #define dup _dup #define dup2 _dup2 diff --git a/include/internal/catch_output_redirect.h b/include/internal/catch_output_redirect.h index 121aed64..f052bd2b 100644 --- a/include/internal/catch_output_redirect.h +++ b/include/internal/catch_output_redirect.h @@ -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 };