-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathgtest_windows_mingw_patch.diff
More file actions
40 lines (35 loc) · 1.65 KB
/
gtest_windows_mingw_patch.diff
File metadata and controls
40 lines (35 loc) · 1.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
diff --git a/googletest/include/gtest/internal/gtest-port.h b/googletest/include/gtest/internal/gtest-port.h
index 0094ed5..d550cd4 100644
--- a/googletest/include/gtest/internal/gtest-port.h
+++ b/googletest/include/gtest/internal/gtest-port.h
@@ -604,7 +604,7 @@ struct _RTL_CRITICAL_SECTION;
|| GTEST_OS_QNX || GTEST_OS_FREEBSD || GTEST_OS_NACL)
#endif // GTEST_HAS_PTHREAD
-#if GTEST_HAS_PTHREAD
+#if GTEST_HAS_PTHREAD && !GTEST_OS_WINDOWS_MINGW
// gtest-port.h guarantees to #include <pthread.h> when GTEST_HAS_PTHREAD is
// true.
# include <pthread.h> // NOLINT
@@ -1441,7 +1441,7 @@ void SetInjectableArgvs(const ::std::vector<testing::internal::string>*
// Defines synchronization primitives.
#if GTEST_IS_THREADSAFE
-# if GTEST_HAS_PTHREAD
+#if GTEST_HAS_PTHREAD && !GTEST_OS_WINDOWS_MINGW
// Sleeps for (roughly) n milliseconds. This function is only for testing
// Google Test's own constructs. Don't use it in user tests, either
// directly or indirectly.
@@ -1458,7 +1458,7 @@ inline void SleepMilliseconds(int n) {
// Notification has already been imported into the namespace.
// Nothing to do here.
-# elif GTEST_HAS_PTHREAD
+# elif GTEST_HAS_PTHREAD && !GTEST_OS_WINDOWS_MINGW
// Allows a controller thread to pause execution of newly created
// threads until notified. Instances of this class must be created
// and destroyed in the controller thread.
@@ -1918,7 +1918,7 @@ class ThreadLocal : public ThreadLocalBase {
GTEST_DISALLOW_COPY_AND_ASSIGN_(ThreadLocal);
};
-# elif GTEST_HAS_PTHREAD
+# elif GTEST_HAS_PTHREAD && !GTEST_OS_WINDOWS_MINGW
// MutexBase and Mutex implement mutex on pthreads-based platforms.
class MutexBase {