]> git.lyx.org Git - lyx.git/blobdiff - boost/boost/detail/lwm_pthreads.hpp
* Add the iostreams and range libs to our copy of boost
[lyx.git] / boost / boost / detail / lwm_pthreads.hpp
index ba8d762826181152473bfe4201fb86aecb7eb9a4..a5bf75bde7326b015b14e046bf2d00837659d36b 100644 (file)
@@ -1,8 +1,10 @@
 #ifndef BOOST_DETAIL_LWM_PTHREADS_HPP_INCLUDED
 #define BOOST_DETAIL_LWM_PTHREADS_HPP_INCLUDED
 
-#if _MSC_VER >= 1020
-#pragma once
+// MS compatible compilers support #pragma once
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+# pragma once
 #endif
 
 //
 //
 //  Copyright (c) 2002 Peter Dimov and Multi Media Ltd.
 //
-//  Permission to copy, use, modify, sell and distribute this software
-//  is granted provided this copyright notice appears in all copies.
-//  This software is provided "as is" without express or implied
-//  warranty, and with no claim as to its suitability for any purpose.
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
 //
 
 #include <pthread.h>
@@ -37,7 +38,14 @@ public:
 
     lightweight_mutex()
     {
+
+// HPUX 10.20 / DCE has a nonstandard pthread_mutex_init
+
+#if defined(__hpux) && defined(_DECTHREADS_)
+        pthread_mutex_init(&m_, pthread_mutexattr_default);
+#else
         pthread_mutex_init(&m_, 0);
+#endif
     }
 
     ~lightweight_mutex()