From: David Reiss Date: Wed, 11 Jun 2008 01:18:28 +0000 (+0000) Subject: Declare special mutex initializers unconditionally. X-Git-Tag: 0.2.0~669 X-Git-Url: https://source.supwisdom.com/gerrit/gitweb?a=commitdiff_plain;h=fb1c5ace0afa13d91d744080abd2dac1fbaf2911;p=common%2Fthrift.git 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. git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666495 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/lib/cpp/src/concurrency/Mutex.h b/lib/cpp/src/concurrency/Mutex.h index 7830d686..3b8631bc 100644 --- a/lib/cpp/src/concurrency/Mutex.h +++ b/lib/cpp/src/concurrency/Mutex.h @@ -28,12 +28,8 @@ class Mutex { 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: