From 10dcb8db7c71c4bbdf8e46820722a775e29cea48 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Wed, 31 Oct 2012 20:37:21 +0000 Subject: [PATCH] Define BOOST_SP_HAS_SYNC when __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 is set. Refs #7141. [SVN r81128] --- include/boost/smart_ptr/detail/sp_has_sync.hpp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/include/boost/smart_ptr/detail/sp_has_sync.hpp b/include/boost/smart_ptr/detail/sp_has_sync.hpp index 3a1d346..16de21d 100644 --- a/include/boost/smart_ptr/detail/sp_has_sync.hpp +++ b/include/boost/smart_ptr/detail/sp_has_sync.hpp @@ -22,7 +22,15 @@ #ifndef BOOST_SP_NO_SYNC -#if defined( __GNUC__ ) && ( __GNUC__ * 100 + __GNUC_MINOR__ >= 401 ) +#if defined( __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 ) + +# define BOOST_SP_HAS_SYNC + +#elif defined( __IBMCPP__ ) && ( __IBMCPP__ >= 1210 ) + +# define BOOST_SP_HAS_SYNC + +#elif defined( __GNUC__ ) && ( __GNUC__ * 100 + __GNUC_MINOR__ >= 401 ) #define BOOST_SP_HAS_SYNC @@ -54,10 +62,6 @@ #undef BOOST_SP_HAS_SYNC #endif -#elif defined( __IBMCPP__ ) && ( __IBMCPP__ >= 1210 ) - -#define BOOST_SP_HAS_SYNC - #endif #endif // #ifndef BOOST_SP_NO_SYNC