Make the order of check for OS_WINDOWS|OS_CYGWIN and HAVE_PTHREAD consistent.
author <shinichiro.hamaji@gmail.com> <>
Fri, 31 Jul 2009 05:25:27 +0000 (05:25 +0000)
committer <shinichiro.hamaji@gmail.com> <>
Fri, 31 Jul 2009 05:25:27 +0000 (05:25 +0000)
git-svn-id: https://google-glog.googlecode.com/svn/trunk@70 eb4d4688-79bd-11dd-afb4-1d65580434c0

src/googletest.h

index ca5567e..c1df14e 100644 (file)
@@ -528,14 +528,7 @@ class Thread {
   virtual ~Thread() {}
 
   void SetJoinable(bool joinable) {}
-#if defined(HAVE_PTHREAD)
-  void Start() {
-    pthread_create(&th_, NULL, &Thread::InvokeThread, this);
-  }
-  void Join() {
-    pthread_join(th_, NULL);
-  }
-#elif defined(OS_WINDOWS) || defined(OS_CYGWIN)
+#if defined(OS_WINDOWS) || defined(OS_CYGWIN)
   void Start() {
     handle_ = CreateThread(NULL,
                            0,
@@ -548,6 +541,13 @@ class Thread {
   void Join() {
     WaitForSingleObject(handle_, INFINITE);
   }
+#elif defined(HAVE_PTHREAD)
+  void Start() {
+    pthread_create(&th_, NULL, &Thread::InvokeThread, this);
+  }
+  void Join() {
+    pthread_join(th_, NULL);
+  }
 #else
 # error No thread implementation.
 #endif