From f2334aa19555063791ec16fe2b476ec00195bbb8 Mon Sep 17 00:00:00 2001 From: "zhanyong.wan" Date: Sat, 25 Apr 2009 04:42:30 +0000 Subject: Ports gtest to minGW (by Kenton Varda). --- include/gtest/internal/gtest-port.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'include/gtest') diff --git a/include/gtest/internal/gtest-port.h b/include/gtest/internal/gtest-port.h index 48e740ba..3e178fac 100644 --- a/include/gtest/internal/gtest-port.h +++ b/include/gtest/internal/gtest-port.h @@ -60,6 +60,9 @@ // be used where std::wstring is unavailable). // GTEST_HAS_TR1_TUPLE 1 - Define it to 1/0 to indicate tr1::tuple // is/isn't available. +// GTEST_HAS_SEH - Define it to 1/0 to indicate whether the +// compiler supports Microsoft's "Structured +// Exception Handling". // This header defines the following utilities: // @@ -473,6 +476,22 @@ #define GTEST_MUST_USE_RESULT_ #endif // __GNUC__ && (GTEST_GCC_VER_ >= 30400) && !COMPILER_ICC +// Determine whether the compiler supports Microsoft's Structured Exception +// Handling. This is supported by several Windows compilers but generally +// does not exist on any other system. +#ifndef GTEST_HAS_SEH +// The user didn't tell us, so we need to figure it out. + +#if defined(_MSC_VER) || defined(__BORLANDC__) +// These two compilers are known to support SEH. +#define GTEST_HAS_SEH 1 +#else +// Assume no SEH. +#define GTEST_HAS_SEH 0 +#endif + +#endif // GTEST_HAS_SEH + namespace testing { class Message; -- cgit v1.2.3