Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r80078 - trunk/boost/thread/pthread
From: vicente.botet_at_[hidden]
Date: 2012-08-18 10:43:06


Author: viboes
Date: 2012-08-18 10:43:06 EDT (Sat, 18 Aug 2012)
New Revision: 80078
URL: http://svn.boost.org/trac/boost/changeset/80078

Log:
Thread: try to fix 5752
Text files modified:
   trunk/boost/thread/pthread/once.hpp | 9 ++++++++-
   1 files changed, 8 insertions(+), 1 deletions(-)

Modified: trunk/boost/thread/pthread/once.hpp
==============================================================================
--- trunk/boost/thread/pthread/once.hpp (original)
+++ trunk/boost/thread/pthread/once.hpp 2012-08-18 10:43:06 EDT (Sat, 18 Aug 2012)
@@ -17,6 +17,7 @@
 #include <boost/thread/pthread/pthread_mutex_scoped_lock.hpp>
 #include <boost/cstdint.hpp>
 #include <boost/thread/detail/delete.hpp>
+#include <csignal>
 
 #include <boost/config/abi_prefix.hpp>
 
@@ -27,8 +28,14 @@
 
   namespace thread_detail
   {
+#ifdef SIG_ATOMIC_MAX
+ typedef sig_atomic_t uintmax_atomic_t;
+ #define BOOST_THREAD_DETAIL_UINTMAX_ATOMIC_MAX_C SIG_ATOMIC_MAX
+#else
     typedef unsigned long uintmax_atomic_t;
-#define BOOST_THREAD_DETAIL_UINTMAX_ATOMIC_C(value) value##ul
+ #define BOOST_THREAD_DETAIL_UINTMAX_ATOMIC_C2(value) value##ul
+ #define BOOST_THREAD_DETAIL_UINTMAX_ATOMIC_MAX_C BOOST_THREAD_DETAIL_UINTMAX_ATOMIC_C2(~0)
+#endif
   }
 
 #ifdef BOOST_THREAD_PROVIDES_ONCE_CXX11


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk