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/smart_ptr/detail/sp_has_gcc_intrinsics.hpp> |
21 | #include <boost/smart_ptr/detail/sp_has_sync_intrinsics.hpp> |
22 | #include <boost/config.hpp> |
23 | |
24 | #if defined( BOOST_SP_DISABLE_THREADS ) |
25 | # include <boost/smart_ptr/detail/sp_counted_base_nt.hpp> |
26 | |
27 | #elif defined( BOOST_SP_USE_STD_ATOMIC ) |
28 | # include <boost/smart_ptr/detail/sp_counted_base_std_atomic.hpp> |
29 | |
30 | #elif defined( BOOST_SP_USE_SPINLOCK ) |
31 | # include <boost/smart_ptr/detail/sp_counted_base_spin.hpp> |
32 | |
33 | #elif defined( BOOST_SP_USE_PTHREADS ) |
34 | # include <boost/smart_ptr/detail/sp_counted_base_pt.hpp> |
35 | |
36 | #elif defined( BOOST_DISABLE_THREADS ) && !defined( BOOST_SP_ENABLE_THREADS ) && !defined( BOOST_DISABLE_WIN32 ) |
37 | # include <boost/smart_ptr/detail/sp_counted_base_nt.hpp> |
38 | |
39 | #elif defined( BOOST_SP_HAS_GCC_INTRINSICS ) |
40 | # include <boost/smart_ptr/detail/sp_counted_base_gcc_atomic.hpp> |
41 | |
42 | #elif !defined( BOOST_NO_CXX11_HDR_ATOMIC ) |
43 | # include <boost/smart_ptr/detail/sp_counted_base_std_atomic.hpp> |
44 | |
45 | #elif defined( __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 ) |
46 | # include <boost/smart_ptr/detail/sp_counted_base_sync.hpp> |
47 | |
48 | #elif defined( __GNUC__ ) && ( defined( __i386__ ) || defined( __x86_64__ ) ) && !defined(__PATHSCALE__) |
49 | # include <boost/smart_ptr/detail/sp_counted_base_gcc_x86.hpp> |
50 | |
51 | #elif defined( BOOST_SP_HAS_SYNC_INTRINSICS ) |
52 | # include <boost/smart_ptr/detail/sp_counted_base_sync.hpp> |
53 | |
54 | #elif defined( __SNC__ ) |
55 | # include <boost/smart_ptr/detail/sp_counted_base_snc_ps3.hpp> |
56 | |
57 | #elif defined(__HP_aCC) && defined(__ia64) |
58 | # include <boost/smart_ptr/detail/sp_counted_base_acc_ia64.hpp> |
59 | |
60 | #elif defined( __GNUC__ ) && defined( __ia64__ ) && !defined( __INTEL_COMPILER ) && !defined(__PATHSCALE__) |
61 | # include <boost/smart_ptr/detail/sp_counted_base_gcc_ia64.hpp> |
62 | |
63 | #elif defined( __IBMCPP__ ) && defined( __powerpc ) |
64 | # include <boost/smart_ptr/detail/sp_counted_base_vacpp_ppc.hpp> |
65 | |
66 | #elif defined( __MWERKS__ ) && defined( __POWERPC__ ) |
67 | # include <boost/smart_ptr/detail/sp_counted_base_cw_ppc.hpp> |
68 | |
69 | #elif defined( __GNUC__ ) && ( defined( __powerpc__ ) || defined( __ppc__ ) || defined( __ppc ) ) && !defined(__PATHSCALE__) && !defined( _AIX ) |
70 | # include <boost/smart_ptr/detail/sp_counted_base_gcc_ppc.hpp> |
71 | |
72 | #elif defined( __GNUC__ ) && ( defined( __mips__ ) || defined( _mips ) ) && !defined(__PATHSCALE__) && !defined( __mips16 ) |
73 | # include <boost/smart_ptr/detail/sp_counted_base_gcc_mips.hpp> |
74 | |
75 | #elif defined(__GNUC__) && ( defined( __sparcv9 ) || ( defined( __sparcv8 ) && ( __GNUC__ * 100 + __GNUC_MINOR__ >= 402 ) ) ) |
76 | # include <boost/smart_ptr/detail/sp_counted_base_gcc_sparc.hpp> |
77 | |
78 | #elif defined( WIN32 ) || defined( _WIN32 ) || defined( __WIN32__ ) || defined(__CYGWIN__) |
79 | # include <boost/smart_ptr/detail/sp_counted_base_w32.hpp> |
80 | |
81 | #elif defined( _AIX ) |
82 | # include <boost/smart_ptr/detail/sp_counted_base_aix.hpp> |
83 | |
84 | #elif !defined( BOOST_HAS_THREADS ) |
85 | # include <boost/smart_ptr/detail/sp_counted_base_nt.hpp> |
86 | |
87 | #else |
88 | # include <boost/smart_ptr/detail/sp_counted_base_spin.hpp> |
89 | |
90 | #endif |
91 | |
92 | #endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_HPP_INCLUDED |
93 | |