|
1 /* STLport configuration file |
|
2 * It is internal STLport header - DO NOT include it directly |
|
3 */ |
|
4 |
|
5 /* Systems having GLIBC installed have different traits */ |
|
6 #if ! defined (_STLP_USE_GLIBC) && ( defined (__linux__) || defined (__CYGWIN__) ) |
|
7 # define _STLP_USE_GLIBC |
|
8 #endif |
|
9 |
|
10 # if (__GNUC__ < 3) || (__GNUC__ == 3 && __GNUC_MINOR__ < 4) |
|
11 # define _STLP_NO_MEMBER_TEMPLATE_KEYWORD |
|
12 # endif |
|
13 |
|
14 |
|
15 # if defined(__FreeBSD__) || defined (__hpux) || defined(__amigaos__) || ( defined(__OS2__) && defined(__EMX__) ) |
|
16 # define _STLP_NO_WCHAR_T |
|
17 # endif |
|
18 |
|
19 #ifdef __USLC__ |
|
20 # include <config/stl_sco.h> |
|
21 #endif |
|
22 |
|
23 # if defined (__sun) |
|
24 |
|
25 // gcc does not support ELF64 yet ; however; it supports ultrasparc + v8plus. |
|
26 // limits.h contains invalid values for this combination |
|
27 # if (defined (__sparc_v9__) || defined (__sparcv9)) && ! defined ( __WORD64 ) |
|
28 # define __LONG_MAX__ 2147483647L |
|
29 # endif |
|
30 |
|
31 # include <config/stl_solaris.h> |
|
32 # endif |
|
33 |
|
34 // no thread support on AmigaOS |
|
35 #if defined (__amigaos__) |
|
36 # define _NOTHREADS |
|
37 # define _STLP_NO_THREADS |
|
38 #endif |
|
39 |
|
40 // azov: gcc on lynx have a bug that causes internal |
|
41 // compiler errors when compiling STLport with namespaces turned on. |
|
42 // When the compiler gets better - comment out _STLP_HAS_NO_NAMESPACES |
|
43 # if defined (__Lynx__) && (__GNUC__ < 3) |
|
44 # define _STLP_HAS_NO_NAMESPACES 1 |
|
45 # define _STLP_NO_STATIC_TEMPLATE_DATA 1 |
|
46 // turn off useless warning about including system headers |
|
47 # define __NO_INCLUDE_WARN__ 1 |
|
48 # endif |
|
49 |
|
50 |
|
51 /* Tru64 Unix, AIX, HP : gcc there by default uses uses native ld and hence cannot auto-instantiate |
|
52 static template data. If you are using GNU ld, please say so in stl_user_config.h header */ |
|
53 # if (__GNUC__ < 3) && ! (_STLP_GCC_USES_GNU_LD) && \ |
|
54 ((defined (__osf__) && defined (__alpha__)) || defined (_AIX) || defined (__hpux) || defined(__amigaos__) ) |
|
55 # define _STLP_NO_STATIC_TEMPLATE_DATA |
|
56 # endif |
|
57 |
|
58 # if defined(__DJGPP) |
|
59 # define _STLP_RAND48 1 |
|
60 # define _NOTHREADS 1 |
|
61 # undef _PTHREADS |
|
62 # define _STLP_LITTLE_ENDIAN |
|
63 # endif |
|
64 |
|
65 # if defined(__MINGW32__) |
|
66 /* Mingw32, egcs compiler using the Microsoft C runtime */ |
|
67 # undef _STLP_NO_DRAND48 |
|
68 # define _STLP_NO_DRAND48 |
|
69 # ifdef _MT |
|
70 # define _REENTRANT |
|
71 # endif |
|
72 # define _STLP_IMPORT_DECLSPEC __attribute__((dllimport)) |
|
73 # define _STLP_EXPORT_DECLSPEC __attribute__((dllexport)) |
|
74 # define _STLP_CLASS_IMPORT_DECLSPEC __attribute__((dllimport)) |
|
75 # define _STLP_CLASS_EXPORT_DECLSPEC __attribute__((dllexport)) |
|
76 # define _STLP_CALL |
|
77 |
|
78 # if defined (_STLP_USE_DYNAMIC_LIB) |
|
79 # define _STLP_USE_DECLSPEC 1 |
|
80 // # define _STLP_USE_TEMPLATE_EXPORT 1 |
|
81 /* Using dynamic library in MinGW requires _STLP_NO_CUSTOM_IO */ |
|
82 # define _STLP_NO_CUSTOM_IO |
|
83 # endif |
|
84 |
|
85 # endif |
|
86 |
|
87 #if defined (__CYGWIN__) || defined (__MINGW32__) || !(defined (_STLP_USE_GLIBC) || defined (__sun)) |
|
88 #ifndef __MINGW32__ |
|
89 # define _STLP_NO_NATIVE_MBSTATE_T 1 |
|
90 #endif |
|
91 # define _STLP_NO_NATIVE_WIDE_FUNCTIONS 1 |
|
92 # define _STLP_NO_NATIVE_WIDE_STREAMS 1 |
|
93 # elif defined(__linux__) |
|
94 # define _STLP_NO_NATIVE_WIDE_FUNCTIONS 1 |
|
95 # define _STLP_NO_NATIVE_WIDE_STREAMS 1 |
|
96 # elif defined (__sun) |
|
97 # define _STLP_WCHAR_BORLAND_EXCLUDE |
|
98 # define _STLP_NO_NATIVE_WIDE_FUNCTIONS 1 |
|
99 #endif |
|
100 |
|
101 /* Mac OS X is a little different with namespaces and cannot instantiate |
|
102 * static data members in template classes */ |
|
103 # if defined (__APPLE__) |
|
104 /* Mac OS X is missing a required typedef and standard macro */ |
|
105 typedef unsigned int wint_t; |
|
106 |
|
107 # define __unix |
|
108 |
|
109 # if (__GNUC__ < 3) |
|
110 |
|
111 /* Mac OS X needs one and only one source file to initialize all static data |
|
112 * members in template classes. Only one source file in an executable or |
|
113 * library can declare instances for such data members, otherwise duplicate |
|
114 * symbols will be generated. */ |
|
115 |
|
116 # define _STLP_NO_STATIC_TEMPLATE_DATA |
|
117 # define _STLP_STATIC_CONST_INIT_BUG 1 |
|
118 # define _STLP_STATIC_TEMPLATE_DATA 0 |
|
119 # define _STLP_WEAK_ATTRIBUTE 1 |
|
120 /* Workaround for the broken Mac OS X C++ preprocessor which cannot handle |
|
121 * parameterized macros in #include statements */ |
|
122 # define _STLP_NATIVE_HEADER(header) <../g++/##header##> |
|
123 # define _STLP_NATIVE_C_HEADER(header) <../include/##header##> |
|
124 # define _STLP_NATIVE_CPP_C_HEADER(header) <../g++/##header##> |
|
125 # define _STLP_NATIVE_OLD_STREAMS_HEADER(header) <../g++/##header##> |
|
126 # define _STLP_NATIVE_CPP_RUNTIME_HEADER(header) <../g++/##header##> |
|
127 # endif /* __GNUC__ < 3 */ |
|
128 |
|
129 # define _STLP_NO_LONG_DOUBLE |
|
130 |
|
131 /* Mac OS X needs all "::" scope references to be "std::" */ |
|
132 #define _STLP_USE_NEW_C_HEADERS |
|
133 # endif |
|
134 |
|
135 |
|
136 # if defined(__BEOS__) && defined(__INTEL__) |
|
137 # define _STLP_NATIVE_HEADER(header) <../stlport/beos/##header##> |
|
138 # define _STLP_NATIVE_C_HEADER(header) <../stlport/beos/##header##> |
|
139 # define _STLP_NATIVE_CPP_C_HEADER(header) <../stlport/beos/##header##> |
|
140 # define _STLP_NATIVE_OLD_STREAMS_HEADER(header) <../stlport/beos/##header##> |
|
141 # define _STLP_NATIVE_CPP_RUNTIME_HEADER(header) <../stlport/beos/##header##> |
|
142 # define _STLP_NO_NATIVE_WIDE_FUNCTIONS 1 |
|
143 # define _STLP_NO_NATIVE_WIDE_STREAMS 1 |
|
144 //# define _NOTHREADS 1 |
|
145 # ifdef _PTHREADS |
|
146 # undef _PTHREADS |
|
147 # endif |
|
148 # ifdef _STLP_PTHREADS |
|
149 # undef _STLP_PTHREADS |
|
150 # endif |
|
151 # define _STLP_USE_STDIO_IO 1 |
|
152 # define _STLP_USE_GLIBC 1 |
|
153 # endif |
|
154 |
|
155 |
|
156 /* g++ 2.7.x and above */ |
|
157 # define _STLP_LONG_LONG long long |
|
158 |
|
159 # if (__GNUC__ >= 3) |
|
160 # ifndef _STLP_HAS_NO_NEW_C_HEADERS |
|
161 # define _STLP_HAS_NATIVE_FLOAT_ABS |
|
162 # else |
|
163 # ifdef _STLP_USE_GLIBC |
|
164 # define _STLP_VENDOR_LONG_DOUBLE_MATH 1 // - ptr: with new c headers no needs |
|
165 // # define _STLP_REAL_LOCALE_IMPLEMENTED |
|
166 # endif |
|
167 # endif |
|
168 # endif |
|
169 |
|
170 # if (__GNUC__ < 3) |
|
171 # define _STLP_HAS_NO_NEW_C_HEADERS 1 |
|
172 # define _STLP_VENDOR_GLOBAL_CSTD 1 |
|
173 # define _STLP_HAS_NO_NEW_IOSTREAMS 1 |
|
174 # ifndef __HONOR_STD |
|
175 # define _STLP_VENDOR_GLOBAL_EXCEPT_STD 1 |
|
176 # endif |
|
177 # endif |
|
178 |
|
179 # if (__GNUC_MINOR__ < 95) && (__GNUC__ < 3) |
|
180 /* egcs fails to initialize builtin types in expr. like this : new(p) char(); */ |
|
181 # define _STLP_DEFAULT_CONSTRUCTOR_BUG 1 |
|
182 # define _STLP_INCOMPLETE_EXCEPTION_HEADER |
|
183 # endif |
|
184 |
|
185 # if (__GNUC_MINOR__ < 9) && (__GNUC__ < 3) /* gcc 2.8 */ |
|
186 # define _STLP_NO_TEMPLATE_CONVERSIONS |
|
187 # define _STLP_NO_MEMBER_TEMPLATE_CLASSES 1 |
|
188 # define _STLP_NO_FUNCTION_TMPL_PARTIAL_ORDER 1 |
|
189 # define _STLP_NO_FRIEND_TEMPLATES 1 |
|
190 # define _STLP_HAS_NO_NAMESPACES 1 |
|
191 # define _STLP_NO_METHOD_SPECIALIZATION 1 |
|
192 # define _STLP_NO_MEMBER_TEMPLATES 1 |
|
193 # define _STLP_NO_CLASS_PARTIAL_SPECIALIZATION 1 |
|
194 # define _STLP_DONT_SIMULATE_PARTIAL_SPEC_FOR_TYPE_TRAITS |
|
195 /* DJGPP doesn't seem to implement it in 2.8.x */ |
|
196 # ifdef DJGPP |
|
197 # define _STLP_NO_STATIC_TEMPLATE_DATA 1 |
|
198 # endif |
|
199 # endif |
|
200 |
|
201 # if __GNUC__ <= 2 && __GNUC_MINOR__ <= 7 && ! defined (__CYGWIN32__) |
|
202 /* Will it work with 2.6 ? I doubt it. */ |
|
203 # if ( __GNUC_MINOR__ < 6 ) |
|
204 __GIVE_UP_WITH_STL(GCC_272); |
|
205 # endif |
|
206 |
|
207 # define _STLP_NO_RELOPS_NAMESPACE |
|
208 # define _STLP_NON_TYPE_TMPL_PARAM_BUG |
|
209 # define _STLP_LIMITED_DEFAULT_TEMPLATES 1 |
|
210 # define _STLP_DEFAULT_TYPE_PARAM 1 |
|
211 # define _STLP_NO_BAD_ALLOC |
|
212 # define _STLP_NO_ARROW_OPERATOR 1 |
|
213 # ifndef _STLP_NO_STATIC_TEMPLATE_DATA |
|
214 # define _STLP_NO_STATIC_TEMPLATE_DATA |
|
215 # endif |
|
216 # define _STLP_STATIC_CONST_INIT_BUG 1 |
|
217 # define _STLP_NO_METHOD_SPECIALIZATION 1 |
|
218 |
|
219 # if !defined (__CYGWIN32__) |
|
220 # define _STLP_NESTED_TYPE_PARAM_BUG 1 |
|
221 # define _STLP_BASE_MATCH_BUG 1 |
|
222 /* unused operators are required (forward) */ |
|
223 # define _STLP_CONST_CONSTRUCTOR_BUG |
|
224 # define _STLP_NO_DEFAULT_NON_TYPE_PARAM |
|
225 # endif |
|
226 # define _STLP_NO_PARTIAL_SPECIALIZATION_SYNTAX 1 |
|
227 # define _STLP_NO_EXPLICIT_FUNCTION_TMPL_ARGS 1 |
|
228 # define _STLP_NO_EXCEPTION_HEADER 1 |
|
229 # else /* ! <= 2.7.* */ |
|
230 # endif /* ! <= 2.7.* */ |
|
231 |
|
232 /* static template data members workaround strategy for gcc tries |
|
233 * to use weak symbols. |
|
234 * if you don't want to use that, #define _STLP_WEAK_ATTRIBUTE=0 ( you'll |
|
235 * have to put "#define __PUT_STATIC_DATA_MEMBERS_HERE" line in one of your |
|
236 * compilation unit ( or CFLAGS for it ) _before_ including any STL header ). |
|
237 */ |
|
238 # if defined (_STLP_NO_STATIC_TEMPLATE_DATA) && ! defined (_STLP_WEAK_ATTRIBUTE ) |
|
239 /* systems using GNU ld or format that supports weak symbols |
|
240 may use "weak" attribute |
|
241 Linux & Solaris ( x86 & SPARC ) are being auto-recognized here */ |
|
242 # if defined(_STLP_GNU_LD) || defined(__ELF__) || defined (__CYGWIN__) || \ |
|
243 (( defined (__SVR4) || defined ( __svr4__ )) && \ |
|
244 ( defined (sun) || defined ( __sun__ ))) |
|
245 # define _STLP_WEAK_ATTRIBUTE 1 |
|
246 # endif |
|
247 # endif /* _STLP_WEAK_ATTRIBUTE */ |
|
248 |
|
249 |
|
250 /* strict ANSI prohibits "long long" ( gcc) */ |
|
251 # if defined ( __STRICT_ANSI__ ) |
|
252 # undef _STLP_LONG_LONG |
|
253 // # define _STLP_STRICT_ANSI 1 |
|
254 # endif |
|
255 |
|
256 //# if !defined (__STRICT_ANSI__) || defined (__BUILDING_STLPORT) |
|
257 //# define _STLP_USE_TEMPLATE_EXPORT |
|
258 //# define _STLP_EXPORT_TEMPLATE_KEYWORD extern |
|
259 //# define _STLP_IMPORT_TEMPLATE_KEYWORD extern |
|
260 //# endif |
|
261 |
|
262 # ifndef __EXCEPTIONS |
|
263 # undef _STLP_HAS_NO_EXCEPTIONS |
|
264 # define _STLP_HAS_NO_EXCEPTIONS 1 |
|
265 # endif |
|
266 |
|
267 # if (__GNUC__ >= 3) |
|
268 |
|
269 # if ((__GNUC_MINOR__ == 0) || (__APPLE__)) |
|
270 # define _STLP_NATIVE_INCLUDE_PATH ../g++-v3 |
|
271 # define _STLP_NATIVE_OLD_STREAMS_INCLUDE_PATH ../g++-v3/backward |
|
272 # else |
|
273 # if defined(__GNUC_PATCHLEVEL__) && (__GNUC_PATCHLEVEL__ > 0) |
|
274 # define _STLP_NATIVE_INCLUDE_PATH ../__GNUC__.__GNUC_MINOR__.__GNUC_PATCHLEVEL__ |
|
275 # define _STLP_NATIVE_OLD_STREAMS_INCLUDE_PATH ../__GNUC__.__GNUC_MINOR__.__GNUC_PATCHLEVEL__/backward |
|
276 # else |
|
277 # define _STLP_NATIVE_INCLUDE_PATH ../__GNUC__.__GNUC_MINOR__ |
|
278 # define _STLP_NATIVE_OLD_STREAMS_INCLUDE_PATH ../__GNUC__.__GNUC_MINOR__/backward |
|
279 # endif |
|
280 # endif |
|
281 |
|
282 # elif (__GNUC_MINOR__ < 8) |
|
283 |
|
284 # define _STLP_NO_OWN_IOSTREAMS 1 |
|
285 # undef _STLP_OWN_IOSTREAMS |
|
286 # define _STLP_NATIVE_INCLUDE_PATH ../g++-include |
|
287 |
|
288 /* tuning of static template data members workaround */ |
|
289 # if ( _STLP_STATIC_TEMPLATE_DATA < 1 ) |
|
290 # if ( _STLP_WEAK_ATTRIBUTE > 0 ) |
|
291 # define _STLP_WEAK __attribute__ (( weak )) |
|
292 # else |
|
293 # define _STLP_WEAK |
|
294 # endif /* _STLP_WEAK_ATTRIBUTE */ |
|
295 |
|
296 # ifdef __PUT_STATIC_DATA_MEMBERS_HERE |
|
297 # define __DECLARE_INSTANCE(type,item,init) type item _STLP_WEAK init |
|
298 # else |
|
299 # define __DECLARE_INSTANCE(type,item,init) |
|
300 # endif /* __PUT_STATIC_DATA_MEMBERS_HERE */ |
|
301 # endif /* _STLP_STATIC_TEMPLATE_DATA */ |
|
302 |
|
303 # else |
|
304 |
|
305 // gcc-2.95.0 used to use "g++-3" directory which has been changed to "g++" in |
|
306 // system-dependent "include" for 2.95.2 except for Cygwin and Mingw packages. |
|
307 // I expect "g++-3" not being used in later releases. |
|
308 // If your installation use "g++-3" include directory for any reason (pre-2.95.2 or Win binary kit), |
|
309 // please change the macro below to point to your directory. |
|
310 |
|
311 # if defined(__DJGPP) |
|
312 # define _STLP_NATIVE_INCLUDE_PATH ../lang/cxx |
|
313 # elif defined (__SYMBIAN32__) |
|
314 |
|
315 # ifdef _PTHREADS |
|
316 # undef _PTHREADS |
|
317 # endif |
|
318 # ifdef _STLP_PTHREADS |
|
319 # undef _STLP_PTHREADS |
|
320 # endif |
|
321 # ifdef _STLP_THREADS |
|
322 # undef _STLP_THREADS |
|
323 # endif |
|
324 |
|
325 # define _STLP_NATIVE_INCLUDE_PATH ../include |
|
326 # define _STLP_NATIVE_C_INCLUDE_PATH libc |
|
327 |
|
328 # define _STLP_NO_NEW_HEADER |
|
329 # define _STLP_NO_THREADS |
|
330 |
|
331 # define _STLP_NO_EXCEPTIONS |
|
332 # define _STLP_USE_TRAP_LEAVE |
|
333 //# define _STLP_IMPLICIT_STRING_TO_DESC |
|
334 |
|
335 # define _STLP_NO_EXCEPTION_HEADER |
|
336 // # define _STLP_NO_WCHAR_T |
|
337 # define _STLP_NO_IOSTREAMS |
|
338 # define _STLP_NO_OWN_IOSTREAMS |
|
339 # undef _STLP_OWN_IOSTREAMS |
|
340 # define _NOTHREADS |
|
341 # define _STLP_USE_NEWALLOC |
|
342 # define _STLP_NO_NODE_ALLOC |
|
343 # define _STLP_NO_LONG_DOUBLE |
|
344 #ifdef __SYMBIAN32__ |
|
345 # define _STLP_LITTLE_ENDIAN |
|
346 #else |
|
347 # define _STLP_BIG_ENDIAN |
|
348 #endif//__SYMBIAN32__ |
|
349 // this one causes recursive abs() calls |
|
350 # define _STLP_LABS |
|
351 # define _STLP_LDIV |
|
352 # define _STLP_CONST_CONSTRUCTOR_BUG |
|
353 |
|
354 // # define _STLP_HAS_NAMESPACES |
|
355 |
|
356 # elif (__GNUC__ >= 3) || (__GNUC_MINOR__ >= 97) |
|
357 # define _STLP_NATIVE_INCLUDE_PATH ../include/g++-v3 |
|
358 # elif ((__GNUC_MINOR__ >= 95 && __GNUC_MINOR__ < 97) && !( defined (__FreeBSD__) || defined (__NetBSD__) || defined(__sgi) || defined (__OS2__) ) ) |
|
359 # define _STLP_NATIVE_INCLUDE_PATH ../g++-3 |
|
360 # elif (__GNUC_MINOR__ > 8) && (__GNUC_MINOR__ < 95) && (__GNUC__ < 3) && !defined( __Lynx__ ) |
|
361 // this really sucks, as GNUpro does not really identifies itself, so we have to guess |
|
362 // depending on a platform |
|
363 # ifdef __hpux |
|
364 # define _STLP_NATIVE_INCLUDE_PATH ../g++-3 |
|
365 # else |
|
366 # define _STLP_NATIVE_INCLUDE_PATH ../g++-2 |
|
367 # endif |
|
368 # else |
|
369 # define _STLP_NATIVE_INCLUDE_PATH g++ |
|
370 # endif |
|
371 |
|
372 // <exception> et al |
|
373 # ifdef __FreeBSD__ |
|
374 # if (__GNUC__ > 2) || (__GNUC__ == 2 && __GNUC_MINOR__ > 95) |
|
375 # define _STLP_NATIVE_CPP_RUNTIME_INCLUDE_PATH ../include |
|
376 # endif |
|
377 # else |
|
378 // azov |
|
379 # ifdef __Lynx__ |
|
380 # define _STLP_NATIVE_CPP_RUNTIME_INCLUDE_PATH _STLP_NATIVE_INCLUDE_PATH |
|
381 # else |
|
382 # if (__GNUC__ > 2) || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97) |
|
383 // # define _STLP_NATIVE_CPP_RUNTIME_INCLUDE_PATH ../g++-v3 |
|
384 # else |
|
385 # define _STLP_NATIVE_CPP_RUNTIME_INCLUDE_PATH ../include |
|
386 # endif |
|
387 # endif |
|
388 # endif |
|
389 |
|
390 #endif /* GNUC_MINOR < 8 */ |
|
391 |
|
392 #ifndef __SYMBIAN32__ |
|
393 # define _STLP_NATIVE_CPP_C_INCLUDE_PATH _STLP_NATIVE_INCLUDE_PATH |
|
394 # define _STLP_NATIVE_C_INCLUDE_PATH ../include |
|
395 #endif |
|
396 |
|
397 |
|
398 #ifdef _SCO_ELF |
|
399 # define _STLP_SCO_OPENSERVER |
|
400 # if defined(_REENTRANT) |
|
401 # define _UITHREADS /* if UnixWare < 7.0.1 */ |
|
402 # define _STLP_UITHREADS |
|
403 # endif /* _REENTRANT */ |
|
404 #endif |
|
405 |
|
406 // Tune settings for the case where static template data members are not |
|
407 // instaniated by default |
|
408 # if defined ( _STLP_NO_STATIC_TEMPLATE_DATA ) |
|
409 # define _STLP_STATIC_TEMPLATE_DATA 0 |
|
410 # if !defined ( _STLP_WEAK_ATTRIBUTE ) |
|
411 # define _STLP_WEAK_ATTRIBUTE 0 |
|
412 # endif |
|
413 # ifdef __PUT_STATIC_DATA_MEMBERS_HERE |
|
414 # define __DECLARE_INSTANCE(type,item,init) type item init |
|
415 # else |
|
416 # define __DECLARE_INSTANCE(type,item,init) |
|
417 # endif |
|
418 # else |
|
419 # define _STLP_STATIC_TEMPLATE_DATA 1 |
|
420 # endif |
|
421 |
|
422 |
|
423 |
|
424 |