1 #ifndef BOOST_SMART_PTR_DETAIL_SP_HAS_SYNC_INTRINSICS_HPP_INCLUDED
2 #define BOOST_SMART_PTR_DETAIL_SP_HAS_SYNC_INTRINSICS_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_intrinsics.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_INTRINSICS macro if the __sync_* intrinsics
23 #if !defined( BOOST_SP_NO_SYNC_INTRINSICS ) && !defined( BOOST_SP_NO_SYNC )
25 #if defined( __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 ) && !defined( __c2__ )
27 # define BOOST_SP_HAS_SYNC_INTRINSICS
29 #elif defined( __IBMCPP__ ) && ( __IBMCPP__ >= 1210 ) && !defined( __COMPILER_VER__ )
31 # define BOOST_SP_HAS_SYNC_INTRINSICS
33 #elif defined( __GNUC__ ) && ( __GNUC__ * 100 + __GNUC_MINOR__ >= 401 ) && !defined( __c2__ )
35 #define BOOST_SP_HAS_SYNC_INTRINSICS
37 #if defined( __arm__ ) || defined( __armel__ )
38 #undef BOOST_SP_HAS_SYNC_INTRINSICS
41 #if defined( __hppa ) || defined( __hppa__ )
42 #undef BOOST_SP_HAS_SYNC_INTRINSICS
45 #if defined( __m68k__ )
46 #undef BOOST_SP_HAS_SYNC_INTRINSICS
50 #undef BOOST_SP_HAS_SYNC_INTRINSICS
53 #if defined( __sparc__ )
54 #undef BOOST_SP_HAS_SYNC_INTRINSICS
57 #if defined( __INTEL_COMPILER ) && !defined( __ia64__ ) && ( __INTEL_COMPILER < 1110 )
58 #undef BOOST_SP_HAS_SYNC_INTRINSICS
61 #if defined(__PATHSCALE__) && ((__PATHCC__ == 4) && (__PATHCC_MINOR__ < 9))
62 #undef BOOST_SP_HAS_SYNC_INTRINSICS
67 #endif // #if !defined( BOOST_SP_NO_SYNC_INTRINSICS ) && !defined( BOOST_SP_NO_SYNC )
69 #endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_HAS_SYNC_INTRINSICS_HPP_INCLUDED