1 #ifndef BOOST_SMART_PTR_DETAIL_SP_HAS_SYNC_HPP_INCLUDED
2 #define BOOST_SMART_PTR_DETAIL_SP_HAS_SYNC_HPP_INCLUDED
4 // MS compatible compilers support #pragma once
6 #if defined(_MSC_VER) && (_MSC_VER >= 1020)
11 // boost/smart_ptr/detail/sp_has_sync.hpp
13 // Copyright (c) 2008, 2009 Peter Dimov
15 // Distributed under the Boost Software License, Version 1.0.
16 // See accompanying file LICENSE_1_0.txt or copy at
17 // http://www.boost.org/LICENSE_1_0.txt)
19 // Defines the BOOST_SP_HAS_SYNC macro if the __sync_* intrinsics
23 #ifndef BOOST_SP_NO_SYNC
25 #if !defined( __c2__ ) && defined( __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 )
27 # define BOOST_SP_HAS_SYNC
29 #elif defined( __IBMCPP__ ) && ( __IBMCPP__ >= 1210 ) && !defined( __COMPILER_VER__ )
31 # define BOOST_SP_HAS_SYNC
33 #elif !defined( __c2__ ) && defined( __GNUC__ ) && ( __GNUC__ * 100 + __GNUC_MINOR__ >= 401 )
35 #define BOOST_SP_HAS_SYNC
37 #if defined( __arm__ ) || defined( __armel__ )
38 #undef BOOST_SP_HAS_SYNC
41 #if defined( __hppa ) || defined( __hppa__ )
42 #undef BOOST_SP_HAS_SYNC
45 #if defined( __m68k__ )
46 #undef BOOST_SP_HAS_SYNC
50 #undef BOOST_SP_HAS_SYNC
53 #if defined( __sparc__ )
54 #undef BOOST_SP_HAS_SYNC
57 #if defined( __INTEL_COMPILER ) && !defined( __ia64__ ) && ( __INTEL_COMPILER < 1110 )
58 #undef BOOST_SP_HAS_SYNC
61 #if defined(__PATHSCALE__) && ((__PATHCC__ == 4) && (__PATHCC_MINOR__ < 9))
62 #undef BOOST_SP_HAS_SYNC
67 #endif // #ifndef BOOST_SP_NO_SYNC
69 #endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_HAS_SYNC_HPP_INCLUDED