4 * Hewlett-Packard Company
6 * Permission to use, copy, modify, distribute and sell this software
7 * and its documentation for any purpose is hereby granted without fee,
8 * provided that the above copyright notice appear in all copies and
9 * that both that copyright notice and this permission notice appear
10 * in supporting documentation. Hewlett-Packard Company makes no
11 * representations about the suitability of this software for any
12 * purpose. It is provided "as is" without express or implied warranty.
17 * Permission to use, copy, modify, distribute and sell this software
18 * and its documentation for any purpose is hereby granted without fee,
19 * provided that the above copyright notice appear in all copies and
20 * that both that copyright notice and this permission notice appear
21 * in supporting documentation. Silicon Graphics makes no
22 * representations about the suitability of this software for any
23 * purpose. It is provided "as is" without express or implied warranty.
27 #ifndef __STL_CONFIG_H
28 # define __STL_CONFIG_H
101 # define __STL_PTHREADS
104 # define __STL_SOLTHREADS
107 # if defined(__sgi) && !defined(__GNUC__)
109 # define __STL_NO_BOOL
111 # if defined(_WCHAR_T_IS_KEYWORD)
112 # define __STL_HAS_WCHAR_T
114 # if !defined(_TYPENAME_IS_KEYWORD)
115 # define __STL_NEED_TYPENAME
117 # ifdef _PARTIAL_SPECIALIZATION_OF_CLASS_TEMPLATES
118 # define __STL_CLASS_PARTIAL_SPECIALIZATION
120 # ifdef _MEMBER_TEMPLATES
121 # define __STL_MEMBER_TEMPLATES
122 # define __STL_MEMBER_TEMPLATE_CLASSES
124 # if defined(_MEMBER_TEMPLATE_KEYWORD)
125 # define __STL_MEMBER_TEMPLATE_KEYWORD
127 # if (_COMPILER_VERSION >= 730) && defined(_MIPS_SIM) && _MIPS_SIM != _ABIO32
128 # define __STL_MEMBER_TEMPLATE_KEYWORD
130 # if !defined(_EXPLICIT_IS_KEYWORD)
131 # define __STL_NEED_EXPLICIT
134 # define __STL_USE_EXCEPTIONS
136 # if (_COMPILER_VERSION >= 721) && defined(_NAMESPACES)
137 # define __STL_HAS_NAMESPACES
139 # if (_COMPILER_VERSION < 721)
140 # define __STL_NO_EXCEPTION_HEADER
142 # if !defined(_NOTHREADS) && !defined(__STL_PTHREADS)
143 # define __STL_SGI_THREADS
145 # if defined(_LONGLONG) && defined(_SGIAPI) && _SGIAPI
146 # define __STL_LONG_LONG
151 # include <_G_config.h>
152 # define __STL_HAS_WCHAR_T
153 # if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8)
154 # define __STL_STATIC_TEMPLATE_MEMBER_BUG
155 # define __STL_NEED_TYPENAME
156 # define __STL_NEED_EXPLICIT
158 # define __STL_CLASS_PARTIAL_SPECIALIZATION
159 # define __STL_FUNCTION_TMPL_PARTIAL_ORDER
160 # define __STL_MEMBER_TEMPLATES
161 # define __STL_MEMBER_TEMPLATE_CLASSES
162 # define __STL_EXPLICIT_FUNCTION_TMPL_ARGS
163 # define __STL_HAS_NAMESPACES
164 # define __STL_NO_NAMESPACES
165 # define __SGI_STL_USE_AUTO_PTR_CONVERSIONS
166 # define __STL_USE_NAMESPACES
168 # if defined(__linux__)
169 /* glibc pre 2.0 is very buggy. We have to disable thread for it.
170 It should be upgraded to glibc 2.0 or later. */
171 # if !defined(_NOTHREADS) && __GLIBC__ >= 2 && defined(_G_USING_THUNKS)
172 # define __STL_PTHREADS
173 # ifdef __STRICT_ANSI__
174 /* Work around a bug in the glibc 2.0.x pthread.h. */
175 # define sigset_t __sigset_t
180 # define __STL_USE_EXCEPTIONS
182 # ifndef __STRICT_ANSI__
183 # define __STL_LONG_LONG
187 # if defined(__SUNPRO_CC)
188 # define __STL_NO_BOOL
189 # define __STL_NEED_TYPENAME
190 # define __STL_NEED_EXPLICIT
191 # define __STL_USE_EXCEPTIONS
194 # if defined(__COMO__)
195 # define __STL_MEMBER_TEMPLATES
196 # define __STL_MEMBER_TEMPLATE_CLASSES
197 # define __STL_CLASS_PARTIAL_SPECIALIZATION
198 # define __STL_USE_EXCEPTIONS
199 # define __STL_HAS_NAMESPACES
202 # if defined(__MINGW32__)
203 # define __STL_NO_DRAND48
205 # define __STL_WIN32THREADS
209 # if defined(__CYGWIN__) || defined(__MSYS__)
210 # define __STL_NO_DRAND48
213 # if defined(_MSC_VER)
214 # define __STL_NO_DRAND48
215 # define __STL_NEED_TYPENAME
216 # if _MSC_VER < 1100 /* 1000 is version 4.0, 1100 is 5.0, 1200 is 6.0. */
217 # define __STL_NEED_EXPLICIT
218 # define __STL_NO_BOOL
221 # define __STL_DONT_USE_BOOL_TYPEDEF
224 # define __STL_NON_TYPE_TMPL_PARAM_BUG
225 # define __SGI_STL_NO_ARROW_OPERATOR
227 # define __STL_USE_EXCEPTIONS
230 # define __STL_WIN32THREADS
232 # if _MSC_VER >= 1200
233 # define __STL_PARTIAL_SPECIALIZATION_SYNTAX
234 # define __STL_HAS_NAMESPACES
235 # define __STL_NO_NAMESPACES
239 # if defined(__BORLANDC__)
240 # define __STL_NO_DRAND48
241 # define __STL_NEED_TYPENAME
242 # define __STL_LIMITED_DEFAULT_TEMPLATES
243 # define __SGI_STL_NO_ARROW_OPERATOR
244 # define __STL_NON_TYPE_TMPL_PARAM_BUG
246 # define __STL_USE_EXCEPTIONS
249 # define __STL_WIN32THREADS
253 # if defined(__STL_NO_BOOL) && !defined(__STL_DONT_USE_BOOL_TYPEDEF)
259 # ifdef __STL_NEED_TYPENAME
263 # ifdef __STL_MEMBER_TEMPLATE_KEYWORD
264 # define __STL_TEMPLATE template
266 # define __STL_TEMPLATE
269 # ifdef __STL_NEED_EXPLICIT
273 # ifdef __STL_EXPLICIT_FUNCTION_TMPL_ARGS
274 # define __STL_NULL_TMPL_ARGS <>
276 # define __STL_NULL_TMPL_ARGS
279 # if defined(__STL_CLASS_PARTIAL_SPECIALIZATION) \
280 || defined (__STL_PARTIAL_SPECIALIZATION_SYNTAX)
281 # define __STL_TEMPLATE_NULL template<>
283 # define __STL_TEMPLATE_NULL
290 # if defined(__STL_CLASS_PARTIAL_SPECIALIZATION) && \
291 defined(__STL_MEMBER_TEMPLATES) && \
292 defined(__STL_MEMBER_TEMPLATE_CLASSES) && \
293 !defined(__STL_NO_BOOL) && \
294 !defined(__STL_NON_TYPE_TMPL_PARAM_BUG) && \
295 !defined(__STL_LIMITED_DEFAULT_TEMPLATES) && \
296 !defined(__STL_USE_SGI_ALLOCATORS)
297 # define __STL_USE_STD_ALLOCATORS
300 # ifndef __STL_DEFAULT_ALLOCATOR
301 # ifdef __STL_USE_STD_ALLOCATORS
302 # define __STL_DEFAULT_ALLOCATOR(T) allocator<T>
304 # define __STL_DEFAULT_ALLOCATOR(T) alloc
310 # if defined(__STL_HAS_NAMESPACES) && !defined(__STL_NO_NAMESPACES)
312 # define __STL_BEGIN_NAMESPACE namespace std {
313 # define __STL_END_NAMESPACE }
314 # define __STL_USE_NAMESPACE_FOR_RELOPS
315 # define __STL_BEGIN_RELOPS_NAMESPACE namespace std {
316 # define __STL_END_RELOPS_NAMESPACE }
317 # define __STD_RELOPS std
318 # define __STL_USE_NAMESPACES
321 # define __STL_BEGIN_NAMESPACE
322 # define __STL_END_NAMESPACE
323 # undef __STL_USE_NAMESPACE_FOR_RELOPS
324 # define __STL_BEGIN_RELOPS_NAMESPACE
325 # define __STL_END_RELOPS_NAMESPACE
326 # define __STD_RELOPS
327 # undef __STL_USE_NAMESPACES
330 # ifdef __STL_USE_EXCEPTIONS
331 # define __STL_TRY try
332 # define __STL_CATCH_ALL catch(...)
333 # define __STL_THROW(x) throw x
334 # define __STL_RETHROW throw
335 # define __STL_NOTHROW throw()
336 # define __STL_UNWIND(action) catch(...) { action; throw; }
339 # define __STL_CATCH_ALL if (false)
340 # define __STL_THROW(x)
341 # define __STL_RETHROW
342 # define __STL_NOTHROW
343 # define __STL_UNWIND(action)
346 #ifdef __STL_ASSERTIONS
348 # define __stl_assert(expr) \
349 if (!(expr)) { fprintf(stderr, "%s:%d STL assertion failure: %s\n", \
350 __FILE__, __LINE__, # expr); abort(); }
352 # define __stl_assert(expr)
355 #endif /* __STL_CONFIG_H */