config.hpp 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. #ifndef BOOST_SYSTEM_DETAIL_CONFIG_HPP_INCLUDED
  2. #define BOOST_SYSTEM_DETAIL_CONFIG_HPP_INCLUDED
  3. // Copyright 2018-2022 Peter Dimov
  4. //
  5. // Distributed under the Boost Software License, Version 1.0. (See accompanying
  6. // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  7. //
  8. // See http://www.boost.org/libs/system for documentation.
  9. #include <boost/config.hpp>
  10. #include <boost/config/workaround.hpp>
  11. // BOOST_SYSTEM_HAS_SYSTEM_ERROR
  12. #if !defined(BOOST_NO_CXX11_HDR_SYSTEM_ERROR) && !defined(BOOST_NO_CXX11_HDR_ATOMIC)
  13. # define BOOST_SYSTEM_HAS_SYSTEM_ERROR
  14. #endif
  15. // BOOST_SYSTEM_NOEXCEPT
  16. // Retained for backward compatibility
  17. #define BOOST_SYSTEM_NOEXCEPT BOOST_NOEXCEPT
  18. // BOOST_SYSTEM_HAS_CONSTEXPR
  19. #if !defined(BOOST_NO_CXX14_CONSTEXPR)
  20. # define BOOST_SYSTEM_HAS_CONSTEXPR
  21. #endif
  22. #if BOOST_WORKAROUND(BOOST_GCC, < 60000)
  23. # undef BOOST_SYSTEM_HAS_CONSTEXPR
  24. #endif
  25. #if defined(BOOST_SYSTEM_HAS_CONSTEXPR)
  26. # define BOOST_SYSTEM_CONSTEXPR constexpr
  27. #else
  28. # define BOOST_SYSTEM_CONSTEXPR
  29. #endif
  30. // BOOST_SYSTEM_DEPRECATED
  31. #if defined(__clang__)
  32. # define BOOST_SYSTEM_DEPRECATED(msg) __attribute__((deprecated(msg)))
  33. #elif defined(__GNUC__)
  34. # if __GNUC__ * 100 + __GNUC_MINOR__ >= 405
  35. # define BOOST_SYSTEM_DEPRECATED(msg) __attribute__((deprecated(msg)))
  36. # else
  37. # define BOOST_SYSTEM_DEPRECATED(msg) __attribute__((deprecated))
  38. # endif
  39. #elif defined(_MSC_VER)
  40. # define BOOST_SYSTEM_DEPRECATED(msg) __declspec(deprecated(msg))
  41. #elif defined(__sun)
  42. # define BOOST_SYSTEM_DEPRECATED(msg) __attribute__((deprecated(msg)))
  43. #else
  44. # define BOOST_SYSTEM_DEPRECATED(msg)
  45. #endif
  46. // BOOST_SYSTEM_CLANG_6
  47. #if defined(__clang__) && (__clang_major__ < 7 || (defined(__APPLE__) && __clang_major__ < 11))
  48. # define BOOST_SYSTEM_CLANG_6
  49. #endif
  50. //
  51. #if defined(BOOST_LIBSTDCXX_VERSION) && BOOST_LIBSTDCXX_VERSION < 50000
  52. # define BOOST_SYSTEM_AVOID_STD_GENERIC_CATEGORY
  53. #endif
  54. #if defined(__CYGWIN__) || defined(__MINGW32__) || (defined(_MSC_VER) && _MSC_VER == 1800) || (defined(BOOST_LIBSTDCXX_VERSION) && BOOST_LIBSTDCXX_VERSION < 90000)
  55. // Under Cygwin (and MinGW!), std::system_category() is POSIX
  56. // Under VS2013, std::system_category() isn't quite right
  57. // Under libstdc++ before 7.4, before 8.3, before 9.1, default_error_condition
  58. // for the system category returns a condition from the system category
  59. # define BOOST_SYSTEM_AVOID_STD_SYSTEM_CATEGORY
  60. #endif
  61. #endif // BOOST_SYSTEM_DETAIL_CONFIG_HPP_INCLUDED