From 5713381d060e94647d110227e2943c0aa9951401 Mon Sep 17 00:00:00 2001 From: philsquared Date: Thu, 1 Feb 2018 16:14:12 +0000 Subject: [PATCH] Fixes for cygwin --- include/internal/catch_debugger.h | 5 ++++- include/internal/catch_fatal_condition.cpp | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/include/internal/catch_debugger.h b/include/internal/catch_debugger.h index 6ca6a539..75419842 100644 --- a/include/internal/catch_debugger.h +++ b/include/internal/catch_debugger.h @@ -40,7 +40,10 @@ namespace Catch { #ifdef CATCH_TRAP #define CATCH_BREAK_INTO_DEBUGGER() if( Catch::isDebuggerActive() ) { CATCH_TRAP(); } #else - #define CATCH_BREAK_INTO_DEBUGGER() (void)0, 0 + namespace Catch { + inline void doNothing() {} + } + #define CATCH_BREAK_INTO_DEBUGGER() Catch::doNothing() #endif #endif // TWOBLUECUBES_CATCH_DEBUGGER_H_INCLUDED diff --git a/include/internal/catch_fatal_condition.cpp b/include/internal/catch_fatal_condition.cpp index 0fa09f26..55ee539d 100644 --- a/include/internal/catch_fatal_condition.cpp +++ b/include/internal/catch_fatal_condition.cpp @@ -17,12 +17,14 @@ # pragma GCC diagnostic ignored "-Wmissing-field-initializers" #endif +#if (defined(CATCH_PLATFORM_WINDOWS) && defined(CATCH_CONFIG_WINDOWS_SEH)) || defined(CATCH_CONFIG_POSIX_SIGNALS) namespace { // Report the error condition void reportFatal( char const * const message ) { Catch::getCurrentContext().getResultCapture()->handleFatalErrorCondition( message ); } } +#endif #if defined ( CATCH_PLATFORM_WINDOWS ) /////////////////////////////////////////