You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@thrift.apache.org by dr...@apache.org on 2008/06/11 03:18:28 UTC

svn commit: r666495 - /incubator/thrift/trunk/lib/cpp/src/concurrency/Mutex.h

Author: dreiss
Date: Tue Jun 10 18:18:28 2008
New Revision: 666495

URL: http://svn.apache.org/viewvc?rev=666495&view=rev
Log:
Declare special mutex initializers unconditionally.

We don't want to include pthread.h in Mutex.h, so we can't detect whether
the non-portable mutex initializers are defined.  Instead, we just declare
them unconditionally and only define them if they are available.
Unfortunately, this means that users will get a link error instead of a
compile error if they try to use them when they are not available.

Modified:
    incubator/thrift/trunk/lib/cpp/src/concurrency/Mutex.h

Modified: incubator/thrift/trunk/lib/cpp/src/concurrency/Mutex.h
URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/lib/cpp/src/concurrency/Mutex.h?rev=666495&r1=666494&r2=666495&view=diff
==============================================================================
--- incubator/thrift/trunk/lib/cpp/src/concurrency/Mutex.h (original)
+++ incubator/thrift/trunk/lib/cpp/src/concurrency/Mutex.h Tue Jun 10 18:18:28 2008
@@ -28,12 +28,8 @@
   virtual void unlock() const;
 
   static void DEFAULT_INITIALIZER(void*);
-#ifdef PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP
   static void ADAPTIVE_INITIALIZER(void*);
-#endif
-#ifdef PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP
   static void RECURSIVE_INITIALIZER(void*);
-#endif
 
  private: