From c19cbc189236d445ac5113ec8d4244ce4187e522 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Wed, 14 Nov 2012 11:57:58 +0000 Subject: [PATCH] Merged [81128] from trunk. Fixes #7141. [SVN r81334] --- 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