diff --git a/src/catch2/internal/catch_compiler_capabilities.hpp b/src/catch2/internal/catch_compiler_capabilities.hpp index 91c28baa..314ce98b 100644 --- a/src/catch2/internal/catch_compiler_capabilities.hpp +++ b/src/catch2/internal/catch_compiler_capabilities.hpp @@ -40,6 +40,10 @@ #define CATCH_COMPILER_MSC #endif +#if defined(__MINGW32__) +#define CATCH_COMPILER_MINGW32 +#endif + #ifdef __cplusplus # if (__cplusplus >= 201402L) || (defined(_MSVC_LANG) && _MSVC_LANG >= 201402L) @@ -139,7 +143,7 @@ //////////////////////////////////////////////////////////////////////////////// // Not all Windows environments support SEH properly -#if defined(__MINGW32__) +#if defined(CATCH_COMPILER_MINGW32) # define CATCH_INTERNAL_CONFIG_NO_WINDOWS_SEH #endif diff --git a/src/catch2/internal/catch_debugger.cpp b/src/catch2/internal/catch_debugger.cpp index a07cb788..31d77725 100644 --- a/src/catch2/internal/catch_debugger.cpp +++ b/src/catch2/internal/catch_debugger.cpp @@ -108,7 +108,7 @@ return IsDebuggerPresent() != 0; } } -#elif defined(__MINGW32__) +#elif defined(CATCH_COMPILER_MINGW32) extern "C" __declspec(dllimport) int __stdcall IsDebuggerPresent(); namespace Catch { bool isDebuggerActive() { diff --git a/src/catch2/internal/catch_debugger.hpp b/src/catch2/internal/catch_debugger.hpp index b16c14ba..ca364d36 100644 --- a/src/catch2/internal/catch_debugger.hpp +++ b/src/catch2/internal/catch_debugger.hpp @@ -49,7 +49,7 @@ namespace Catch { #endif #elif defined(CATCH_COMPILER_MSC) #define CATCH_TRAP() __debugbreak() -#elif defined(__MINGW32__) +#elif defined(CATCH_COMPILER_MINGW32) extern "C" __declspec(dllimport) void __stdcall DebugBreak(); #define CATCH_TRAP() DebugBreak() #endif diff --git a/src/catch2/internal/catch_platform.hpp b/src/catch2/internal/catch_platform.hpp index 3416123a..158044e6 100644 --- a/src/catch2/internal/catch_platform.hpp +++ b/src/catch2/internal/catch_platform.hpp @@ -24,7 +24,7 @@ #elif defined(linux) || defined(__linux) || defined(__linux__) # define CATCH_PLATFORM_LINUX -#elif defined(WIN32) || defined(__WIN32__) || defined(_WIN32) || defined(CATCH_COMPILER_MSC) || defined(__MINGW32__) +#elif defined(WIN32) || defined(__WIN32__) || defined(_WIN32) || defined(CATCH_COMPILER_MSC) || defined(CATCH_COMPILER_MINGW32) # define CATCH_PLATFORM_WINDOWS #endif diff --git a/src/catch2/reporters/catch_reporter_junit.cpp b/src/catch2/reporters/catch_reporter_junit.cpp index 0d71da68..e9859e05 100644 --- a/src/catch2/reporters/catch_reporter_junit.cpp +++ b/src/catch2/reporters/catch_reporter_junit.cpp @@ -29,7 +29,7 @@ namespace Catch { std::time(&rawtime); std::tm timeInfo = {}; -#if defined (CATCH_COMPILER_MSC) || defined (__MINGW32__) +#if defined (CATCH_COMPILER_MSC) || defined (CATCH_COMPILER_MINGW32) gmtime_s(&timeInfo, &rawtime); #else gmtime_r(&rawtime, &timeInfo);