From 733b5d5ae2c5d625211e2985ac25728ac3f54883 Mon Sep 17 00:00:00 2001 From: DongHun Kwak Date: Mon, 21 Mar 2016 15:45:20 +0900 Subject: Imported Upstream version 1.58.0 Change-Id: If0072143aa26874812e0db6872e1efb10a3e5e94 Signed-off-by: DongHun Kwak --- boost/asio/detail/config.hpp | 185 +++++++++++++++++++++++++++++-------------- 1 file changed, 125 insertions(+), 60 deletions(-) (limited to 'boost/asio/detail/config.hpp') diff --git a/boost/asio/detail/config.hpp b/boost/asio/detail/config.hpp index 453f04d7a6..0f9e52d593 100644 --- a/boost/asio/detail/config.hpp +++ b/boost/asio/detail/config.hpp @@ -2,7 +2,7 @@ // detail/config.hpp // ~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -184,9 +184,15 @@ // Standard library support for system errors. # if !defined(BOOST_ASIO_DISABLE_STD_SYSTEM_ERROR) -# if defined(BOOST_ASIO_HAS_CLANG_LIBCXX) -# define BOOST_ASIO_HAS_STD_SYSTEM_ERROR 1 -# endif // defined(BOOST_ASIO_HAS_CLANG_LIBCXX) +# if defined(__clang__) +# if defined(BOOST_ASIO_HAS_CLANG_LIBCXX) +# define BOOST_ASIO_HAS_STD_SYSTEM_ERROR 1 +# elif (__cplusplus >= 201103) +# if __has_include() +# define BOOST_ASIO_HAS_STD_SYSTEM_ERROR 1 +# endif // __has_include() +# endif // (__cplusplus >= 201103) +# endif // defined(__clang__) # if defined(__GNUC__) # if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || (__GNUC__ > 4) # if defined(__GXX_EXPERIMENTAL_CXX0X__) @@ -216,6 +222,11 @@ # endif // defined(__GXX_EXPERIMENTAL_CXX0X__) # endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4) # endif // defined(__GNUC__) +# if defined(BOOST_ASIO_MSVC) +# if (_MSC_VER >= 1900) +# define BOOST_ASIO_ERROR_CATEGORY_NOEXCEPT noexcept(true) +# endif // (_MSC_VER >= 1900) +# endif // defined(BOOST_ASIO_MSVC) # if !defined(BOOST_ASIO_ERROR_CATEGORY_NOEXCEPT) # define BOOST_ASIO_ERROR_CATEGORY_NOEXCEPT # endif // !defined(BOOST_ASIO_ERROR_CATEGORY_NOEXCEPT) @@ -224,9 +235,15 @@ // Standard library support for arrays. #if !defined(BOOST_ASIO_HAS_STD_ARRAY) # if !defined(BOOST_ASIO_DISABLE_STD_ARRAY) -# if defined(BOOST_ASIO_HAS_CLANG_LIBCXX) -# define BOOST_ASIO_HAS_STD_ARRAY 1 -# endif // defined(BOOST_ASIO_HAS_CLANG_LIBCXX) +# if defined(__clang__) +# if defined(BOOST_ASIO_HAS_CLANG_LIBCXX) +# define BOOST_ASIO_HAS_STD_ARRAY 1 +# elif (__cplusplus >= 201103) +# if __has_include() +# define BOOST_ASIO_HAS_STD_ARRAY 1 +# endif // __has_include() +# endif // (__cplusplus >= 201103) +# endif // defined(__clang__) # if defined(__GNUC__) # if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 4) # if defined(__GXX_EXPERIMENTAL_CXX0X__) @@ -245,9 +262,13 @@ // Standard library support for shared_ptr and weak_ptr. #if !defined(BOOST_ASIO_HAS_STD_SHARED_PTR) # if !defined(BOOST_ASIO_DISABLE_STD_SHARED_PTR) -# if defined(BOOST_ASIO_HAS_CLANG_LIBCXX) -# define BOOST_ASIO_HAS_STD_SHARED_PTR 1 -# endif // defined(BOOST_ASIO_HAS_CLANG_LIBCXX) +# if defined(__clang__) +# if defined(BOOST_ASIO_HAS_CLANG_LIBCXX) +# define BOOST_ASIO_HAS_STD_SHARED_PTR 1 +# elif (__cplusplus >= 201103) +# define BOOST_ASIO_HAS_STD_SHARED_PTR 1 +# endif // (__cplusplus >= 201103) +# endif // defined(__clang__) # if defined(__GNUC__) # if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 4) # if defined(__GXX_EXPERIMENTAL_CXX0X__) @@ -266,9 +287,15 @@ // Standard library support for atomic operations. #if !defined(BOOST_ASIO_HAS_STD_ATOMIC) # if !defined(BOOST_ASIO_DISABLE_STD_ATOMIC) -# if defined(BOOST_ASIO_HAS_CLANG_LIBCXX) -# define BOOST_ASIO_HAS_STD_ATOMIC 1 -# endif // defined(BOOST_ASIO_HAS_CLANG_LIBCXX) +# if defined(__clang__) +# if defined(BOOST_ASIO_HAS_CLANG_LIBCXX) +# define BOOST_ASIO_HAS_STD_ATOMIC 1 +# elif (__cplusplus >= 201103) +# if __has_include() +# define BOOST_ASIO_HAS_STD_ATOMIC 1 +# endif // __has_include() +# endif // (__cplusplus >= 201103) +# endif // defined(__clang__) # if defined(__GNUC__) # if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5)) || (__GNUC__ > 4) # if defined(__GXX_EXPERIMENTAL_CXX0X__) @@ -289,9 +316,15 @@ // drafts, rather than the eventually standardised name of steady_clock. #if !defined(BOOST_ASIO_HAS_STD_CHRONO) # if !defined(BOOST_ASIO_DISABLE_STD_CHRONO) -# if defined(BOOST_ASIO_HAS_CLANG_LIBCXX) -# define BOOST_ASIO_HAS_STD_CHRONO 1 -# endif // defined(BOOST_ASIO_HAS_CLANG_LIBCXX) +# if defined(__clang__) +# if defined(BOOST_ASIO_HAS_CLANG_LIBCXX) +# define BOOST_ASIO_HAS_STD_CHRONO 1 +# elif (__cplusplus >= 201103) +# if __has_include() +# define BOOST_ASIO_HAS_STD_CHRONO 1 +# endif // __has_include() +# endif // (__cplusplus >= 201103) +# endif // defined(__clang__) # if defined(__GNUC__) # if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || (__GNUC__ > 4) # if defined(__GXX_EXPERIMENTAL_CXX0X__) @@ -329,15 +362,19 @@ // Standard library support for addressof. #if !defined(BOOST_ASIO_HAS_STD_ADDRESSOF) # if !defined(BOOST_ASIO_DISABLE_STD_ADDRESSOF) -# if defined(BOOST_ASIO_HAS_CLANG_LIBCXX) -# define BOOST_ASIO_HAS_STD_ADDRESSOF 1 -# endif // defined(BOOST_ASIO_HAS_CLANG_LIBCXX) +# if defined(__clang__) +# if defined(BOOST_ASIO_HAS_CLANG_LIBCXX) +# define BOOST_ASIO_HAS_STD_ADDRESSOF 1 +# elif (__cplusplus >= 201103) +# define BOOST_ASIO_HAS_STD_ADDRESSOF 1 +# endif // (__cplusplus >= 201103) +# endif // defined(__clang__) # if defined(__GNUC__) -# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5)) || (__GNUC__ > 4) +# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || (__GNUC__ > 4) # if defined(__GXX_EXPERIMENTAL_CXX0X__) # define BOOST_ASIO_HAS_STD_ADDRESSOF 1 # endif // defined(__GXX_EXPERIMENTAL_CXX0X__) -# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5)) || (__GNUC__ > 4) +# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || (__GNUC__ > 4) # endif // defined(__GNUC__) # if defined(BOOST_ASIO_MSVC) # if (_MSC_VER >= 1700) @@ -350,9 +387,13 @@ // Standard library support for the function class. #if !defined(BOOST_ASIO_HAS_STD_FUNCTION) # if !defined(BOOST_ASIO_DISABLE_STD_FUNCTION) -# if defined(BOOST_ASIO_HAS_CLANG_LIBCXX) -# define BOOST_ASIO_HAS_STD_FUNCTION 1 -# endif // defined(BOOST_ASIO_HAS_CLANG_LIBCXX) +# if defined(__clang__) +# if defined(BOOST_ASIO_HAS_CLANG_LIBCXX) +# define BOOST_ASIO_HAS_STD_FUNCTION 1 +# elif (__cplusplus >= 201103) +# define BOOST_ASIO_HAS_STD_FUNCTION 1 +# endif // (__cplusplus >= 201103) +# endif // defined(__clang__) # if defined(__GNUC__) # if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5)) || (__GNUC__ > 4) # if defined(__GXX_EXPERIMENTAL_CXX0X__) @@ -371,9 +412,15 @@ // Standard library support for type traits. #if !defined(BOOST_ASIO_HAS_STD_TYPE_TRAITS) # if !defined(BOOST_ASIO_DISABLE_STD_TYPE_TRAITS) -# if defined(BOOST_ASIO_HAS_CLANG_LIBCXX) -# define BOOST_ASIO_HAS_STD_TYPE_TRAITS 1 -# endif // defined(BOOST_ASIO_HAS_CLANG_LIBCXX) +# if defined(__clang__) +# if defined(BOOST_ASIO_HAS_CLANG_LIBCXX) +# define BOOST_ASIO_HAS_STD_TYPE_TRAITS 1 +# elif (__cplusplus >= 201103) +# if __has_include() +# define BOOST_ASIO_HAS_STD_TYPE_TRAITS 1 +# endif // __has_include() +# endif // (__cplusplus >= 201103) +# endif // defined(__clang__) # if defined(__GNUC__) # if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5)) || (__GNUC__ > 4) # if defined(__GXX_EXPERIMENTAL_CXX0X__) @@ -392,9 +439,13 @@ // Standard library support for the cstdint header. #if !defined(BOOST_ASIO_HAS_CSTDINT) # if !defined(BOOST_ASIO_DISABLE_CSTDINT) -# if defined(BOOST_ASIO_HAS_CLANG_LIBCXX) -# define BOOST_ASIO_HAS_CSTDINT 1 -# endif // defined(BOOST_ASIO_HAS_CLANG_LIBCXX) +# if defined(__clang__) +# if defined(BOOST_ASIO_HAS_CLANG_LIBCXX) +# define BOOST_ASIO_HAS_CSTDINT 1 +# elif (__cplusplus >= 201103) +# define BOOST_ASIO_HAS_CSTDINT 1 +# endif // (__cplusplus >= 201103) +# endif // defined(__clang__) # if defined(__GNUC__) # if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5)) || (__GNUC__ > 4) # if defined(__GXX_EXPERIMENTAL_CXX0X__) @@ -413,9 +464,15 @@ // Standard library support for the thread class. #if !defined(BOOST_ASIO_HAS_STD_THREAD) # if !defined(BOOST_ASIO_DISABLE_STD_THREAD) -# if defined(BOOST_ASIO_HAS_CLANG_LIBCXX) -# define BOOST_ASIO_HAS_STD_THREAD 1 -# endif // defined(BOOST_ASIO_HAS_CLANG_LIBCXX) +# if defined(__clang__) +# if defined(BOOST_ASIO_HAS_CLANG_LIBCXX) +# define BOOST_ASIO_HAS_STD_THREAD 1 +# elif (__cplusplus >= 201103) +# if __has_include() +# define BOOST_ASIO_HAS_STD_THREAD 1 +# endif // __has_include() +# endif // (__cplusplus >= 201103) +# endif // defined(__clang__) # if defined(__GNUC__) # if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4) # if defined(__GXX_EXPERIMENTAL_CXX0X__) @@ -434,9 +491,15 @@ // Standard library support for the mutex and condition variable classes. #if !defined(BOOST_ASIO_HAS_STD_MUTEX_AND_CONDVAR) # if !defined(BOOST_ASIO_DISABLE_STD_MUTEX_AND_CONDVAR) -# if defined(BOOST_ASIO_HAS_CLANG_LIBCXX) -# define BOOST_ASIO_HAS_STD_MUTEX_AND_CONDVAR 1 -# endif // defined(BOOST_ASIO_HAS_CLANG_LIBCXX) +# if defined(__clang__) +# if defined(BOOST_ASIO_HAS_CLANG_LIBCXX) +# define BOOST_ASIO_HAS_STD_MUTEX_AND_CONDVAR 1 +# elif (__cplusplus >= 201103) +# if __has_include() +# define BOOST_ASIO_HAS_STD_MUTEX_AND_CONDVAR 1 +# endif // __has_include() +# endif // (__cplusplus >= 201103) +# endif // defined(__clang__) # if defined(__GNUC__) # if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4) # if defined(__GXX_EXPERIMENTAL_CXX0X__) @@ -456,9 +519,11 @@ #if !defined(BOOST_ASIO_WINDOWS_RUNTIME) # if defined(__cplusplus_winrt) # include -# if WINAPI_FAMILY_ONE_PARTITION(WINAPI_FAMILY, WINAPI_PARTITION_APP) +# if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) \ + && !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) # define BOOST_ASIO_WINDOWS_RUNTIME 1 -# endif // WINAPI_FAMILY_ONE_PARTITION(WINAPI_FAMILY, WINAPI_PARTITION_APP) +# endif // WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) + // && !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) # endif // defined(__cplusplus_winrt) #endif // !defined(BOOST_ASIO_WINDOWS_RUNTIME) @@ -545,6 +610,28 @@ # endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__) #endif // !defined(BOOST_ASIO_HAS_IOCP) +// On POSIX (and POSIX-like) platforms we need to include unistd.h in order to +// get access to the various platform feature macros, e.g. to be able to test +// for threads support. +#if !defined(BOOST_ASIO_HAS_UNISTD_H) +# if !defined(BOOST_ASIO_HAS_BOOST_CONFIG) +# if defined(unix) \ + || defined(__unix) \ + || defined(_XOPEN_SOURCE) \ + || defined(_POSIX_SOURCE) \ + || (defined(__MACH__) && defined(__APPLE__)) \ + || defined(__FreeBSD__) \ + || defined(__NetBSD__) \ + || defined(__OpenBSD__) \ + || defined(__linux__) +# define BOOST_ASIO_HAS_UNISTD_H 1 +# endif +# endif // !defined(BOOST_ASIO_HAS_BOOST_CONFIG) +#endif // !defined(BOOST_ASIO_HAS_UNISTD_H) +#if defined(BOOST_ASIO_HAS_UNISTD_H) +# include +#endif // defined(BOOST_ASIO_HAS_UNISTD_H) + // Linux: epoll, eventfd and timerfd. #if defined(__linux__) # include @@ -732,28 +819,6 @@ # endif // !defined(BOOST_NO_TYPEID) #endif // !defined(BOOST_ASIO_NO_TYPEID) -// On POSIX (and POSIX-like) platforms we need to include unistd.h in order to -// get access to the various platform feature macros, e.g. to be able to test -// for threads support. -#if !defined(BOOST_ASIO_HAS_UNISTD_H) -# if !defined(BOOST_ASIO_HAS_BOOST_CONFIG) -# if defined(unix) \ - || defined(__unix) \ - || defined(_XOPEN_SOURCE) \ - || defined(_POSIX_SOURCE) \ - || (defined(__MACH__) && defined(__APPLE__)) \ - || defined(__FreeBSD__) \ - || defined(__NetBSD__) \ - || defined(__OpenBSD__) \ - || defined(__linux__) -# define BOOST_ASIO_HAS_UNISTD_H 1 -# endif -# endif // !defined(BOOST_ASIO_HAS_BOOST_CONFIG) -#endif // !defined(BOOST_ASIO_HAS_UNISTD_H) -#if defined(BOOST_ASIO_HAS_UNISTD_H) -# include -#endif // defined(BOOST_ASIO_HAS_UNISTD_H) - // Threads. #if !defined(BOOST_ASIO_HAS_THREADS) # if !defined(BOOST_ASIO_DISABLE_THREADS) -- cgit v1.2.3