summaryrefslogtreecommitdiffstats
path: root/googletest
diff options
context:
space:
mode:
authorGennadiy Civil <misterg@google.com>2018-12-05 16:44:04 (GMT)
committerGennadiy Civil <misterg@google.com>2018-12-05 16:44:05 (GMT)
commit695cf7c96249de50360a7d2951dc88eb3aea0695 (patch)
treecd5027fad4874d8bd36f51053a7977b048404ce8 /googletest
parentfe14e3030737509c2b9f9adad80ff56f80e988a2 (diff)
parent067aa4c28bb1064f16312766f1b9688942d70a15 (diff)
downloadgoogletest-695cf7c96249de50360a7d2951dc88eb3aea0695.zip
googletest-695cf7c96249de50360a7d2951dc88eb3aea0695.tar.gz
googletest-695cf7c96249de50360a7d2951dc88eb3aea0695.tar.bz2
Merge pull request #1997 from gpakosz:GTEST_IS_THREADSAFE
PiperOrigin-RevId: 224054240
Diffstat (limited to 'googletest')
-rw-r--r--googletest/include/gtest/internal/gtest-port.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/googletest/include/gtest/internal/gtest-port.h b/googletest/include/gtest/internal/gtest-port.h
index 4cd74fb..42ff5c7 100644
--- a/googletest/include/gtest/internal/gtest-port.h
+++ b/googletest/include/gtest/internal/gtest-port.h
@@ -785,13 +785,17 @@ typedef struct _RTL_CRITICAL_SECTION GTEST_CRITICAL_SECTION;
# define GTEST_HAS_SEH 0
# endif
-#define GTEST_IS_THREADSAFE \
- (GTEST_HAS_MUTEX_AND_THREAD_LOCAL_ \
- || (GTEST_OS_WINDOWS && !GTEST_OS_WINDOWS_PHONE && !GTEST_OS_WINDOWS_RT) \
- || GTEST_HAS_PTHREAD)
-
#endif // GTEST_HAS_SEH
+#ifndef GTEST_IS_THREADSAFE
+
+#define GTEST_IS_THREADSAFE \
+ (GTEST_HAS_MUTEX_AND_THREAD_LOCAL_ || \
+ (GTEST_OS_WINDOWS && !GTEST_OS_WINDOWS_PHONE && !GTEST_OS_WINDOWS_RT) || \
+ GTEST_HAS_PTHREAD)
+
+#endif // GTEST_IS_THREADSAFE
+
// GTEST_API_ qualifies all symbols that must be exported. The definitions below
// are guarded by #ifndef to give embedders a chance to define GTEST_API_ in
// gtest/internal/custom/gtest-port.h