Fixes for MinGW compatibility

Some versions of MinGW do not support enough of Win32 API to let us work
with SEH, so SEH is now MSVC only (+ configurable toggle).

Also made use of gmtime_s MSVC only (as oposed to Windows only).

Fixes #805
This commit is contained in:
Martin Hořeňovský
2017-02-06 01:43:53 +01:00
parent 7e7c813486
commit e991c006b7
4 changed files with 29 additions and 5 deletions

View File

@@ -22,10 +22,17 @@ namespace Catch {
} // namespace Catch
#if defined ( CATCH_PLATFORM_WINDOWS ) /////////////////////////////////////////
#include "catch_windows_h_proxy.h"
# if !defined ( CATCH_CONFIG_WINDOWS_SEH )
namespace Catch {
struct FatalConditionHandler {
void reset() {}
};
}
# else // CATCH_CONFIG_WINDOWS_SEH is defined
namespace Catch {
@@ -84,6 +91,8 @@ namespace Catch {
} // namespace Catch
# endif // CATCH_CONFIG_WINDOWS_SEH
#else // Not Windows - assumed to be POSIX compatible //////////////////////////
#include <signal.h>