Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 1 | // (C) Copyright John Maddock 2001. |
| 2 | // (C) Copyright Jens Maurer 2001. |
| 3 | // Use, modification and distribution are subject to the |
| 4 | // Boost Software License, Version 1.0. (See accompanying file |
| 5 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) |
| 6 | |
| 7 | // See http://www.boost.org for most recent version. |
| 8 | |
| 9 | // config for libstdc++ v3 |
| 10 | // not much to go in here: |
| 11 | |
| 12 | #define BOOST_GNU_STDLIB 1 |
| 13 | |
| 14 | #ifdef __GLIBCXX__ |
| 15 | #define BOOST_STDLIB "GNU libstdc++ version " BOOST_STRINGIZE(__GLIBCXX__) |
| 16 | #else |
| 17 | #define BOOST_STDLIB "GNU libstdc++ version " BOOST_STRINGIZE(__GLIBCPP__) |
| 18 | #endif |
| 19 | |
| 20 | #if !defined(_GLIBCPP_USE_WCHAR_T) && !defined(_GLIBCXX_USE_WCHAR_T) |
| 21 | # define BOOST_NO_CWCHAR |
| 22 | # define BOOST_NO_CWCTYPE |
| 23 | # define BOOST_NO_STD_WSTRING |
| 24 | # define BOOST_NO_STD_WSTREAMBUF |
| 25 | #endif |
| 26 | |
| 27 | #if defined(__osf__) && !defined(_REENTRANT) \ |
| 28 | && ( defined(_GLIBCXX_HAVE_GTHR_DEFAULT) || defined(_GLIBCPP_HAVE_GTHR_DEFAULT) ) |
| 29 | // GCC 3 on Tru64 forces the definition of _REENTRANT when any std lib header |
| 30 | // file is included, therefore for consistency we define it here as well. |
| 31 | # define _REENTRANT |
| 32 | #endif |
| 33 | |
| 34 | #ifdef __GLIBCXX__ // gcc 3.4 and greater: |
| 35 | # if defined(_GLIBCXX_HAVE_GTHR_DEFAULT) \ |
| 36 | || defined(_GLIBCXX__PTHREADS) \ |
| 37 | || defined(_GLIBCXX_HAS_GTHREADS) \ |
Jeff Thompson | a28eed8 | 2013-08-22 16:21:10 -0700 | [diff] [blame^] | 38 | || defined(_WIN32) \ |
| 39 | || defined(_AIX) |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 40 | // |
| 41 | // If the std lib has thread support turned on, then turn it on in Boost |
| 42 | // as well. We do this because some gcc-3.4 std lib headers define _REENTANT |
| 43 | // while others do not... |
| 44 | // |
| 45 | # define BOOST_HAS_THREADS |
| 46 | # else |
| 47 | # define BOOST_DISABLE_THREADS |
| 48 | # endif |
| 49 | #elif defined(__GLIBCPP__) \ |
| 50 | && !defined(_GLIBCPP_HAVE_GTHR_DEFAULT) \ |
| 51 | && !defined(_GLIBCPP__PTHREADS) |
| 52 | // disable thread support if the std lib was built single threaded: |
| 53 | # define BOOST_DISABLE_THREADS |
| 54 | #endif |
| 55 | |
| 56 | #if (defined(linux) || defined(__linux) || defined(__linux__)) && defined(__arm__) && defined(_GLIBCPP_HAVE_GTHR_DEFAULT) |
| 57 | // linux on arm apparently doesn't define _REENTRANT |
| 58 | // so just turn on threading support whenever the std lib is thread safe: |
| 59 | # define BOOST_HAS_THREADS |
| 60 | #endif |
| 61 | |
| 62 | #if !defined(_GLIBCPP_USE_LONG_LONG) \ |
| 63 | && !defined(_GLIBCXX_USE_LONG_LONG)\ |
| 64 | && defined(BOOST_HAS_LONG_LONG) |
| 65 | // May have been set by compiler/*.hpp, but "long long" without library |
| 66 | // support is useless. |
| 67 | # undef BOOST_HAS_LONG_LONG |
| 68 | #endif |
| 69 | |
| 70 | // Apple doesn't seem to reliably defined a *unix* macro |
| 71 | #if !defined(CYGWIN) && ( defined(__unix__) \ |
| 72 | || defined(__unix) \ |
| 73 | || defined(unix) \ |
| 74 | || defined(__APPLE__) \ |
| 75 | || defined(__APPLE) \ |
| 76 | || defined(APPLE)) |
| 77 | # include <unistd.h> |
| 78 | #endif |
| 79 | |
| 80 | #if defined(__GLIBCXX__) || (defined(__GLIBCPP__) && __GLIBCPP__>=20020514) // GCC >= 3.1.0 |
| 81 | # define BOOST_STD_EXTENSION_NAMESPACE __gnu_cxx |
| 82 | # define BOOST_HAS_SLIST |
| 83 | # define BOOST_HAS_HASH |
| 84 | # define BOOST_SLIST_HEADER <ext/slist> |
| 85 | # if !defined(__GNUC__) || __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 3) |
| 86 | # define BOOST_HASH_SET_HEADER <ext/hash_set> |
| 87 | # define BOOST_HASH_MAP_HEADER <ext/hash_map> |
| 88 | # else |
| 89 | # define BOOST_HASH_SET_HEADER <backward/hash_set> |
| 90 | # define BOOST_HASH_MAP_HEADER <backward/hash_map> |
| 91 | # endif |
| 92 | #endif |
| 93 | |
| 94 | // stdlibc++ C++0x support is detected via __GNUC__, __GNUC_MINOR__, and possibly |
| 95 | // __GNUC_PATCHLEVEL__ at the suggestion of Jonathan Wakely, one of the stdlibc++ |
| 96 | // developers. He also commented: |
| 97 | // |
| 98 | // "I'm not sure how useful __GLIBCXX__ is for your purposes, for instance in |
| 99 | // GCC 4.2.4 it is set to 20080519 but in GCC 4.3.0 it is set to 20080305. |
| 100 | // Although 4.3.0 was released earlier than 4.2.4, it has better C++0x support |
| 101 | // than any release in the 4.2 series." |
| 102 | // |
| 103 | // Another resource for understanding stdlibc++ features is: |
| 104 | // http://gcc.gnu.org/onlinedocs/libstdc++/manual/status.html#manual.intro.status.standard.200x |
| 105 | |
| 106 | // C++0x headers in GCC 4.3.0 and later |
| 107 | // |
| 108 | #if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 3) || !defined(__GXX_EXPERIMENTAL_CXX0X__) |
| 109 | # define BOOST_NO_CXX11_HDR_ARRAY |
| 110 | # define BOOST_NO_CXX11_HDR_REGEX |
| 111 | # define BOOST_NO_CXX11_HDR_TUPLE |
| 112 | # define BOOST_NO_CXX11_HDR_UNORDERED_MAP |
| 113 | # define BOOST_NO_CXX11_HDR_UNORDERED_SET |
| 114 | # define BOOST_NO_CXX11_HDR_FUNCTIONAL |
| 115 | #endif |
| 116 | |
| 117 | // C++0x headers in GCC 4.4.0 and later |
| 118 | // |
| 119 | #if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 4) || !defined(__GXX_EXPERIMENTAL_CXX0X__) |
| 120 | # define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE |
| 121 | # define BOOST_NO_CXX11_HDR_FORWARD_LIST |
| 122 | # define BOOST_NO_CXX11_HDR_INITIALIZER_LIST |
| 123 | # define BOOST_NO_CXX11_HDR_MUTEX |
| 124 | # define BOOST_NO_CXX11_HDR_RATIO |
| 125 | # define BOOST_NO_CXX11_HDR_SYSTEM_ERROR |
| 126 | # define BOOST_NO_CXX11_SMART_PTR |
| 127 | #else |
| 128 | # define BOOST_HAS_TR1_COMPLEX_INVERSE_TRIG |
| 129 | # define BOOST_HAS_TR1_COMPLEX_OVERLOADS |
| 130 | #endif |
| 131 | |
| 132 | #if (!defined(_GLIBCXX_HAS_GTHREADS) || !defined(_GLIBCXX_USE_C99_STDINT_TR1)) && (!defined(BOOST_NO_CXX11_HDR_CONDITION_VARIABLE) || !defined(BOOST_NO_CXX11_HDR_MUTEX)) |
| 133 | # define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE |
| 134 | # define BOOST_NO_CXX11_HDR_MUTEX |
| 135 | #endif |
| 136 | |
| 137 | // C++0x features in GCC 4.5.0 and later |
| 138 | // |
| 139 | #if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 5) || !defined(__GXX_EXPERIMENTAL_CXX0X__) |
| 140 | # define BOOST_NO_CXX11_NUMERIC_LIMITS |
| 141 | # define BOOST_NO_CXX11_HDR_FUTURE |
| 142 | # define BOOST_NO_CXX11_HDR_RANDOM |
| 143 | #endif |
| 144 | |
| 145 | // C++0x features in GCC 4.6.0 and later |
| 146 | // |
| 147 | #if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 6) || !defined(__GXX_EXPERIMENTAL_CXX0X__) |
| 148 | # define BOOST_NO_CXX11_HDR_TYPEINDEX |
| 149 | #endif |
| 150 | |
| 151 | // C++0x features in GCC 4.7.0 and later |
| 152 | // |
| 153 | #if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 7) || !defined(__GXX_EXPERIMENTAL_CXX0X__) |
| 154 | // Note that although <chrono> existed prior to 4.7, "stead_clock" is spelled "monotonic_clock" |
| 155 | // so 4.7.0 is the first truely conforming one. |
| 156 | # define BOOST_NO_CXX11_HDR_CHRONO |
| 157 | # define BOOST_NO_CXX11_ALLOCATOR |
| 158 | #endif |
| 159 | // C++0x headers not yet (fully!) implemented |
| 160 | // |
| 161 | # define BOOST_NO_CXX11_HDR_THREAD |
| 162 | # define BOOST_NO_CXX11_HDR_TYPE_TRAITS |
| 163 | # define BOOST_NO_CXX11_HDR_CODECVT |
| 164 | # define BOOST_NO_CXX11_ATOMIC_SMART_PTR |
| 165 | |
| 166 | // --- end --- |