Chris@16: // (C) Copyright John Maddock 2001. Chris@16: // (C) Copyright Jens Maurer 2001. Chris@16: // Use, modification and distribution are subject to the Chris@16: // Boost Software License, Version 1.0. (See accompanying file Chris@16: // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) Chris@16: Chris@16: // See http://www.boost.org for most recent version. Chris@16: Chris@16: // config for libstdc++ v3 Chris@16: // not much to go in here: Chris@16: Chris@16: #define BOOST_GNU_STDLIB 1 Chris@16: Chris@16: #ifdef __GLIBCXX__ Chris@16: #define BOOST_STDLIB "GNU libstdc++ version " BOOST_STRINGIZE(__GLIBCXX__) Chris@16: #else Chris@16: #define BOOST_STDLIB "GNU libstdc++ version " BOOST_STRINGIZE(__GLIBCPP__) Chris@16: #endif Chris@16: Chris@16: #if !defined(_GLIBCPP_USE_WCHAR_T) && !defined(_GLIBCXX_USE_WCHAR_T) Chris@16: # define BOOST_NO_CWCHAR Chris@16: # define BOOST_NO_CWCTYPE Chris@16: # define BOOST_NO_STD_WSTRING Chris@16: # define BOOST_NO_STD_WSTREAMBUF Chris@16: #endif Chris@16: Chris@16: #if defined(__osf__) && !defined(_REENTRANT) \ Chris@16: && ( defined(_GLIBCXX_HAVE_GTHR_DEFAULT) || defined(_GLIBCPP_HAVE_GTHR_DEFAULT) ) Chris@16: // GCC 3 on Tru64 forces the definition of _REENTRANT when any std lib header Chris@16: // file is included, therefore for consistency we define it here as well. Chris@16: # define _REENTRANT Chris@16: #endif Chris@16: Chris@16: #ifdef __GLIBCXX__ // gcc 3.4 and greater: Chris@16: # if defined(_GLIBCXX_HAVE_GTHR_DEFAULT) \ Chris@16: || defined(_GLIBCXX__PTHREADS) \ Chris@16: || defined(_GLIBCXX_HAS_GTHREADS) \ Chris@16: || defined(_WIN32) \ Chris@16: || defined(_AIX) Chris@16: // Chris@16: // If the std lib has thread support turned on, then turn it on in Boost Chris@16: // as well. We do this because some gcc-3.4 std lib headers define _REENTANT Chris@16: // while others do not... Chris@16: // Chris@16: # define BOOST_HAS_THREADS Chris@16: # else Chris@16: # define BOOST_DISABLE_THREADS Chris@16: # endif Chris@16: #elif defined(__GLIBCPP__) \ Chris@16: && !defined(_GLIBCPP_HAVE_GTHR_DEFAULT) \ Chris@16: && !defined(_GLIBCPP__PTHREADS) Chris@16: // disable thread support if the std lib was built single threaded: Chris@16: # define BOOST_DISABLE_THREADS Chris@16: #endif Chris@16: Chris@16: #if (defined(linux) || defined(__linux) || defined(__linux__)) && defined(__arm__) && defined(_GLIBCPP_HAVE_GTHR_DEFAULT) Chris@16: // linux on arm apparently doesn't define _REENTRANT Chris@16: // so just turn on threading support whenever the std lib is thread safe: Chris@16: # define BOOST_HAS_THREADS Chris@16: #endif Chris@16: Chris@16: #if !defined(_GLIBCPP_USE_LONG_LONG) \ Chris@16: && !defined(_GLIBCXX_USE_LONG_LONG)\ Chris@16: && defined(BOOST_HAS_LONG_LONG) Chris@16: // May have been set by compiler/*.hpp, but "long long" without library Chris@16: // support is useless. Chris@16: # undef BOOST_HAS_LONG_LONG Chris@16: #endif Chris@16: Chris@16: // Apple doesn't seem to reliably defined a *unix* macro Chris@16: #if !defined(CYGWIN) && ( defined(__unix__) \ Chris@16: || defined(__unix) \ Chris@16: || defined(unix) \ Chris@16: || defined(__APPLE__) \ Chris@16: || defined(__APPLE) \ Chris@16: || defined(APPLE)) Chris@16: # include Chris@16: #endif Chris@16: Chris@16: #if defined(__GLIBCXX__) || (defined(__GLIBCPP__) && __GLIBCPP__>=20020514) // GCC >= 3.1.0 Chris@16: # define BOOST_STD_EXTENSION_NAMESPACE __gnu_cxx Chris@16: # define BOOST_HAS_SLIST Chris@16: # define BOOST_HAS_HASH Chris@16: # define BOOST_SLIST_HEADER Chris@16: # if !defined(__GNUC__) || __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 3) Chris@16: # define BOOST_HASH_SET_HEADER Chris@16: # define BOOST_HASH_MAP_HEADER Chris@16: # else Chris@16: # define BOOST_HASH_SET_HEADER Chris@16: # define BOOST_HASH_MAP_HEADER Chris@16: # endif Chris@16: #endif Chris@16: Chris@16: // stdlibc++ C++0x support is detected via __GNUC__, __GNUC_MINOR__, and possibly Chris@16: // __GNUC_PATCHLEVEL__ at the suggestion of Jonathan Wakely, one of the stdlibc++ Chris@16: // developers. He also commented: Chris@16: // Chris@16: // "I'm not sure how useful __GLIBCXX__ is for your purposes, for instance in Chris@16: // GCC 4.2.4 it is set to 20080519 but in GCC 4.3.0 it is set to 20080305. Chris@16: // Although 4.3.0 was released earlier than 4.2.4, it has better C++0x support Chris@16: // than any release in the 4.2 series." Chris@16: // Chris@16: // Another resource for understanding stdlibc++ features is: Chris@16: // http://gcc.gnu.org/onlinedocs/libstdc++/manual/status.html#manual.intro.status.standard.200x Chris@16: Chris@16: // C++0x headers in GCC 4.3.0 and later Chris@16: // Chris@16: #if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 3) || !defined(__GXX_EXPERIMENTAL_CXX0X__) Chris@16: # define BOOST_NO_CXX11_HDR_ARRAY Chris@16: # define BOOST_NO_CXX11_HDR_REGEX Chris@16: # define BOOST_NO_CXX11_HDR_TUPLE Chris@16: # define BOOST_NO_CXX11_HDR_UNORDERED_MAP Chris@16: # define BOOST_NO_CXX11_HDR_UNORDERED_SET Chris@16: # define BOOST_NO_CXX11_HDR_FUNCTIONAL Chris@16: #endif Chris@16: Chris@16: // C++0x headers in GCC 4.4.0 and later Chris@16: // Chris@16: #if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 4) || !defined(__GXX_EXPERIMENTAL_CXX0X__) Chris@16: # define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE Chris@16: # define BOOST_NO_CXX11_HDR_FORWARD_LIST Chris@16: # define BOOST_NO_CXX11_HDR_INITIALIZER_LIST Chris@16: # define BOOST_NO_CXX11_HDR_MUTEX Chris@16: # define BOOST_NO_CXX11_HDR_RATIO Chris@16: # define BOOST_NO_CXX11_HDR_SYSTEM_ERROR Chris@16: # define BOOST_NO_CXX11_SMART_PTR Chris@16: #else Chris@16: # define BOOST_HAS_TR1_COMPLEX_INVERSE_TRIG Chris@16: # define BOOST_HAS_TR1_COMPLEX_OVERLOADS Chris@16: #endif Chris@16: Chris@16: #if (!defined(_GLIBCXX_HAS_GTHREADS) || !defined(_GLIBCXX_USE_C99_STDINT_TR1)) && (!defined(BOOST_NO_CXX11_HDR_CONDITION_VARIABLE) || !defined(BOOST_NO_CXX11_HDR_MUTEX)) Chris@16: # define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE Chris@16: # define BOOST_NO_CXX11_HDR_MUTEX Chris@16: #endif Chris@16: Chris@16: // C++0x features in GCC 4.5.0 and later Chris@16: // Chris@16: #if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 5) || !defined(__GXX_EXPERIMENTAL_CXX0X__) Chris@16: # define BOOST_NO_CXX11_NUMERIC_LIMITS Chris@16: # define BOOST_NO_CXX11_HDR_FUTURE Chris@16: # define BOOST_NO_CXX11_HDR_RANDOM Chris@16: #endif Chris@16: Chris@16: // C++0x features in GCC 4.6.0 and later Chris@16: // Chris@16: #if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 6) || !defined(__GXX_EXPERIMENTAL_CXX0X__) Chris@16: # define BOOST_NO_CXX11_HDR_TYPEINDEX Chris@16: #endif Chris@16: Chris@16: // C++0x features in GCC 4.7.0 and later Chris@16: // Chris@16: #if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 7) || !defined(__GXX_EXPERIMENTAL_CXX0X__) Chris@16: // Note that although existed prior to 4.7, "stead_clock" is spelled "monotonic_clock" Chris@16: // so 4.7.0 is the first truely conforming one. Chris@16: # define BOOST_NO_CXX11_HDR_CHRONO Chris@16: # define BOOST_NO_CXX11_ALLOCATOR Chris@16: #endif Chris@16: // C++0x headers not yet (fully!) implemented Chris@16: // Chris@16: # define BOOST_NO_CXX11_HDR_THREAD Chris@16: # define BOOST_NO_CXX11_HDR_TYPE_TRAITS Chris@16: # define BOOST_NO_CXX11_HDR_CODECVT Chris@16: # define BOOST_NO_CXX11_ATOMIC_SMART_PTR Chris@16: Chris@16: // --- end ---