]> git.saurik.com Git - wxWidgets.git/blobdiff - src/unix/threadpsx.cpp
change MSW libs directories so that libraries are shared by builds
[wxWidgets.git] / src / unix / threadpsx.cpp
index e38cdf11da0f9240ce68a6c9439ffc873119ce00..ac55f84a1fb097074b70b04049c55a606ce8c555 100644 (file)
 // headers
 // ----------------------------------------------------------------------------
 
-#ifdef __GNUG__
+#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
     #pragma implementation "thread.h"
 #endif
 
-#include "wx/defs.h"
+// for compilers that support precompilation, includes "wx.h".
+#include "wx/wxprec.h"
 
 #if wxUSE_THREADS
 
@@ -166,6 +167,12 @@ private:
     friend class wxConditionInternal;
 };
 
+#ifdef HAVE_PTHREAD_MUTEXATTR_T
+// on some systems pthread_mutexattr_settype() is not in the headers (but it is
+// in the library, otherwise we wouldn't compile this code at all)
+extern "C" int pthread_mutexattr_settype(pthread_mutexattr_t *, int);
+#endif
+
 wxMutexInternal::wxMutexInternal(wxMutexType mutexType)
 {
     int err;
@@ -179,12 +186,6 @@ wxMutexInternal::wxMutexInternal(wxMutexType mutexType)
             // portable, so try several methods
 #ifdef HAVE_PTHREAD_MUTEXATTR_T
             {
-                // on some systems pthread_mutexattr_settype() is not in the
-                // headers (but it is in the library, otherwise we wouldn't
-                // compile this code at all)
-                extern "C"
-                int pthread_mutexattr_settype(pthread_mutexattr_t *, int);
-
                 pthread_mutexattr_t attr;
                 pthread_mutexattr_init(&attr);
                 pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);