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)
7 // See http://www.boost.org for most recent version.
9 // config for libstdc++ v3
10 // not much to go in here:
12 #define BOOST_GNU_STDLIB 1
15 #define BOOST_STDLIB "GNU libstdc++ version " BOOST_STRINGIZE(__GLIBCXX__)
17 #define BOOST_STDLIB "GNU libstdc++ version " BOOST_STRINGIZE(__GLIBCPP__)
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
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.
34 #ifdef __GLIBCXX__ // gcc 3.4 and greater:
35 # if defined(_GLIBCXX_HAVE_GTHR_DEFAULT) \
36 || defined(_GLIBCXX__PTHREADS)
38 // If the std lib has thread support turned on, then turn it on in Boost
39 // as well. We do this because some gcc-3.4 std lib headers define _REENTANT
40 // while others do not...
42 # define BOOST_HAS_THREADS
44 # define BOOST_DISABLE_THREADS
46 #elif defined(__GLIBCPP__) \
47 && !defined(_GLIBCPP_HAVE_GTHR_DEFAULT) \
48 && !defined(_GLIBCPP__PTHREADS)
49 // disable thread support if the std lib was built single threaded:
50 # define BOOST_DISABLE_THREADS
53 #if (defined(linux) || defined(__linux) || defined(__linux__)) && defined(__arm__) && defined(_GLIBCPP_HAVE_GTHR_DEFAULT)
54 // linux on arm apparently doesn't define _REENTRANT
55 // so just turn on threading support whenever the std lib is thread safe:
56 # define BOOST_HAS_THREADS
59 #if !defined(_GLIBCPP_USE_LONG_LONG) \
60 && !defined(_GLIBCXX_USE_LONG_LONG)\
61 && defined(BOOST_HAS_LONG_LONG)
62 // May have been set by compiler/*.hpp, but "long long" without library
63 // support is useless.
64 # undef BOOST_HAS_LONG_LONG
67 // Apple doesn't seem to reliably defined a *unix* macro
68 #if !defined(CYGWIN) && ( defined(__unix__) \
71 || defined(__APPLE__) \
77 #if defined(__GLIBCXX__) || (defined(__GLIBCPP__) && __GLIBCPP__>=20020514) // GCC >= 3.1.0
78 # define BOOST_STD_EXTENSION_NAMESPACE __gnu_cxx
79 # define BOOST_HAS_SLIST
80 # define BOOST_HAS_HASH
81 # define BOOST_SLIST_HEADER <ext/slist>
82 # if !defined(__GNUC__) || __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 3)
83 # define BOOST_HASH_SET_HEADER <ext/hash_set>
84 # define BOOST_HASH_MAP_HEADER <ext/hash_map>
86 # define BOOST_HASH_SET_HEADER <backward/hash_set>
87 # define BOOST_HASH_MAP_HEADER <backward/hash_map>
91 // stdlibc++ C++0x support is detected via __GNUC__, __GNUC_MINOR__, and possibly
92 // __GNUC_PATCHLEVEL__ at the suggestion of Jonathan Wakely, one of the stdlibc++
93 // developers. He also commented:
95 // "I'm not sure how useful __GLIBCXX__ is for your purposes, for instance in
96 // GCC 4.2.4 it is set to 20080519 but in GCC 4.3.0 it is set to 20080305.
97 // Although 4.3.0 was released earlier than 4.2.4, it has better C++0x support
98 // than any release in the 4.2 series."
100 // Another resource for understanding stdlibc++ features is:
101 // http://gcc.gnu.org/onlinedocs/libstdc++/manual/status.html#manual.intro.status.standard.200x
103 // C++0x headers in GCC 4.3.0 and later
105 #if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 3) || !defined(__GXX_EXPERIMENTAL_CXX0X__)
106 # define BOOST_NO_0X_HDR_ARRAY
107 # define BOOST_NO_0X_HDR_RANDOM
108 # define BOOST_NO_0X_HDR_REGEX
109 # define BOOST_NO_0X_HDR_TUPLE
110 # define BOOST_NO_0X_HDR_TYPE_TRAITS
111 # define BOOST_NO_STD_UNORDERED // deprecated; see following
112 # define BOOST_NO_0X_HDR_UNORDERED_MAP
113 # define BOOST_NO_0X_HDR_UNORDERED_SET
116 // C++0x headers in GCC 4.4.0 and later
118 #if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 4) || !defined(__GXX_EXPERIMENTAL_CXX0X__)
119 # define BOOST_NO_0X_HDR_CHRONO
120 # define BOOST_NO_0X_HDR_CONDITION_VARIABLE
121 # define BOOST_NO_0X_HDR_FORWARD_LIST
122 # define BOOST_NO_0X_HDR_INITIALIZER_LIST
123 # define BOOST_NO_0X_HDR_MUTEX
124 # define BOOST_NO_0X_HDR_RATIO
125 # define BOOST_NO_0X_HDR_SYSTEM_ERROR
126 # define BOOST_NO_0X_HDR_THREAD
129 // C++0x features in GCC 4.5.0 and later
131 #if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 5) || !defined(__GXX_EXPERIMENTAL_CXX0X__)
132 # define BOOST_NO_NUMERIC_LIMITS_LOWEST
135 // C++0x headers not yet implemented
137 # define BOOST_NO_0X_HDR_CODECVT
138 # define BOOST_NO_0X_HDR_CONCEPTS
139 # define BOOST_NO_0X_HDR_CONTAINER_CONCEPTS
140 # define BOOST_NO_0X_HDR_FUTURE
141 # define BOOST_NO_0X_HDR_ITERATOR_CONCEPTS
142 # define BOOST_NO_0X_HDR_MEMORY_CONCEPTS
143 # define BOOST_NO_0X_HDR_TYPEINDEX