Chris@16
|
1 // (C) Copyright John Maddock 2001 - 2002.
|
Chris@16
|
2 // (C) Copyright Darin Adler 2001.
|
Chris@16
|
3 // (C) Copyright Jens Maurer 2001.
|
Chris@16
|
4 // Use, modification and distribution are subject to the
|
Chris@16
|
5 // Boost Software License, Version 1.0. (See accompanying file
|
Chris@16
|
6 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
Chris@16
|
7
|
Chris@16
|
8 // See http://www.boost.org for most recent version.
|
Chris@16
|
9
|
Chris@16
|
10 // STLPort standard library config:
|
Chris@16
|
11
|
Chris@16
|
12 #if !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION)
|
Chris@16
|
13 # include <cstddef>
|
Chris@16
|
14 # if !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION)
|
Chris@16
|
15 # error "This is not STLPort!"
|
Chris@16
|
16 # endif
|
Chris@16
|
17 #endif
|
Chris@16
|
18
|
Chris@16
|
19 // Apple doesn't seem to reliably defined a *unix* macro
|
Chris@16
|
20 #if !defined(CYGWIN) && ( defined(__unix__) \
|
Chris@16
|
21 || defined(__unix) \
|
Chris@16
|
22 || defined(unix) \
|
Chris@16
|
23 || defined(__APPLE__) \
|
Chris@16
|
24 || defined(__APPLE) \
|
Chris@16
|
25 || defined(APPLE))
|
Chris@16
|
26 # include <unistd.h>
|
Chris@16
|
27 #endif
|
Chris@16
|
28
|
Chris@16
|
29 //
|
Chris@16
|
30 // __STL_STATIC_CONST_INIT_BUG implies BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
|
Chris@16
|
31 // for versions prior to 4.1(beta)
|
Chris@16
|
32 //
|
Chris@16
|
33 #if (defined(__STL_STATIC_CONST_INIT_BUG) || defined(_STLP_STATIC_CONST_INIT_BUG)) && (__SGI_STL_PORT <= 0x400)
|
Chris@16
|
34 # define BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
|
Chris@16
|
35 #endif
|
Chris@16
|
36
|
Chris@16
|
37 //
|
Chris@16
|
38 // If STLport thinks that there is no partial specialisation, then there is no
|
Chris@16
|
39 // std::iterator traits:
|
Chris@16
|
40 //
|
Chris@16
|
41 #if !(defined(_STLP_CLASS_PARTIAL_SPECIALIZATION) || defined(__STL_CLASS_PARTIAL_SPECIALIZATION))
|
Chris@16
|
42 # define BOOST_NO_STD_ITERATOR_TRAITS
|
Chris@16
|
43 #endif
|
Chris@16
|
44
|
Chris@16
|
45 //
|
Chris@16
|
46 // No new style iostreams on GCC without STLport's iostreams enabled:
|
Chris@16
|
47 //
|
Chris@16
|
48 #if (defined(__GNUC__) && (__GNUC__ < 3)) && !(defined(__SGI_STL_OWN_IOSTREAMS) || defined(_STLP_OWN_IOSTREAMS))
|
Chris@16
|
49 # define BOOST_NO_STRINGSTREAM
|
Chris@16
|
50 #endif
|
Chris@16
|
51
|
Chris@16
|
52 //
|
Chris@16
|
53 // No new iostreams implies no std::locale, and no std::stringstream:
|
Chris@16
|
54 //
|
Chris@16
|
55 #if defined(__STL_NO_IOSTREAMS) || defined(__STL_NO_NEW_IOSTREAMS) || defined(_STLP_NO_IOSTREAMS) || defined(_STLP_NO_NEW_IOSTREAMS)
|
Chris@16
|
56 # define BOOST_NO_STD_LOCALE
|
Chris@16
|
57 # define BOOST_NO_STRINGSTREAM
|
Chris@16
|
58 #endif
|
Chris@16
|
59
|
Chris@16
|
60 //
|
Chris@16
|
61 // If the streams are not native, and we have a "using ::x" compiler bug
|
Chris@16
|
62 // then the io stream facets are not available in namespace std::
|
Chris@16
|
63 //
|
Chris@16
|
64 #ifdef _STLPORT_VERSION
|
Chris@16
|
65 # if !(_STLPORT_VERSION >= 0x500) && !defined(_STLP_OWN_IOSTREAMS) && defined(_STLP_USE_NAMESPACES) && defined(BOOST_NO_USING_TEMPLATE) && !defined(__BORLANDC__)
|
Chris@16
|
66 # define BOOST_NO_STD_LOCALE
|
Chris@16
|
67 # endif
|
Chris@16
|
68 #else
|
Chris@16
|
69 # if !defined(__SGI_STL_OWN_IOSTREAMS) && defined(__STL_USE_NAMESPACES) && defined(BOOST_NO_USING_TEMPLATE) && !defined(__BORLANDC__)
|
Chris@16
|
70 # define BOOST_NO_STD_LOCALE
|
Chris@16
|
71 # endif
|
Chris@16
|
72 #endif
|
Chris@16
|
73
|
Chris@16
|
74 #if defined(_STLPORT_VERSION) && (_STLPORT_VERSION >= 0x520)
|
Chris@16
|
75 # define BOOST_HAS_TR1_UNORDERED_SET
|
Chris@16
|
76 # define BOOST_HAS_TR1_UNORDERED_MAP
|
Chris@16
|
77 #endif
|
Chris@16
|
78 //
|
Chris@16
|
79 // Without member template support enabled, their are no template
|
Chris@16
|
80 // iterate constructors, and no std::allocator:
|
Chris@16
|
81 //
|
Chris@16
|
82 #if !(defined(__STL_MEMBER_TEMPLATES) || defined(_STLP_MEMBER_TEMPLATES))
|
Chris@16
|
83 # define BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS
|
Chris@16
|
84 # define BOOST_NO_STD_ALLOCATOR
|
Chris@16
|
85 #endif
|
Chris@16
|
86 //
|
Chris@16
|
87 // however we always have at least a partial allocator:
|
Chris@16
|
88 //
|
Chris@16
|
89 #define BOOST_HAS_PARTIAL_STD_ALLOCATOR
|
Chris@16
|
90
|
Chris@16
|
91 #if !defined(_STLP_MEMBER_TEMPLATE_CLASSES) || defined(_STLP_DONT_SUPPORT_REBIND_MEMBER_TEMPLATE)
|
Chris@16
|
92 # define BOOST_NO_STD_ALLOCATOR
|
Chris@16
|
93 #endif
|
Chris@16
|
94
|
Chris@16
|
95 #if defined(_STLP_NO_MEMBER_TEMPLATE_KEYWORD) && defined(BOOST_MSVC) && (BOOST_MSVC <= 1300)
|
Chris@16
|
96 # define BOOST_NO_STD_ALLOCATOR
|
Chris@16
|
97 #endif
|
Chris@16
|
98
|
Chris@16
|
99 //
|
Chris@16
|
100 // If STLport thinks there is no wchar_t at all, then we have to disable
|
Chris@16
|
101 // the support for the relevant specilazations of std:: templates.
|
Chris@16
|
102 //
|
Chris@16
|
103 #if !defined(_STLP_HAS_WCHAR_T) && !defined(_STLP_WCHAR_T_IS_USHORT)
|
Chris@16
|
104 # ifndef BOOST_NO_STD_WSTRING
|
Chris@16
|
105 # define BOOST_NO_STD_WSTRING
|
Chris@16
|
106 # endif
|
Chris@16
|
107 # ifndef BOOST_NO_STD_WSTREAMBUF
|
Chris@16
|
108 # define BOOST_NO_STD_WSTREAMBUF
|
Chris@16
|
109 # endif
|
Chris@16
|
110 #endif
|
Chris@16
|
111
|
Chris@16
|
112 //
|
Chris@16
|
113 // We always have SGI style hash_set, hash_map, and slist:
|
Chris@16
|
114 //
|
Chris@16
|
115 #ifndef _STLP_NO_EXTENSIONS
|
Chris@16
|
116 #define BOOST_HAS_HASH
|
Chris@16
|
117 #define BOOST_HAS_SLIST
|
Chris@16
|
118 #endif
|
Chris@16
|
119
|
Chris@16
|
120 //
|
Chris@16
|
121 // STLport does a good job of importing names into namespace std::,
|
Chris@16
|
122 // but doesn't always get them all, define BOOST_NO_STDC_NAMESPACE, since our
|
Chris@16
|
123 // workaround does not conflict with STLports:
|
Chris@16
|
124 //
|
Chris@16
|
125 //
|
Chris@16
|
126 // Harold Howe says:
|
Chris@16
|
127 // Borland switched to STLport in BCB6. Defining BOOST_NO_STDC_NAMESPACE with
|
Chris@16
|
128 // BCB6 does cause problems. If we detect C++ Builder, then don't define
|
Chris@16
|
129 // BOOST_NO_STDC_NAMESPACE
|
Chris@16
|
130 //
|
Chris@16
|
131 #if !defined(__BORLANDC__) && !defined(__DMC__)
|
Chris@16
|
132 //
|
Chris@16
|
133 // If STLport is using it's own namespace, and the real names are in
|
Chris@16
|
134 // the global namespace, then we duplicate STLport's using declarations
|
Chris@16
|
135 // (by defining BOOST_NO_STDC_NAMESPACE), we do this because STLport doesn't
|
Chris@16
|
136 // necessarily import all the names we need into namespace std::
|
Chris@16
|
137 //
|
Chris@16
|
138 # if (defined(__STL_IMPORT_VENDOR_CSTD) \
|
Chris@16
|
139 || defined(__STL_USE_OWN_NAMESPACE) \
|
Chris@16
|
140 || defined(_STLP_IMPORT_VENDOR_CSTD) \
|
Chris@16
|
141 || defined(_STLP_USE_OWN_NAMESPACE)) \
|
Chris@16
|
142 && (defined(__STL_VENDOR_GLOBAL_CSTD) || defined (_STLP_VENDOR_GLOBAL_CSTD))
|
Chris@16
|
143 # define BOOST_NO_STDC_NAMESPACE
|
Chris@16
|
144 # define BOOST_NO_EXCEPTION_STD_NAMESPACE
|
Chris@16
|
145 # endif
|
Chris@16
|
146 #elif defined(__BORLANDC__) && __BORLANDC__ < 0x560
|
Chris@16
|
147 // STLport doesn't import std::abs correctly:
|
Chris@16
|
148 #include <stdlib.h>
|
Chris@16
|
149 namespace std { using ::abs; }
|
Chris@16
|
150 // and strcmp/strcpy don't get imported either ('cos they are macros)
|
Chris@16
|
151 #include <string.h>
|
Chris@16
|
152 #ifdef strcpy
|
Chris@16
|
153 # undef strcpy
|
Chris@16
|
154 #endif
|
Chris@16
|
155 #ifdef strcmp
|
Chris@16
|
156 # undef strcmp
|
Chris@16
|
157 #endif
|
Chris@16
|
158 #ifdef _STLP_VENDOR_CSTD
|
Chris@16
|
159 namespace std{ using _STLP_VENDOR_CSTD::strcmp; using _STLP_VENDOR_CSTD::strcpy; }
|
Chris@16
|
160 #endif
|
Chris@16
|
161 #endif
|
Chris@16
|
162
|
Chris@16
|
163 //
|
Chris@16
|
164 // std::use_facet may be non-standard, uses a class instead:
|
Chris@16
|
165 //
|
Chris@16
|
166 #if defined(__STL_NO_EXPLICIT_FUNCTION_TMPL_ARGS) || defined(_STLP_NO_EXPLICIT_FUNCTION_TMPL_ARGS)
|
Chris@16
|
167 # define BOOST_NO_STD_USE_FACET
|
Chris@16
|
168 # define BOOST_HAS_STLP_USE_FACET
|
Chris@16
|
169 #endif
|
Chris@16
|
170
|
Chris@16
|
171 //
|
Chris@16
|
172 // If STLport thinks there are no wide functions, <cwchar> etc. is not working; but
|
Chris@16
|
173 // only if BOOST_NO_STDC_NAMESPACE is not defined (if it is then we do the import
|
Chris@16
|
174 // into std:: ourselves).
|
Chris@16
|
175 //
|
Chris@16
|
176 #if defined(_STLP_NO_NATIVE_WIDE_FUNCTIONS) && !defined(BOOST_NO_STDC_NAMESPACE)
|
Chris@16
|
177 # define BOOST_NO_CWCHAR
|
Chris@16
|
178 # define BOOST_NO_CWCTYPE
|
Chris@16
|
179 #endif
|
Chris@16
|
180
|
Chris@16
|
181 //
|
Chris@16
|
182 // If STLport for some reason was configured so that it thinks that wchar_t
|
Chris@16
|
183 // is not an intrinsic type, then we have to disable the support for it as
|
Chris@16
|
184 // well (we would be missing required specializations otherwise).
|
Chris@16
|
185 //
|
Chris@16
|
186 #if !defined( _STLP_HAS_WCHAR_T) || defined(_STLP_WCHAR_T_IS_USHORT)
|
Chris@16
|
187 # undef BOOST_NO_INTRINSIC_WCHAR_T
|
Chris@16
|
188 # define BOOST_NO_INTRINSIC_WCHAR_T
|
Chris@16
|
189 #endif
|
Chris@16
|
190
|
Chris@16
|
191 //
|
Chris@16
|
192 // Borland ships a version of STLport with C++ Builder 6 that lacks
|
Chris@16
|
193 // hashtables and the like:
|
Chris@16
|
194 //
|
Chris@16
|
195 #if defined(__BORLANDC__) && (__BORLANDC__ == 0x560)
|
Chris@16
|
196 # undef BOOST_HAS_HASH
|
Chris@16
|
197 #endif
|
Chris@16
|
198
|
Chris@16
|
199 //
|
Chris@16
|
200 // gcc-2.95.3/STLPort does not like the using declarations we use to get ADL with std::min/max
|
Chris@16
|
201 //
|
Chris@16
|
202 #if defined(__GNUC__) && (__GNUC__ < 3)
|
Chris@16
|
203 # include <algorithm> // for std::min and std::max
|
Chris@16
|
204 # define BOOST_USING_STD_MIN() ((void)0)
|
Chris@16
|
205 # define BOOST_USING_STD_MAX() ((void)0)
|
Chris@16
|
206 namespace boost { using std::min; using std::max; }
|
Chris@16
|
207 #endif
|
Chris@16
|
208
|
Chris@16
|
209 // C++0x headers not yet implemented
|
Chris@16
|
210 //
|
Chris@16
|
211 # define BOOST_NO_CXX11_HDR_ARRAY
|
Chris@16
|
212 # define BOOST_NO_CXX11_HDR_CHRONO
|
Chris@16
|
213 # define BOOST_NO_CXX11_HDR_CODECVT
|
Chris@16
|
214 # define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE
|
Chris@16
|
215 # define BOOST_NO_CXX11_HDR_FORWARD_LIST
|
Chris@16
|
216 # define BOOST_NO_CXX11_HDR_FUTURE
|
Chris@16
|
217 # define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
|
Chris@16
|
218 # define BOOST_NO_CXX11_HDR_MUTEX
|
Chris@16
|
219 # define BOOST_NO_CXX11_HDR_RANDOM
|
Chris@16
|
220 # define BOOST_NO_CXX11_HDR_RATIO
|
Chris@16
|
221 # define BOOST_NO_CXX11_HDR_REGEX
|
Chris@16
|
222 # define BOOST_NO_CXX11_HDR_SYSTEM_ERROR
|
Chris@16
|
223 # define BOOST_NO_CXX11_HDR_THREAD
|
Chris@16
|
224 # define BOOST_NO_CXX11_HDR_TUPLE
|
Chris@16
|
225 # define BOOST_NO_CXX11_HDR_TYPE_TRAITS
|
Chris@16
|
226 # define BOOST_NO_CXX11_HDR_TYPEINDEX
|
Chris@16
|
227 # define BOOST_NO_CXX11_HDR_UNORDERED_MAP
|
Chris@16
|
228 # define BOOST_NO_CXX11_HDR_UNORDERED_SET
|
Chris@16
|
229 # define BOOST_NO_CXX11_NUMERIC_LIMITS
|
Chris@16
|
230 # define BOOST_NO_CXX11_ALLOCATOR
|
Chris@16
|
231 # define BOOST_NO_CXX11_ATOMIC_SMART_PTR
|
Chris@16
|
232 # define BOOST_NO_CXX11_SMART_PTR
|
Chris@16
|
233 # define BOOST_NO_CXX11_HDR_FUNCTIONAL
|
Chris@101
|
234 # define BOOST_NO_CXX11_HDR_ATOMIC
|
Chris@101
|
235 # define BOOST_NO_CXX11_STD_ALIGN
|
Chris@101
|
236 # define BOOST_NO_CXX11_ADDRESSOF
|
Chris@16
|
237
|
Chris@16
|
238 #define BOOST_STDLIB "STLPort standard library version " BOOST_STRINGIZE(__SGI_STL_PORT)
|
Chris@16
|
239
|
Chris@16
|
240
|
Chris@16
|
241
|
Chris@16
|
242
|
Chris@16
|
243
|
Chris@16
|
244
|
Chris@16
|
245
|
Chris@16
|
246
|