sp_has_sync.hpp 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. #ifndef BOOST_SMART_PTR_DETAIL_SP_HAS_SYNC_HPP_INCLUDED
  2. #define BOOST_SMART_PTR_DETAIL_SP_HAS_SYNC_HPP_INCLUDED
  3. // MS compatible compilers support #pragma once
  4. #if defined(_MSC_VER) && (_MSC_VER >= 1020)
  5. # pragma once
  6. #endif
  7. //
  8. // boost/smart_ptr/detail/sp_has_sync.hpp
  9. //
  10. // Copyright (c) 2008, 2009 Peter Dimov
  11. //
  12. // Distributed under the Boost Software License, Version 1.0.
  13. // See accompanying file LICENSE_1_0.txt or copy at
  14. // http://www.boost.org/LICENSE_1_0.txt)
  15. //
  16. // Defines the BOOST_SP_HAS_SYNC macro if the __sync_* intrinsics
  17. // are available.
  18. //
  19. #if defined(__GNUC__) && ( __GNUC__ * 100 + __GNUC_MINOR__ >= 401 )
  20. #define BOOST_SP_HAS_SYNC
  21. #if defined( __arm__ ) || defined( __armel__ )
  22. #undef BOOST_SP_HAS_SYNC
  23. #endif
  24. #if defined( __hppa ) || defined( __hppa__ )
  25. #undef BOOST_SP_HAS_SYNC
  26. #endif
  27. #if defined( __m68k__ )
  28. #undef BOOST_SP_HAS_SYNC
  29. #endif
  30. #if defined( __sparc__ )
  31. #undef BOOST_SP_HAS_SYNC
  32. #endif
  33. #if defined( __INTEL_COMPILER ) && !defined( __ia64__ )
  34. #undef BOOST_SP_HAS_SYNC
  35. #endif
  36. #endif // __GNUC__ * 100 + __GNUC_MINOR__ >= 401
  37. #endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_HAS_SYNC_HPP_INCLUDED