aboutsummaryrefslogtreecommitdiffstats
path: root/include/gtest
diff options
context:
space:
mode:
authorzhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925>2009-04-25 04:42:30 +0000
committerzhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925>2009-04-25 04:42:30 +0000
commitf2334aa19555063791ec16fe2b476ec00195bbb8 (patch)
treec5479b63622d0a54a1838a0aa735021723017612 /include/gtest
parentfa2b06c52fa3ffb1909ed8b928e106292609cfcb (diff)
downloadgoogletest-f2334aa19555063791ec16fe2b476ec00195bbb8.tar.gz
googletest-f2334aa19555063791ec16fe2b476ec00195bbb8.tar.bz2
googletest-f2334aa19555063791ec16fe2b476ec00195bbb8.zip
Ports gtest to minGW (by Kenton Varda).
Diffstat (limited to 'include/gtest')
-rw-r--r--include/gtest/internal/gtest-port.h19
1 files changed, 19 insertions, 0 deletions
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;