mirror of
				https://github.com/catchorg/Catch2.git
				synced 2025-10-31 20:27:11 +01:00 
			
		
		
		
	Cygwin compatibility fixes
This commit is contained in:
		| @@ -27,6 +27,7 @@ | ||||
| // CATCH_CONFIG_VARIADIC_MACROS : are variadic macros supported? | ||||
| // CATCH_CONFIG_COUNTER : is the __COUNTER__ macro supported? | ||||
| // CATCH_CONFIG_WINDOWS_SEH : is Windows SEH supported? | ||||
| // CATCH_CONFIG_POSIX_SIGNALS : are POSIX signals supported? | ||||
| // **************** | ||||
| // Note to maintainers: if new toggles are added please document them | ||||
| // in configuration.md, too | ||||
| @@ -71,6 +72,17 @@ | ||||
|  | ||||
| #endif // __clang__ | ||||
|  | ||||
|  | ||||
| //////////////////////////////////////////////////////////////////////////////// | ||||
| // Cygwin | ||||
| #ifdef __CYGWIN__ | ||||
|  | ||||
| #   if !defined(CATCH_CONFIG_POSIX_SIGNALS) | ||||
| #       define CATCH_INTERNAL_CONFIG_NO_POSIX_SIGNALS | ||||
| #   endif | ||||
|  | ||||
| #endif // __CYGWIN__ | ||||
|  | ||||
| //////////////////////////////////////////////////////////////////////////////// | ||||
| // Borland | ||||
| #ifdef __BORLANDC__ | ||||
| @@ -253,6 +265,10 @@ | ||||
| #if defined(CATCH_INTERNAL_CONFIG_WINDOWS_SEH) && !defined(CATCH_CONFIG_NO_WINDOWS_SEH) && !defined(CATCH_CONFIG_WINDOWS_SEH) | ||||
| #   define CATCH_CONFIG_WINDOWS_SEH | ||||
| #endif | ||||
| // This is set by default, because we assume that unix compilers are posix-signal-compatible by default. | ||||
| #if !defined(CATCH_INTERNAL_CONFIG_NO_POSIX_SIGNALS) && !defined(CATCH_CONFIG_NO_POSIX_SIGNALS) && !defined(CATCH_CONFIG_POSIX_SIGNALS)  | ||||
| #   define CATCH_CONFIG_POSIX_SIGNALS | ||||
| #endif | ||||
|  | ||||
| #if !defined(CATCH_INTERNAL_SUPPRESS_PARENTHESES_WARNINGS) | ||||
| #   define CATCH_INTERNAL_SUPPRESS_PARENTHESES_WARNINGS | ||||
|   | ||||
| @@ -103,6 +103,17 @@ namespace Catch { | ||||
|  | ||||
| #else // Not Windows - assumed to be POSIX compatible ////////////////////////// | ||||
|  | ||||
| #  if !defined(CATCH_CONFIG_POSIX_SIGNALS) | ||||
|  | ||||
| namespace Catch { | ||||
|     struct FatalConditionHandler { | ||||
|         void reset() {}         | ||||
|     }; | ||||
| } | ||||
|  | ||||
|  | ||||
| #  else // CATCH_CONFIG_POSIX_SIGNALS is defined | ||||
|  | ||||
| #include <signal.h> | ||||
|  | ||||
| namespace Catch { | ||||
| @@ -183,6 +194,8 @@ namespace Catch { | ||||
|  | ||||
| } // namespace Catch | ||||
|  | ||||
| #  endif // CATCH_CONFIG_POSIX_SIGNALS | ||||
|  | ||||
| #endif // not Windows | ||||
|  | ||||
| #endif // TWOBLUECUBES_CATCH_FATAL_CONDITION_H_INCLUDED | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Martin Hořeňovský
					Martin Hořeňovský