diff options
author | Andy Getz <durandal@google.com> | 2019-11-15 17:30:15 -0500 |
---|---|---|
committer | Andy Getz <durandal@google.com> | 2019-11-15 17:30:15 -0500 |
commit | c27acebba3b3c7d94209e0467b0a801db4af73ed (patch) | |
tree | 46b657f8ede311e592993367da9b1be55d9b416d | |
parent | f73898f3ffd4005de534edec1139387457d5853c (diff) | |
parent | 5f92697d46aefb319a55ec382107d7c89c81d213 (diff) | |
download | googletest-c27acebba3b3c7d94209e0467b0a801db4af73ed.tar.gz googletest-c27acebba3b3c7d94209e0467b0a801db4af73ed.tar.bz2 googletest-c27acebba3b3c7d94209e0467b0a801db4af73ed.zip |
Merge pull request #2521 from Sinclair-John:master
PiperOrigin-RevId: 280666222
-rw-r--r-- | googletest/src/gtest.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/googletest/src/gtest.cc b/googletest/src/gtest.cc index 8afb070d..f079fd4b 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 |