summaryrefslogtreecommitdiffstats
path: root/googletest
diff options
context:
space:
mode:
authorSinclair-John <dieter.gnaier@gmail.com>2019-10-18 17:36:58 (GMT)
committerSinclair-John <dieter.gnaier@gmail.com>2019-10-18 17:36:58 (GMT)
commit5f92697d46aefb319a55ec382107d7c89c81d213 (patch)
tree14d5984d69c046b2d32b75c0b6a281d958c71a62 /googletest
parentf966ed158177f2ed6ff2c402effb16f7f00ca40b (diff)
downloadgoogletest-5f92697d46aefb319a55ec382107d7c89c81d213.zip
googletest-5f92697d46aefb319a55ec382107d7c89c81d213.tar.gz
googletest-5f92697d46aefb319a55ec382107d7c89c81d213.tar.bz2
Fix Issue 2418refs/pull/2521/head
Diffstat (limited to 'googletest')
-rw-r--r--googletest/src/gtest.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/googletest/src/gtest.cc b/googletest/src/gtest.cc
index a5b4e5a..8d40a92 100644
--- a/googletest/src/gtest.cc
+++ b/googletest/src/gtest.cc
@@ -83,8 +83,11 @@
# include <windows.h> // NOLINT
# undef min
+#ifdef _MSC_VER
# include <crtdbg.h> // NOLINT
# include <debugapi.h> // NOLINT
+#endif
+
# include <io.h> // NOLINT
# include <sys/timeb.h> // NOLINT
# include <sys/types.h> // NOLINT
@@ -4908,7 +4911,6 @@ int UnitTest::Run() {
_set_abort_behavior(
0x0, // Clear the following flags:
_WRITE_ABORT_MSG | _CALL_REPORTFAULT); // pop-up window, core dump.
-# endif
// In debug mode, the Windows CRT can crash with an assertion over invalid
// input (e.g. passing an invalid file descriptor). The default handling
@@ -4919,6 +4921,7 @@ int UnitTest::Run() {
_CRTDBG_MODE_FILE | _CRTDBG_MODE_DEBUG);
(void)_CrtSetReportFile(_CRT_ASSERT, _CRTDBG_FILE_STDERR);
}
+# endif
}
#endif // GTEST_OS_WINDOWS