1 #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_HPP_INCLUDED 2 #define BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_HPP_INCLUDED 3 4 // MS compatible compilers support #pragma once 5 6 #if defined(_MSC_VER) && (_MSC_VER >= 1020) 7 # pragma once 8 #endif 9 10 // 11 // detail/sp_counted_base.hpp 12 // 13 // Copyright 2005-2013 Peter Dimov 14 // 15 // Distributed under the Boost Software License, Version 1.0. (See 16 // accompanying file LICENSE_1_0.txt or copy at 17 // http://www.boost.org/LICENSE_1_0.txt) 18 // 19 20 #include <boost/config.hpp> 21 #include <boost/smart_ptr/detail/sp_has_sync.hpp> 22 23 #if !defined( __c2__ ) && defined( __clang__ ) && defined( __has_extension ) 24 # if __has_extension( __c_atomic__ ) 25 # define BOOST_SP_HAS_CLANG_C11_ATOMICS 26 # endif 27 #endif 28 29 #if defined( BOOST_SP_DISABLE_THREADS ) 30 # include <boost/smart_ptr/detail/sp_counted_base_nt.hpp> 31 32 #elif defined( BOOST_SP_USE_STD_ATOMIC ) 33 # include <boost/smart_ptr/detail/sp_counted_base_std_atomic.hpp> 34 35 #elif defined( BOOST_SP_USE_SPINLOCK ) 36 # include <boost/smart_ptr/detail/sp_counted_base_spin.hpp> 37 38 #elif defined( BOOST_SP_USE_PTHREADS ) 39 # include <boost/smart_ptr/detail/sp_counted_base_pt.hpp> 40 41 #elif defined( BOOST_DISABLE_THREADS ) && !defined( BOOST_SP_ENABLE_THREADS ) && !defined( BOOST_DISABLE_WIN32 ) 42 # include <boost/smart_ptr/detail/sp_counted_base_nt.hpp> 43 44 #elif defined( BOOST_SP_HAS_CLANG_C11_ATOMICS ) 45 # include <boost/smart_ptr/detail/sp_counted_base_clang.hpp> 46 47 #elif !defined( BOOST_NO_CXX11_HDR_ATOMIC ) 48 # include <boost/smart_ptr/detail/sp_counted_base_std_atomic.hpp> 49 50 #elif defined( __SNC__ ) 51 # include <boost/smart_ptr/detail/sp_counted_base_snc_ps3.hpp> 52 53 #elif defined( __GNUC__ ) && ( defined( __i386__ ) || defined( __x86_64__ ) ) && !defined(__PATHSCALE__) 54 # include <boost/smart_ptr/detail/sp_counted_base_gcc_x86.hpp> 55 56 #elif defined(__HP_aCC) && defined(__ia64) 57 # include <boost/smart_ptr/detail/sp_counted_base_acc_ia64.hpp> 58 59 #elif defined( __GNUC__ ) && defined( __ia64__ ) && !defined( __INTEL_COMPILER ) && !defined(__PATHSCALE__) 60 # include <boost/smart_ptr/detail/sp_counted_base_gcc_ia64.hpp> 61 62 #elif defined( __IBMCPP__ ) && defined( __powerpc ) 63 # include <boost/smart_ptr/detail/sp_counted_base_vacpp_ppc.hpp> 64 65 #elif defined( __MWERKS__ ) && defined( __POWERPC__ ) 66 # include <boost/smart_ptr/detail/sp_counted_base_cw_ppc.hpp> 67 68 #elif defined( __GNUC__ ) && ( defined( __powerpc__ ) || defined( __ppc__ ) || defined( __ppc ) ) && !defined(__PATHSCALE__) && !defined( _AIX ) 69 # include <boost/smart_ptr/detail/sp_counted_base_gcc_ppc.hpp> 70 71 #elif defined( __GNUC__ ) && ( defined( __mips__ ) || defined( _mips ) ) && !defined(__PATHSCALE__) && !defined( __mips16 ) 72 # include <boost/smart_ptr/detail/sp_counted_base_gcc_mips.hpp> 73 74 #elif defined( BOOST_SP_HAS_SYNC ) 75 # include <boost/smart_ptr/detail/sp_counted_base_sync.hpp> 76 77 #elif defined(__GNUC__) && ( defined( __sparcv9 ) || ( defined( __sparcv8 ) && ( __GNUC__ * 100 + __GNUC_MINOR__ >= 402 ) ) ) 78 # include <boost/smart_ptr/detail/sp_counted_base_gcc_sparc.hpp> 79 80 #elif defined( WIN32 ) || defined( _WIN32 ) || defined( __WIN32__ ) || defined(__CYGWIN__) 81 # include <boost/smart_ptr/detail/sp_counted_base_w32.hpp> 82 83 #elif defined( _AIX ) 84 # include <boost/smart_ptr/detail/sp_counted_base_aix.hpp> 85 86 #elif !defined( BOOST_HAS_THREADS ) 87 # include <boost/smart_ptr/detail/sp_counted_base_nt.hpp> 88 89 #else 90 # include <boost/smart_ptr/detail/sp_counted_base_spin.hpp> 91 92 #endif 93 94 #undef BOOST_SP_HAS_CLANG_C11_ATOMICS 95 96 #endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_HPP_INCLUDED 97