diff options
author | Billy Donahue <BillyDonahue@users.noreply.github.com> | 2016-08-24 08:15:38 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-08-24 08:15:38 -0400 |
commit | ed9d1e1ff92ce199de5ca2667a667cd0a368482a (patch) | |
tree | 456edae37d8b121f7a693b54665c0acadd688868 /googletest/test | |
parent | ec44c6c1675c25b9827aacd08c02433cccde7780 (diff) | |
parent | a138385e48ee755ab8d124d6090c05580c8e9342 (diff) | |
download | googletest-ed9d1e1ff92ce199de5ca2667a667cd0a368482a.tar.gz googletest-ed9d1e1ff92ce199de5ca2667a667cd0a368482a.tar.bz2 googletest-ed9d1e1ff92ce199de5ca2667a667cd0a368482a.zip |
Merge pull request #721 from ilmagico/fix-mingw-threads
Fix compilation of googletest with MinGW using Win32 threads
Diffstat (limited to 'googletest/test')
-rw-r--r-- | googletest/test/gtest-port_test.cc | 7 | ||||
-rw-r--r-- | googletest/test/gtest_unittest.cc | 2 |
2 files changed, 8 insertions, 1 deletions
diff --git a/googletest/test/gtest-port_test.cc b/googletest/test/gtest-port_test.cc index 6ea607bc..05f8821e 100644 --- a/googletest/test/gtest-port_test.cc +++ b/googletest/test/gtest-port_test.cc @@ -1295,9 +1295,16 @@ TEST(WindowsTypesTest, HANDLEIsVoidStar) { StaticAssertTypeEq<HANDLE, void*>(); } +#if GTEST_OS_WINDOWS_MINGW +TEST(WindowsTypesTest, _CRITICAL_SECTIONIs_CRITICAL_SECTION) { + StaticAssertTypeEq<CRITICAL_SECTION, _CRITICAL_SECTION>(); +} +#else TEST(WindowsTypesTest, CRITICAL_SECTIONIs_RTL_CRITICAL_SECTION) { StaticAssertTypeEq<CRITICAL_SECTION, _RTL_CRITICAL_SECTION>(); } +#endif + #endif // GTEST_OS_WINDOWS } // namespace internal diff --git a/googletest/test/gtest_unittest.cc b/googletest/test/gtest_unittest.cc index 88e94134..97fcd5a8 100644 --- a/googletest/test/gtest_unittest.cc +++ b/googletest/test/gtest_unittest.cc @@ -442,7 +442,7 @@ class FormatEpochTimeInMillisAsIso8601Test : public Test { // tzset() distinguishes between the TZ variable being present and empty // and not being present, so we have to consider the case of time_zone // being NULL. -#if _MSC_VER +#if _MSC_VER || GTEST_OS_WINDOWS_MINGW // ...Unless it's MSVC, whose standard library's _putenv doesn't // distinguish between an empty and a missing variable. const std::string env_var = |