sp_counted_base.hpp 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_HPP_INCLUDED
  2. #define BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_HPP_INCLUDED
  3. // MS compatible compilers support #pragma once
  4. #if defined(_MSC_VER) && (_MSC_VER >= 1020)
  5. # pragma once
  6. #endif
  7. //
  8. // detail/sp_counted_base.hpp
  9. //
  10. // Copyright 2005, 2006 Peter Dimov
  11. //
  12. // Distributed under the Boost Software License, Version 1.0. (See
  13. // accompanying file LICENSE_1_0.txt or copy at
  14. // http://www.boost.org/LICENSE_1_0.txt)
  15. //
  16. #include <boost/config.hpp>
  17. #include <boost/smart_ptr/detail/sp_has_sync.hpp>
  18. #if defined( BOOST_SP_DISABLE_THREADS )
  19. # include <boost/smart_ptr/detail/sp_counted_base_nt.hpp>
  20. #elif defined( BOOST_SP_USE_SPINLOCK )
  21. # include <boost/smart_ptr/detail/sp_counted_base_spin.hpp>
  22. #elif defined( BOOST_SP_USE_PTHREADS )
  23. # include <boost/smart_ptr/detail/sp_counted_base_pt.hpp>
  24. #elif defined( BOOST_DISABLE_THREADS ) && !defined( BOOST_SP_ENABLE_THREADS ) && !defined( BOOST_DISABLE_WIN32 )
  25. # include <boost/smart_ptr/detail/sp_counted_base_nt.hpp>
  26. #elif defined( __GNUC__ ) && ( defined( __i386__ ) || defined( __x86_64__ ) )
  27. # include <boost/smart_ptr/detail/sp_counted_base_gcc_x86.hpp>
  28. #elif defined( __GNUC__ ) && defined( __ia64__ ) && !defined( __INTEL_COMPILER )
  29. # include <boost/smart_ptr/detail/sp_counted_base_gcc_ia64.hpp>
  30. #elif defined(__HP_aCC) && defined(__ia64)
  31. # include <boost/smart_ptr/detail/sp_counted_base_acc_ia64.hpp>
  32. #elif defined( __MWERKS__ ) && defined( __POWERPC__ )
  33. # include <boost/smart_ptr/detail/sp_counted_base_cw_ppc.hpp>
  34. #elif defined( __GNUC__ ) && ( defined( __powerpc__ ) || defined( __ppc__ ) || defined( __ppc ) )
  35. # include <boost/smart_ptr/detail/sp_counted_base_gcc_ppc.hpp>
  36. #elif defined( __GNUC__ ) && ( defined( __mips__ ) || defined( _mips ) )
  37. # include <boost/smart_ptr/detail/sp_counted_base_gcc_mips.hpp>
  38. #elif defined( BOOST_SP_HAS_SYNC )
  39. # include <boost/smart_ptr/detail/sp_counted_base_sync.hpp>
  40. #elif defined(__GNUC__) && ( defined( __sparcv9 ) || ( defined( __sparcv8 ) && ( __GNUC__ * 100 + __GNUC_MINOR__ >= 402 ) ) )
  41. # include <boost/smart_ptr/detail/sp_counted_base_gcc_sparc.hpp>
  42. #elif defined( WIN32 ) || defined( _WIN32 ) || defined( __WIN32__ ) || defined(__CYGWIN__)
  43. # include <boost/smart_ptr/detail/sp_counted_base_w32.hpp>
  44. #elif !defined( BOOST_HAS_THREADS )
  45. # include <boost/smart_ptr/detail/sp_counted_base_nt.hpp>
  46. #else
  47. # include <boost/smart_ptr/detail/sp_counted_base_spin.hpp>
  48. #endif
  49. #endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_HPP_INCLUDED