diff options
author | vladlosev <vladlosev@861a406c-534a-0410-8894-cb66d6ee9925> | 2010-07-12 19:17:22 +0000 |
---|---|---|
committer | vladlosev <vladlosev@861a406c-534a-0410-8894-cb66d6ee9925> | 2010-07-12 19:17:22 +0000 |
commit | 086932135209ddda4ed0a31265f43f446a8fd9b1 (patch) | |
tree | f64dadb88e805fec17896b19289744f03cf4a1e6 | |
parent | 3010d4da1efc1842bd1b8ac42f61172cd638ddf6 (diff) | |
download | gtest-086932135209ddda4ed0a31265f43f446a8fd9b1.tar.gz gtest-086932135209ddda4ed0a31265f43f446a8fd9b1.tar.bz2 gtest-086932135209ddda4ed0a31265f43f446a8fd9b1.tar.xz |
Fixes definitions from pthread.h used before the header inclusion.
git-svn-id: http://googletest.googlecode.com/svn/trunk@444 861a406c-534a-0410-8894-cb66d6ee9925
-rw-r--r-- | include/gtest/internal/gtest-port.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/include/gtest/internal/gtest-port.h b/include/gtest/internal/gtest-port.h index f2c80f3..0ad570a 100644 --- a/include/gtest/internal/gtest-port.h +++ b/include/gtest/internal/gtest-port.h @@ -379,6 +379,12 @@ #define GTEST_HAS_PTHREAD (GTEST_OS_LINUX || GTEST_OS_MAC) #endif // GTEST_HAS_PTHREAD +#if GTEST_HAS_PTHREAD +// gtest-port.h guarantees to #include <pthread.h> when GTEST_HAS_PTHREAD is +// true. +#include <pthread.h> +#endif + // Determines whether Google Test can use tr1/tuple. You can define // this macro to 0 to prevent Google Test from using tuple (any // feature depending on tuple with be disabled in this mode). @@ -1089,10 +1095,6 @@ class ThreadWithParam : public ThreadWithParamBase { GTEST_DISALLOW_COPY_AND_ASSIGN_(ThreadWithParam); }; -// gtest-port.h guarantees to #include <pthread.h> when GTEST_HAS_PTHREAD is -// true. -#include <pthread.h> - // MutexBase and Mutex implement mutex on pthreads-based platforms. They // are used in conjunction with class MutexLock: // |