summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBilly Donahue <BillyDonahue@users.noreply.github.com>2016-09-07 18:48:12 (GMT)
committerGitHub <noreply@github.com>2016-09-07 18:48:12 (GMT)
commit48ee8e98abc950abd8541e15550b18f8f6cfb3a9 (patch)
tree7783eecaaf18e73d329c9a7cf42fd480b55734a8
parented9d1e1ff92ce199de5ca2667a667cd0a368482a (diff)
parentd8fe70f477d8a99745b69f7650f75eacf96866f9 (diff)
downloadgoogletest-48ee8e98abc950abd8541e15550b18f8f6cfb3a9.zip
googletest-48ee8e98abc950abd8541e15550b18f8f6cfb3a9.tar.gz
googletest-48ee8e98abc950abd8541e15550b18f8f6cfb3a9.tar.bz2
Merge pull request #856 from KindDragon/mingw-appveyor
Fix Mingw-w64 build
-rw-r--r--googletest/include/gtest/internal/gtest-port.h2
-rw-r--r--googletest/test/gtest-port_test.cc2
2 files changed, 2 insertions, 2 deletions
diff --git a/googletest/include/gtest/internal/gtest-port.h b/googletest/include/gtest/internal/gtest-port.h
index 92f4c11..860aaaf 100644
--- a/googletest/include/gtest/internal/gtest-port.h
+++ b/googletest/include/gtest/internal/gtest-port.h
@@ -396,7 +396,7 @@
# include <io.h>
# endif
// In order to avoid having to include <windows.h>, use forward declaration
-#if GTEST_OS_WINDOWS_MINGW
+#if GTEST_OS_WINDOWS_MINGW && !defined(__MINGW64_VERSION_MAJOR)
// MinGW defined _CRITICAL_SECTION and _RTL_CRITICAL_SECTION as two
// separate (equivalent) structs, instead of using typedef
typedef struct _CRITICAL_SECTION GTEST_CRITICAL_SECTION;
diff --git a/googletest/test/gtest-port_test.cc b/googletest/test/gtest-port_test.cc
index 05f8821..c5067a4 100644
--- a/googletest/test/gtest-port_test.cc
+++ b/googletest/test/gtest-port_test.cc
@@ -1295,7 +1295,7 @@ TEST(WindowsTypesTest, HANDLEIsVoidStar) {
StaticAssertTypeEq<HANDLE, void*>();
}
-#if GTEST_OS_WINDOWS_MINGW
+#if GTEST_OS_WINDOWS_MINGW && !defined(__MINGW64_VERSION_MAJOR)
TEST(WindowsTypesTest, _CRITICAL_SECTIONIs_CRITICAL_SECTION) {
StaticAssertTypeEq<CRITICAL_SECTION, _CRITICAL_SECTION>();
}