]> git.buserror.net Git - polintos/scott/priv.git/blob - include/c++/stl/stl/config/_gcc.h
Add STLport 5.1.4
[polintos/scott/priv.git] / include / c++ / stl / stl / config / _gcc.h
1 /* STLport configuration file
2  * It is internal STLport header - DO NOT include it directly
3  */
4
5 #define _STLP_COMPILER "gcc"
6
7 /* Systems having GLIBC installed have different traits */
8 #if defined (__linux__)
9 #  ifndef _STLP_USE_GLIBC
10 #    define _STLP_USE_GLIBC 1
11 #  endif
12 #  if defined (__UCLIBC__) && !defined (_STLP_USE_UCLIBC)
13 #    define _STLP_USE_UCLIBC 1
14 #  endif
15 #endif
16
17 #if defined (__CYGWIN__) && \
18      (__GNUC__ >= 3) && (__GNUC_MINOR__ >= 3) && !defined (_GLIBCPP_USE_C99)
19 #  define _STLP_NO_VENDOR_MATH_L
20 #  define _STLP_NO_VENDOR_STDLIB_L
21 #endif
22
23 #if (__GNUC__ < 3)
24 #  define _STLP_NO_VENDOR_STDLIB_L
25 #endif
26
27 /* We guess if we are using the cygwin distrib that has a special include schema.
28  * There is no way to distinguish a cygwin distrib used in no-cygwin mode from a
29  * mingw install. We are forced to use a configuration option
30  */
31 #if !defined (_STLP_NATIVE_INCLUDE_PATH) && \
32     (defined (__CYGWIN__) || defined (__MINGW32__) && defined (_STLP_NO_CYGWIN))
33 #  if (__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ > 3))
34 #    define _STLP_NATIVE_INCLUDE_PATH ../../../__GNUC__.__GNUC_MINOR__.__GNUC_PATCHLEVEL__/include/c++
35 #  elif defined (_STLP_NO_CYGWIN)
36 #    define _STLP_NATIVE_INCLUDE_PATH ../mingw
37 /*#  else
38  * Before version gcc 3.4, the cygwin package include path was conform to the
39  * GNU convention which is set later in this file.
40  */
41 #  endif
42 #endif
43
44 #if (__GNUC__ < 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ < 4))
45 /* define for gcc versions before 3.4.0. */
46 #  define _STLP_NO_MEMBER_TEMPLATE_KEYWORD
47 #endif
48
49 /* azov: gcc on lynx have a bug that causes internal
50  * compiler errors when compiling STLport with namespaces turned on.
51  * When the compiler gets better - comment out _STLP_HAS_NO_NAMESPACES
52  */
53 #if defined (__Lynx__) && (__GNUC__ < 3)
54 #  define _STLP_HAS_NO_NAMESPACES 1
55 #  define _STLP_NO_STATIC_TEMPLATE_DATA 1
56 /* turn off useless warning about including system headers */
57 #  define __NO_INCLUDE_WARN__ 1
58 #endif
59
60 /* Tru64 Unix, AIX, HP : gcc there by default uses native ld and hence cannot auto-instantiate
61    static template data. If you are using GNU ld, please say so in user_config.h header */
62 #if (__GNUC__ < 3) && !defined(_STLP_GCC_USES_GNU_LD) && \
63    ((defined (__osf__) && defined (__alpha__)) || defined (_AIX) || defined (__hpux) || defined(__amigaos__) )
64 #  define _STLP_NO_STATIC_TEMPLATE_DATA
65 #endif
66
67 #if !defined (_REENTRANT) && (defined (_THREAD_SAFE) || \
68                              (defined (__OpenBSD__) && defined (_POSIX_THREADS)) || \
69                              (defined (__MINGW32__) && defined (_MT)))
70 #  define _REENTRANT
71 #endif
72
73 #if defined (__DJGPP)
74 #  define _STLP_RAND48    1
75 #  define _NOTHREADS    1
76 #  undef  _PTHREADS
77 #  define _STLP_LITTLE_ENDIAN
78 #endif
79
80 #if defined (__MINGW32__)
81 /* Mingw32, egcs compiler using the Microsoft C runtime */
82 #  define _STLP_VENDOR_GLOBAL_CSTD
83 #  undef  _STLP_NO_DRAND48
84 #  define _STLP_NO_DRAND48
85 #  define _STLP_CALL
86
87 #  if defined (_STLP_NEW_PLATFORM_SDK)
88 /* For the moment the Windows SDK coming with Mingw still mimik the old platform SDK. */
89 #    undef _STLP_NEW_PLATFORM_SDK
90 #  endif
91 #endif /* __MINGW32__ */
92
93 #if defined (__CYGWIN__) || defined (__MINGW32__)
94 #  if !defined (_STLP_USE_STATIC_LIB)
95 #    define _STLP_USE_DECLSPEC 1
96 #    if !defined (_STLP_USE_DYNAMIC_LIB)
97 #      define _STLP_USE_DYNAMIC_LIB
98 #    endif
99 #    define _STLP_EXPORT_DECLSPEC __declspec(dllexport)
100 #    define _STLP_CLASS_EXPORT_DECLSPEC __declspec(dllexport)
101 #    define _STLP_CLASS_IMPORT_DECLSPEC __declspec(dllimport)
102 #  endif
103 /* The following is defined independently of _STLP_USE_STATIC_LIB because it is also
104  * used to import symbols from PSDK under MinGW
105  */
106 #  define _STLP_IMPORT_DECLSPEC __declspec(dllimport)
107 #endif
108
109 #if defined (__CYGWIN__) || defined (__MINGW32__) || !(defined (_STLP_USE_GLIBC) || defined (__sun) || defined(__APPLE__))
110 #  if !defined (__MINGW32__) && !defined (__CYGWIN__)
111 #    define _STLP_NO_NATIVE_MBSTATE_T    1
112 #  endif
113 #  if !defined (__MINGW32__) || (__GNUC__ < 3) || (__GNUC__ == 3) && (__GNUC_MINOR__ < 4)
114 #    define _STLP_NO_NATIVE_WIDE_FUNCTIONS 1
115 #  endif
116 #  define _STLP_NO_NATIVE_WIDE_STREAMS   1
117 #endif
118
119 #define _STLP_NORETURN_FUNCTION __attribute__((noreturn))
120
121 /* Mac OS X is a little different with namespaces and cannot instantiate
122  * static data members in template classes */
123 #if defined (__APPLE__)
124 #  if ((__GNUC__ < 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ < 3)))
125 /* Mac OS X is missing a required typedef and standard macro */
126 typedef unsigned int wint_t;
127 #  endif
128
129 #  define __unix
130
131 #  if (__GNUC__ < 3)
132
133  /* Mac OS X needs one and only one source file to initialize all static data
134   * members in template classes. Only one source file in an executable or
135   * library can declare instances for such data members, otherwise duplicate
136   * symbols will be generated. */
137
138 #    define _STLP_NO_STATIC_TEMPLATE_DATA
139 #    define _STLP_STATIC_CONST_INIT_BUG 1
140 #    define _STLP_STATIC_TEMPLATE_DATA 0
141 #    define _STLP_WEAK_ATTRIBUTE 1
142  /* Workaround for the broken Mac OS X C++ preprocessor which cannot handle
143   * parameterized macros in #include statements */
144 #    define _STLP_NATIVE_HEADER(header) <../g++/##header##>
145 #    define _STLP_NATIVE_C_HEADER(header) <../include/##header##>
146 #    define _STLP_NATIVE_CPP_C_HEADER(header) <../g++/##header##>
147 #    define _STLP_NATIVE_OLD_STREAMS_HEADER(header) <../g++/##header##>
148 #    define _STLP_NATIVE_CPP_RUNTIME_HEADER(header) <../g++/##header##>
149 #  endif /* __GNUC__ < 3 */
150
151 #  define _STLP_NO_LONG_DOUBLE
152
153 /* Mac OS X needs all "::" scope references to be "std::" */
154 #  define _STLP_USE_NEW_C_HEADERS
155
156 #  define _STLP_NO_VENDOR_STDLIB_L
157
158 #endif /* __APPLE__ */
159
160
161 #if defined(__BEOS__) && defined(__INTEL__)
162 #  define _STLP_NATIVE_HEADER(header) <../stlport/beos/##header##>
163 #  define _STLP_NATIVE_C_HEADER(header) <../stlport/beos/##header##>
164 #  define _STLP_NATIVE_CPP_C_HEADER(header) <../stlport/beos/##header##>
165 #  define _STLP_NATIVE_OLD_STREAMS_HEADER(header) <../stlport/beos/##header##>
166 #  define _STLP_NATIVE_CPP_RUNTIME_HEADER(header) <../stlport/beos/##header##>
167 #  define _STLP_NO_NATIVE_WIDE_FUNCTIONS 1
168 #  define _STLP_NO_NATIVE_WIDE_STREAMS   1
169 /*
170 #  define _NOTHREADS 1
171 */
172 #  ifdef _PTHREADS
173 #    undef  _PTHREADS
174 #  endif
175 #  ifdef _STLP_PTHREADS
176 #    undef _STLP_PTHREADS
177 #  endif
178 #  define _STLP_USE_STDIO_IO 1
179 #  define _STLP_USE_GLIBC 1
180 #endif
181
182 /* g++ 2.7.x and above */
183 #define _STLP_LONG_LONG long long
184
185 #ifdef _STLP_USE_UCLIBC
186 /*
187 #  ifndef __DO_C99_MATH__
188 */
189   /* No *f math fuctions variants (i.e. sqrtf, fabsf, etc.) */
190 #  define _STLP_NO_VENDOR_MATH_F
191   /* No *l math fuctions variants (i.e. sqrtl, fabsl, etc.) */
192 #  define _STLP_NO_VENDOR_MATH_L
193 #  define _STLP_NO_LONG_DOUBLE
194 /*
195 #  endif
196 */
197 #endif
198
199 #if defined (__OpenBSD__) || defined (__FreeBSD__)
200 #  define _STLP_NO_VENDOR_MATH_L
201 #  define _STLP_NO_VENDOR_STDLIB_L /* no llabs */
202 #  ifndef __unix
203 #    define __unix
204 #  endif
205 #endif
206
207 #if defined (__alpha__)
208 #  define _STLP_NO_VENDOR_MATH_L
209 #  define _STLP_NO_IEC559_SUPPORT
210 #endif
211
212 #if defined (__hpux)
213 #  define _STLP_NO_VENDOR_STDLIB_L /* no llabs */
214   /* No *f math fuctions variants (i.e. sqrtf, fabsf, etc.) */
215 #  define _STLP_NO_VENDOR_MATH_F
216 #endif
217
218 #if (__GNUC__ >= 3)
219 #  ifndef _STLP_HAS_NO_NEW_C_HEADERS
220 /*
221 #    ifndef _STLP_USE_UCLIBC
222 */
223 #    define _STLP_HAS_NATIVE_FLOAT_ABS
224 /*
225 #    endif
226 */
227 #  else
228 #    ifdef _STLP_USE_GLIBC
229 #      define _STLP_VENDOR_LONG_DOUBLE_MATH  1
230 #    endif
231 #  endif
232 #endif
233
234 #if (__GNUC__ < 3)
235 #  define _STLP_HAS_NO_NEW_C_HEADERS     1
236 #  define _STLP_VENDOR_GLOBAL_CSTD       1
237 #  define _STLP_DONT_USE_PTHREAD_SPINLOCK 1
238 #  ifndef __HONOR_STD
239 #    define _STLP_VENDOR_GLOBAL_EXCEPT_STD 1
240 #  endif
241 /* egcs fails to initialize builtin types in expr. like this : new(p) char();  */
242 #  define _STLP_DEF_CONST_PLCT_NEW_BUG 1
243 #endif
244
245 /*
246 #define _STLP_VENDOR_GLOBAL_CSTD 1
247 */
248
249 #if (__GNUC__ == 2) && (__GNUC_MINOR__ < 95)
250 #  define _STLP_NO_UNCAUGHT_EXCEPT_SUPPORT
251 #  define _STLP_NO_UNEXPECTED_EXCEPT_SUPPORT
252 #  define _STLP_DEF_CONST_DEF_PARAM_BUG 1
253 #else
254 #  undef _STLP_NO_UNCAUGHT_EXCEPT_SUPPORT
255 #  undef _STLP_NO_UNEXPECTED_EXCEPT_SUPPORT
256 #endif
257
258 #if (__GNUC_MINOR__ < 9)  && (__GNUC__ < 3) /* gcc 2.8 */
259 #  define _STLP_NO_TEMPLATE_CONVERSIONS
260 #  define _STLP_NO_MEMBER_TEMPLATE_CLASSES 1
261 #  define _STLP_NO_FUNCTION_TMPL_PARTIAL_ORDER 1
262 #  define _STLP_NO_FRIEND_TEMPLATES 1
263 #  define _STLP_HAS_NO_NAMESPACES 1
264 #  define _STLP_NO_METHOD_SPECIALIZATION 1
265 #  define _STLP_NO_MEMBER_TEMPLATES 1
266 #  define _STLP_NO_CLASS_PARTIAL_SPECIALIZATION 1
267 #  define _STLP_DONT_SIMULATE_PARTIAL_SPEC_FOR_TYPE_TRAITS
268 /*  DJGPP doesn't seem to implement it in 2.8.x */
269 #  ifdef DJGPP
270 #    define  _STLP_NO_STATIC_TEMPLATE_DATA 1
271 #  endif
272 #endif
273
274 #if __GNUC__ <= 2 && __GNUC_MINOR__ <= 7 && !defined (__CYGWIN32__)
275 /* Will it work with 2.6 ? I doubt it. */
276 #  if ( __GNUC_MINOR__ < 6 )
277 __GIVE_UP_WITH_STL(GCC_272);
278 #  endif
279
280 #  define  _STLP_NO_RELOPS_NAMESPACE
281 #  define  _STLP_NON_TYPE_TMPL_PARAM_BUG
282 #  define  _STLP_LIMITED_DEFAULT_TEMPLATES 1
283 #  define  _STLP_DEFAULT_TYPE_PARAM 1
284 #  define  _STLP_NO_BAD_ALLOC
285 #  define  _STLP_NO_ARROW_OPERATOR 1
286 #  ifndef _STLP_NO_STATIC_TEMPLATE_DATA
287 #    define  _STLP_NO_STATIC_TEMPLATE_DATA
288 #  endif
289 #  define  _STLP_STATIC_CONST_INIT_BUG 1
290 #  define  _STLP_NO_METHOD_SPECIALIZATION 1
291
292 #  if !defined (__CYGWIN32__)
293 #    define _STLP_NESTED_TYPE_PARAM_BUG   1
294 #    define _STLP_BASE_MATCH_BUG       1
295 /*  unused operators are required (forward) */
296 #    define  _STLP_CONST_CONSTRUCTOR_BUG
297 #    define _STLP_NO_DEFAULT_NON_TYPE_PARAM
298 #  endif
299 #  define _STLP_NO_PARTIAL_SPECIALIZATION_SYNTAX 1
300 #  define _STLP_NO_EXPLICIT_FUNCTION_TMPL_ARGS 1
301 #  define _STLP_NO_EXCEPTION_HEADER 1
302 #else /* ! <= 2.7.* */
303 #endif /* ! <= 2.7.* */
304
305 /* static template data members workaround strategy for gcc tries
306  * to use weak symbols.
307  * if you don't want to use that, #define _STLP_WEAK_ATTRIBUTE=0 ( you'll
308  * have to put "#define __PUT_STATIC_DATA_MEMBERS_HERE" line in one of your
309  * compilation unit ( or CFLAGS for it ) _before_ including any STL header ).
310  */
311 #if defined (_STLP_NO_STATIC_TEMPLATE_DATA) && ! defined (_STLP_WEAK_ATTRIBUTE )
312 /* systems using GNU ld or format that supports weak symbols
313    may use "weak" attribute
314    Linux & Solaris ( x86 & SPARC ) are being auto-recognized here */
315 #  if defined(_STLP_GNU_LD) || defined(__ELF__) || defined (__CYGWIN__) || \
316      (( defined (__SVR4) || defined ( __svr4__ )) && \
317       ( defined (sun) || defined ( __sun__ )))
318 #    define _STLP_WEAK_ATTRIBUTE 1
319 #  endif
320 #endif /* _STLP_WEAK_ATTRIBUTE */
321
322
323 /* strict ANSI prohibits "long long" ( gcc) */
324 #if defined ( __STRICT_ANSI__ )
325 #  undef _STLP_LONG_LONG
326 /*
327 #    define _STLP_STRICT_ANSI 1
328 */
329 #endif
330
331 /*
332 #if !defined (__STRICT_ANSI__) || defined (__BUILDING_STLPORT)
333 #  define _STLP_USE_TEMPLATE_EXPORT
334 #  define _STLP_EXPORT_TEMPLATE_KEYWORD extern
335 #  define _STLP_IMPORT_TEMPLATE_KEYWORD extern
336 #endif
337 */
338
339 #ifndef __EXCEPTIONS
340 #  undef  _STLP_DONT_USE_EXCEPTIONS
341 #  define _STLP_DONT_USE_EXCEPTIONS 1
342 #endif
343
344 #if (__GNUC__ >= 3)
345
346 #  if !defined (_STLP_NATIVE_INCLUDE_PATH)
347 #    if ( (__GNUC__ == 3 ) && ((__GNUC_MINOR__ == 0) || ((__GNUC_MINOR__ < 3) && defined(__APPLE_CC__))))
348 #      define _STLP_NATIVE_INCLUDE_PATH ../g++-v3
349 #    else
350 #      if ( ((__GNUC__ == 4 ) || (__GNUC_MINOR__ >= 3)) && defined(__APPLE_CC__))
351 #        define _STLP_NATIVE_INCLUDE_PATH ../c++
352 /*
353 * Before version 3.4.0 the 0 patch level was not part of the include path:
354 */
355 #      elif defined (__GNUC_PATCHLEVEL__) && ((__GNUC_PATCHLEVEL__ > 0) || \
356                                               (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || \
357                                               (__GNUC__ > 3))
358 #        define _STLP_NATIVE_INCLUDE_PATH ../__GNUC__.__GNUC_MINOR__.__GNUC_PATCHLEVEL__
359 #      else
360 #        define _STLP_NATIVE_INCLUDE_PATH ../__GNUC__.__GNUC_MINOR__
361 #      endif
362 #    endif
363 #  endif
364
365 /* Instantiation scheme that used (default) in gcc 3 made void of sense explicit
366    instantiation within library: nothing except increased library size. - ptr
367  */
368 #  define _STLP_NO_FORCE_INSTANTIATE
369
370 #elif (__GNUC_MINOR__ < 8)
371
372 #  if !defined (_STLP_NATIVE_INCLUDE_PATH)
373 #    define _STLP_NATIVE_INCLUDE_PATH ../g++-include
374 #  endif
375
376 /* tuning of static template data members workaround */
377 #  if ( _STLP_STATIC_TEMPLATE_DATA < 1 )
378 #    if ( _STLP_WEAK_ATTRIBUTE > 0 )
379 #      define _STLP_WEAK __attribute__ (( weak ))
380 #    else
381 #      define _STLP_WEAK
382 #    endif /* _STLP_WEAK_ATTRIBUTE */
383
384 #    ifdef __PUT_STATIC_DATA_MEMBERS_HERE
385 #      define __DECLARE_INSTANCE(type,item,init) type item _STLP_WEAK init
386 #    else
387 #      define __DECLARE_INSTANCE(type,item,init)
388 #    endif /* __PUT_STATIC_DATA_MEMBERS_HERE */
389 #  endif /* _STLP_STATIC_TEMPLATE_DATA */
390
391 #else
392
393 /* gcc-2.95.0 used to use "g++-3" directory which has been changed to "g++" in
394  * system-dependent "include" for 2.95.2 except for Cygwin and Mingw packages.
395  * I expect "g++-3" not being used in later releases.
396  * If your installation use "g++-3" include directory for any reason (pre-2.95.2 or Win binary kit),
397  * please change the macro below to point to your directory.
398  */
399
400 #  if !defined (_STLP_NATIVE_INCLUDE_PATH)
401 #    if defined(__DJGPP)
402 #      define _STLP_NATIVE_INCLUDE_PATH ../lang/cxx
403 #    elif (__GNUC__ >= 3) || (__GNUC_MINOR__ >= 97)
404 #      define _STLP_NATIVE_INCLUDE_PATH ../include/g++-v3
405 #    elif ((__GNUC_MINOR__ >= 95 && __GNUC_MINOR__ < 97) && \
406           !( defined (__FreeBSD__) || defined (__NetBSD__) || defined(__sgi) || defined (__OS2__) ) )
407 #      define _STLP_NATIVE_INCLUDE_PATH ../g++-3
408 #    elif (__GNUC_MINOR__ > 8) && (__GNUC_MINOR__ < 95) && (__GNUC__ < 3) && !defined( __Lynx__ )
409 /* this really sucks, as GNUpro does not really identifies itself, so we have to guess
410  * depending on a platform
411  */
412 #      ifdef __hpux
413 #        define _STLP_NATIVE_INCLUDE_PATH ../g++-3
414 #      else
415 #        define _STLP_NATIVE_INCLUDE_PATH ../g++-2
416 #      endif
417 #    else
418 #      define _STLP_NATIVE_INCLUDE_PATH g++
419 #    endif
420 #  endif
421
422 /* <exception> et al */
423 #  ifdef __FreeBSD__
424 #    if (__GNUC__ > 2) || (__GNUC__ == 2 && __GNUC_MINOR__ > 95)
425 #      define _STLP_NATIVE_CPP_RUNTIME_INCLUDE_PATH ../include
426 #    endif
427 #  else
428 /* azov */
429 #    ifndef __Lynx__
430 #      if (__GNUC__ > 2) || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)
431 /*
432 #     define _STLP_NATIVE_CPP_RUNTIME_INCLUDE_PATH ../g++-v3
433 */
434 #      else
435 #        define _STLP_NATIVE_CPP_RUNTIME_INCLUDE_PATH ../include
436 #      endif
437 #    endif
438 #  endif
439
440 #endif /* GNUC_MINOR < 8 */
441
442 #if !defined (_STLP_NATIVE_C_INCLUDE_PATH)
443 #  define _STLP_NATIVE_C_INCLUDE_PATH ../include
444 #endif
445
446 /* Tune settings for the case where static template data members are not
447  * instaniated by default
448  */
449 #if defined ( _STLP_NO_STATIC_TEMPLATE_DATA )
450 #  define _STLP_STATIC_TEMPLATE_DATA 0
451 #  if !defined ( _STLP_WEAK_ATTRIBUTE )
452 #    define _STLP_WEAK_ATTRIBUTE 0
453 #  endif
454 #  ifdef __PUT_STATIC_DATA_MEMBERS_HERE
455 #    define __DECLARE_INSTANCE(type,item,init) type item init
456 #  else
457 #    define __DECLARE_INSTANCE(type,item,init)
458 #  endif
459 #else
460 #  define _STLP_STATIC_TEMPLATE_DATA 1
461 #endif
462