Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:52:35

0001 #ifndef BOOST_SYSTEM_DETAIL_CONFIG_HPP_INCLUDED
0002 #define BOOST_SYSTEM_DETAIL_CONFIG_HPP_INCLUDED
0003 
0004 // Copyright 2018-2022 Peter Dimov
0005 //
0006 // Distributed under the Boost Software License, Version 1.0. (See accompanying
0007 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
0008 //
0009 // See http://www.boost.org/libs/system for documentation.
0010 
0011 #include <boost/system/detail/requires_cxx11.hpp>
0012 #include <boost/config.hpp>
0013 #include <boost/config/workaround.hpp>
0014 
0015 // BOOST_SYSTEM_HAS_SYSTEM_ERROR
0016 //
0017 // The macro BOOST_SYSTEM_DISABLE_THREADS can be defined on configurations
0018 // that provide <system_error> and <atomic>, but not <mutex>, such as the
0019 // single-threaded libstdc++.
0020 //
0021 // https://github.com/boostorg/system/issues/92
0022 
0023 #if !defined(BOOST_NO_CXX11_HDR_SYSTEM_ERROR) && !defined(BOOST_NO_CXX11_HDR_ATOMIC) && ( !defined(BOOST_NO_CXX11_HDR_MUTEX) || defined(BOOST_SYSTEM_DISABLE_THREADS) )
0024 # define BOOST_SYSTEM_HAS_SYSTEM_ERROR
0025 #endif
0026 
0027 // BOOST_SYSTEM_NOEXCEPT
0028 // Retained for backward compatibility
0029 
0030 #define BOOST_SYSTEM_NOEXCEPT BOOST_NOEXCEPT
0031 
0032 // BOOST_SYSTEM_HAS_CONSTEXPR
0033 
0034 #if !defined(BOOST_NO_CXX14_CONSTEXPR)
0035 # define BOOST_SYSTEM_HAS_CONSTEXPR
0036 #endif
0037 
0038 #if BOOST_WORKAROUND(BOOST_GCC, < 60000)
0039 # undef BOOST_SYSTEM_HAS_CONSTEXPR
0040 #endif
0041 
0042 #if defined(BOOST_SYSTEM_HAS_CONSTEXPR)
0043 # define BOOST_SYSTEM_CONSTEXPR constexpr
0044 #else
0045 # define BOOST_SYSTEM_CONSTEXPR
0046 #endif
0047 
0048 // BOOST_SYSTEM_DEPRECATED
0049 
0050 #if defined(__clang__)
0051 # define BOOST_SYSTEM_DEPRECATED(msg) __attribute__((deprecated(msg)))
0052 #elif defined(__GNUC__)
0053 # if __GNUC__ * 100 + __GNUC_MINOR__ >= 405
0054 #  define BOOST_SYSTEM_DEPRECATED(msg) __attribute__((deprecated(msg)))
0055 # else
0056 #  define BOOST_SYSTEM_DEPRECATED(msg) __attribute__((deprecated))
0057 # endif
0058 #elif defined(_MSC_VER)
0059 #  define BOOST_SYSTEM_DEPRECATED(msg) __declspec(deprecated(msg))
0060 #elif defined(__sun)
0061 #  define BOOST_SYSTEM_DEPRECATED(msg) __attribute__((deprecated(msg)))
0062 #else
0063 # define BOOST_SYSTEM_DEPRECATED(msg)
0064 #endif
0065 
0066 // BOOST_SYSTEM_CLANG_6
0067 
0068 // Android NDK r18b has Clang 7.0.2 that still needs the workaround
0069 // https://github.com/boostorg/system/issues/100
0070 #if defined(__clang__) && (__clang_major__ < 7 || (defined(__APPLE__) && __clang_major__ < 11) || (defined(__ANDROID__) && __clang_major__ == 7))
0071 # define BOOST_SYSTEM_CLANG_6
0072 #endif
0073 
0074 //
0075 
0076 #if defined(BOOST_LIBSTDCXX_VERSION) && BOOST_LIBSTDCXX_VERSION < 50000
0077 # define BOOST_SYSTEM_AVOID_STD_GENERIC_CATEGORY
0078 #endif
0079 
0080 #if defined(__CYGWIN__) || defined(__MINGW32__) || (defined(_MSC_VER) && _MSC_VER == 1800) || (defined(BOOST_LIBSTDCXX_VERSION) && BOOST_LIBSTDCXX_VERSION < 90000)
0081 
0082 // Under Cygwin (and MinGW!), std::system_category() is POSIX
0083 // Under VS2013, std::system_category() isn't quite right
0084 // Under libstdc++ before 7.4, before 8.3, before 9.1, default_error_condition
0085 // for the system category returns a condition from the system category
0086 
0087 # define BOOST_SYSTEM_AVOID_STD_SYSTEM_CATEGORY
0088 #endif
0089 
0090 #endif // BOOST_SYSTEM_DETAIL_CONFIG_HPP_INCLUDED