]> git.lyx.org Git - lyx.git/blob - boost/boost/config/stdlib/libstdcpp3.hpp
Don't allow newline characters in document settings.
[lyx.git] / boost / boost / config / stdlib / libstdcpp3.hpp
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       //
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...
41       //
42 #     define BOOST_HAS_THREADS
43 #  else
44 #     define BOOST_DISABLE_THREADS
45 #  endif
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
51 #endif
52
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
57 #endif
58
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
65 #endif
66
67 // Apple doesn't seem to reliably defined a *unix* macro
68 #if !defined(CYGWIN) && (  defined(__unix__)  \
69                         || defined(__unix)    \
70                         || defined(unix)      \
71                         || defined(__APPLE__) \
72                         || defined(__APPLE)   \
73                         || defined(APPLE))
74 #  include <unistd.h>
75 #endif
76
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>
85 # else
86 #   define BOOST_HASH_SET_HEADER <backward/hash_set>
87 #   define BOOST_HASH_MAP_HEADER <backward/hash_map>
88 # endif
89 #endif
90
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:
94 //
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."
99 //
100 //  Another resource for understanding stdlibc++ features is:
101 //  http://gcc.gnu.org/onlinedocs/libstdc++/manual/status.html#manual.intro.status.standard.200x
102
103 //  C++0x headers in GCC 4.3.0 and later
104 //
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_REGEX
108 #  define BOOST_NO_0X_HDR_TUPLE
109 #  define BOOST_NO_STD_UNORDERED  // deprecated; see following
110 #  define BOOST_NO_0X_HDR_UNORDERED_MAP
111 #  define BOOST_NO_0X_HDR_UNORDERED_SET
112 #endif
113
114 //  C++0x headers in GCC 4.4.0 and later
115 //
116 #if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 4) || !defined(__GXX_EXPERIMENTAL_CXX0X__)
117 #  define BOOST_NO_0X_HDR_CHRONO
118 #  define BOOST_NO_0X_HDR_CONDITION_VARIABLE
119 #  define BOOST_NO_0X_HDR_FORWARD_LIST
120 #  define BOOST_NO_0X_HDR_INITIALIZER_LIST
121 #  define BOOST_NO_0X_HDR_MUTEX
122 #  define BOOST_NO_0X_HDR_RATIO
123 #  define BOOST_NO_0X_HDR_SYSTEM_ERROR
124 #else
125 #  define BOOST_HAS_TR1_COMPLEX_INVERSE_TRIG 
126 #  define BOOST_HAS_TR1_COMPLEX_OVERLOADS 
127 #endif
128
129 #if (!defined(_GLIBCXX_HAS_GTHREADS) || !defined(_GLIBCXX_USE_C99_STDINT_TR1)) && (!defined(BOOST_NO_0X_HDR_CONDITION_VARIABLE) || !defined(BOOST_NO_0X_HDR_MUTEX))
130 #  define BOOST_NO_0X_HDR_CONDITION_VARIABLE
131 #  define BOOST_NO_0X_HDR_MUTEX
132 #endif
133
134 //  C++0x features in GCC 4.5.0 and later
135 //
136 #if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 5) || !defined(__GXX_EXPERIMENTAL_CXX0X__)
137 #  define BOOST_NO_NUMERIC_LIMITS_LOWEST
138 #  define BOOST_NO_0X_HDR_FUTURE
139 #  define BOOST_NO_0X_HDR_RANDOM
140 #endif
141
142 //  C++0x features in GCC 4.5.0 and later
143 //
144 #if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 6) || !defined(__GXX_EXPERIMENTAL_CXX0X__)
145 #  define BOOST_NO_0X_HDR_TYPEINDEX
146 #endif
147 //  C++0x headers not yet (fully!) implemented
148 //
149 #  define BOOST_NO_0X_HDR_THREAD
150 #  define BOOST_NO_0X_HDR_TYPE_TRAITS
151 #  define BOOST_NO_0X_HDR_CODECVT
152
153 //  --- end ---