Ne.app NeANT
The Ne.app NeANT User module of the NeANT distribution.
_config.h
Go to the documentation of this file.
1
33#ifndef _RWSTD_RW_CONFIG_H_INCLUDED
34#define _RWSTD_RW_CONFIG_H_INCLUDED
35
36// include generated configuration header
37#include <config.h>
38
39
41#define _RWSTD_VER 0x06000000
42// | | | |
43// MMmmuupp
44// | | | |
45// | | | +--- pp = patch version number
46// | | +----- uu = micro version number
47// | +------- mm = minor version number
48// +--------- MM = major version number
49
50// library version string (patch number included only if non-zero)
51#define _RWSTD_VER_STR "6.0.0"
52
53// library version numbers
54#define _RWSTD_VER_MAJOR ((_RWSTD_VER >> 24) & 0xff)
55#define _RWSTD_VER_MINOR ((_RWSTD_VER >> 16) & 0xff)
56#define _RWSTD_VER_MICRO ((_RWSTD_VER >> 8) & 0xff)
57#define _RWSTD_VER_PATCH (_RWSTD_VER & 0xff)
58
59// a newer release of stdcxx is backward source and binary compatible
60// with an older release if both releases share the same major version
61// number; stdcxx releases whose major version numbers differ may or
62// may not be source or binary compatible
63
64// two releases of stdcxx are forward (as well as backward) source and
65// binary compatible if both releases share the same major and minor
66// version numbers
67
68// backward compatibility means that a program linked with an older
69// release of a library will not be adversely affected by upgrading
70// to a more recent release of the same library
71
72// forward compatibility means that a program linked with a newer
73// release of a library will not be adversely affected by downgrading
74// to an older release of the same library
75
76
80#if defined (_RWSTD_NO_EXTENSIONS) && !defined (_RWSTD_STRICT_ANSI)
81# define _RWSTD_STRICT_ANSI
82#endif // _RWSTD_NO_EXTENSIONS && !_RWSTD_STRICT_ANSI
83
84
85// -D _REENTRANT or any one of the other thread safety macros
86// used in the conditional below turns on thread safety features
87#if defined (_REENTRANT) \
88 || defined (_THREAD_SAFE) \
89 || defined (_RWSTD_MULTI_THREAD) \
90 || defined (_RWSTD_DCE_THREADS) \
91 || defined (_RWSTD_SOLARIS_THREADS) \
92 || defined (_RWSTD_POSIX_THREADS)
93# ifndef _RWSTD_REENTRANT
94# define _RWSTD_REENTRANT
95# endif // _RWSTD_REENTRANT
96#endif
97
98
102
104#if defined (__alpha__) || defined (__alpha)
105
106 // this applies to both Tru64 UNIX and Linux on Alpha
107# undef _RWSTD_IS_IEC559
108
109# ifdef _IEEE_FP
110 // IEEE 754/IEC 559 conforming environment enabled
111 // using the Compaq C++ -ieee compiler command line
112 // option or with gcc -mieee
113# define _RWSTD_IS_IEC559 true
114# else
115 // OSF1 (Tru64 UNIX) Compaq C++ without -ieee
116# define _RWSTD_IS_IEC559 false
117# endif
118
119#endif // Alpha
120
121
123#if defined (__ia64__) || defined (__ia64)
124#endif // IA64
125
126
128#if defined (__mips__) || defined (__mips)
129#endif // MIPS
130
131
133#if defined (__parisc__) || defined (__parsisc)
134#endif // PA RISC
135
136
138#if defined (__powerpc__) || defined (__powerpc)
139#endif // PowerPC
140
141
143#if defined (__sparc__) || defined (__sparc)
144#endif // SPARC
145
146
148#if defined (__amd64__) || defined (__amd64) \
149 || defined (__x86_64__) || defined (__x86_64)
150
151# if _RWSTD_VER_MAJOR < 5
152# ifdef _RWSTD_OS_LINUX
153 // on Linux/AMD64, unless explicitly requested, disable the use
154 // of atomic operations in string for binary compatibility with
155 // stdcxx 4.1.x
156# ifndef _RWSTD_USE_STRING_ATOMIC_OPS
157# define _RWSTD_NO_STRING_ATOMIC_OPS
158# endif // _RWSTD_USE_STRING_ATOMIC_OPS
159# endif // _WIN32
160# endif // stdcxx < 5.0
161
162#endif // AMD64/EM64T
163
164
168
170// Apogee C++ uses an EDG front end but doesn't define __EDG__
171
172#ifdef __APOGEE__
173#endif // __APOGEE__
174
175
177#if defined (__IBMCPP__)
178# include "_config-xlc.h"
179#endif // __IBMCPP___
180
181
183// Compaq C++ uses an EDG front end and #defines __EDG__
184
185#ifdef __DECCXX
186# include "_config-deccxx.h"
187#endif // __DECCXX
188
189
191// NOTE: the __EDG__ macro is #defined by most EDG-based compilers
192
193#if defined (__EDG__) \
194 && !defined (__DECCXX) \
195 && !defined (__HP_aCC) \
196 && !defined (__INTEL_COMPILER) \
197 && !defined (_SGI_COMPILER_VERSION)
198 // FIXME: make this more robust by detecting the EDG eccp demo
199 // during library configuration (and avoid relying on compiler
200 // specific macros)
201# include "_config-eccp.h"
202#endif // __EDG__
203
204
206#ifdef __GNUG__
207# include "_config-gcc.h"
208#else // if !defined (__GNUG__)
209# define _RWSTD_GNUC_ATTRIBUTE(ignore)
210#endif // __GNUG__
211
212
214#ifdef __HP_aCC
215# include "_config-acc.h"
216#endif // __HP_aCC
217
218
220#if defined (__INTEL_COMPILER)
221# include "_config-icc.h"
222#endif // __INTEL_COMPILER
223
224
226// SGI MIPSpro uses an EDG front end; it may or may not #define __EDG__
227// (starting with MIPSpro 7.4 the preprocessor does #define the macro
228// along with _SGI_COMPILER_VERSION)
229
230#ifdef _RWSTD_OS_IRIX64
231 // if _SGI_COMPILER_VERSION is not #defined, assume MIPSpro
232 // unless __GNUG__ is #defined
233# if defined (_SGI_COMPILER_VERSION) || !defined (__GNUG__)
234# include "_config-mipspro.h"
235# endif // _SGI_COMPILER_VERSION || !__GNUG__
236#endif // _RWSTD_OS_IRIX64
237
238
240#if defined (_MSC_VER) && !defined (__INTEL_COMPILER)
241# define _RWSTD_MSVC _MSC_VER
242# include "_config-msvc.h"
243#endif // _MSC_VER && !__INTEL_COMPILER
244
245
247#ifdef SNI
248# define _RWSTD_NO_PTR_VALUE_TEMPLATE_OVERLOAD
249# if __STDC__ == 1
250# ifndef _RWSTD_STRICT_ANSI
251# define _RWSTD_STRICT_ANSI
252# endif
253# endif
254
255# if defined __SNI_THREAD_SUPPORT
256# define _RWSTD_NO_MBRTOWC
257# define _RWSTD_NO_WCRTOMB
258# endif
259#endif // SNI
260
261
263#ifdef __SUNPRO_CC
264# include "_config-sunpro.h"
265#endif // __SUNPRO_CC
266
267
271
273#ifdef __OS2__
274# define _RWSTD_NO_STATIC_MUTEX_INIT
275#endif // __OS2__
276
277
279#ifdef _WIN32
280# define _RWSTD_NO_STATIC_MUTEX_INIT
281# define _RWSTD_PATH_SEP '\\'
282# ifdef _RWSTD_LIB_SRC
283 // Don't use implicit TLS in our library on Windows because of the TLS
284 // might not be initialized when our library DLL or the DLL, that
285 // linked statically against our library, is loaded explicitly using
286 // LoadLibrary() function. (STDCXX-1023)
287# ifndef _RWSTD_NO_TLS
288# define _RWSTD_NO_TLS
289# endif
290# ifdef _RWSTD_THREAD
291# undef _RWSTD_THREAD
292# endif
293# endif // _RWSTD_LIB_SRC
294#endif // _WIN32
295
296#ifndef _RWSTD_PATH_SEP
297# define _RWSTD_PATH_SEP '/'
298#endif // _RWSTD_PATH_SEP
299
300
302#if !defined (_RWSTD_OS_LINUX) && !defined (_WIN32)
303 // Linux glibc and Windows use ISO 10646 (Unicode)
304 // as the internal wchar_t encoding in all locales
305# ifndef _RWSTD_NO_ISO_10646_WCHAR_T
306# define _RWSTD_NO_ISO_10646_WCHAR_T
307# endif // _RWSTD_NO_ISO_10646_WCHAR_T
308#endif // !Linux && !Windoze
309
310
312#ifdef _RWSTD_REENTRANT
313# if !defined (_RWSTD_DCE_THREADS) \
314 && !defined (_RWSTD_DEC_THREADS) \
315 && !defined (_RWSTD_POSIX_THREADS) \
316 && !defined (_RWSTD_SOLARIS_THREADS)
317
318 // default to POSIX threads except on Win32 or Win64
319
320# ifndef _WIN32
321# define _RWSTD_POSIX_THREADS
322# endif // _WIN32
323# endif // _RWSTD_*_THREADS
324#endif // _RWSTD_REENTRANT
325
326#ifdef _RWSTD_DCE_THREADS
327# define _RWSTD_NO_STATIC_MUTEX_INIT
328#endif // _RWSTD_DCE_THREADS
329
330
332// g++ cannot inline functions that take a variable number of arguments
333// or functions that contain static (local) variables
334#if !defined (__GNUG__) || __GNUG__ > 2 || __GNUG_MINOR__ > 96
335# define _INLINE_VARARGS inline
336# if !defined (__HP_aCC) || __HP_aCC > 012100
337 // working around a known aCC 1.21 bug
338# define _INLINE_WITH_STATICS inline
339# endif // !__HP_aCC || __HP_aCC > 012100
340#endif // !__GNUG__ || __GNUG__ > 2 || __GNUG_MINOR__ > 96
341
342#if defined (_RWSTD_NO_COLLAPSE_TEMPLATE_STATICS) \
343 || defined (_RWSTD_NO_STATIC_TEMPLATE_MEMBER_INIT)
344 // static mutex initialization depends on the compiler's (and the
345 // linker's in gcc's case) ability to correctly handle explicitly
346 // initialized static members of class templates
347# ifndef _RWSTD_NO_STATIC_MUTEX_INIT
348# define _RWSTD_NO_STATIC_MUTEX_INIT
349# endif
350#endif // NO_COLLAPSE_TEMPLATE_STATICS || NO_STATIC_TEMPLATE_MEMBER_INIT
351
352
354// pa-risc2 atomic ops related
355#if defined(_PA_RISC2_0) && defined(__HP_aCC)
356# define _RWSTD_STRING_REF_OFFSET _RWSTD_INT_MAX
357#endif
358
359
360#if defined (_RWSTD_NO_WCHAR_T) && !defined (_RWSTD_NO_NATIVE_WCHAR_T)
361# define _RWSTD_NO_NATIVE_WCHAR_T
362#endif
363
364
365#ifndef _RWSTD_NO_STL_SPECIALIZATION
366// #ifdef _RWSTD_NO_CLASS_PARTIAL_SPEC
367// disable partial specialization for void* of STL sequences
368# define _RWSTD_NO_STL_SPECIALIZATION
369// #endif // _RWSTD_NO_CLASS_PARTIAL_SPEC
370#endif // _RWSTD_NO_STL_SPECIALIZATION
371
372//
373// Macro for path to the ANSI 'C' headers
374// Must be set specifically for each platform when the
375// C++ wrappers for 'C' headers are used.
376//
377#define _RWSTD_ANSIC(x) </usr/include/x>
378
379// the default long double printf format prefix is "L" (unless #defined above)
380#ifndef _RWSTD_LDBL_PRINTF_PREFIX
381# define _RWSTD_LDBL_PRINTF_PREFIX "L"
382#endif // _RWSTD_LDBL_PRINTF_PREFIX
383
384// the default long double scanf format prefix is "L" (unless #defined above)
385#ifndef _RWSTD_LDBL_SCANF_PREFIX
386# define _RWSTD_LDBL_SCANF_PREFIX "L"
387#endif // _RWSTD_LDBL_SCANF_PREFIX
388
389// the default expansion of dllimport is empty (unless #defined above)
390#ifndef _RWSTD_DLLIMPORT
391# define _RWSTD_DLLIMPORT /* empty */
392#endif // _RWSTD_DLLIMPORT
393
394// the default name of a libc symbol is itself (unless #defined above)
395#ifndef _RWSTD_LIBC_SYM
396# define _RWSTD_LIBC_SYM(name) name
397#endif // _RWSTD_LIBC_SYM
398
399
401/*
402 * The following macro sets the default size of file stream internal buffers
403 */
404
405#ifndef _RWSTD_DEFAULT_BUFSIZE // specified on command line?
406# define _RWSTD_DEFAULT_BUFSIZE 512
407#endif
408
409#ifndef _RWSTD_NO_LONG_LONG
410 // Win32/64 #defines _RWSTD_LONG_LONG to __int64
411# ifndef _RWSTD_LONG_LONG
412# define _RWSTD_LONG_LONG long long
413# endif // _RWSTD_LONG_LONG
414#endif // _RWSTD_NO_LONG_LONG
415
416
417// disable all extensions in strict ANSI mode
418#ifdef _RWSTD_STRICT_ANSI
419 // long long is not in ANSI C++ yet (although it is in ANSI C99)
420# undef _RWSTD_LONG_LONG
421# define _RWSTD_NO_EXT_FILEBUF
422# define _RWSTD_NO_EXT_VECTOR_BOOL_REF_OPS
423# define _RWSTD_NO_EXT_LOCALE
424# define _RWSTD_NO_EXT_DEEP_STRING_COPY
425 // no support for exceptions derived from ios_base::failure
426# define _RWSTD_NO_EXT_FAILURE
427 // no support for writing out integral values in base 2
428# define _RWSTD_NO_EXT_BIN_IO
429 // disable safe conversion of iostream objects only to bool
430 // (and enable conversion to void*)
431# define _RWSTD_NO_EXT_IOS_SAFE_CONVERSION
432 // std::setbase manipulator accepts only required bases (i.e.,
433 // 0, 8, 10, 16, and 2 unless _RWSTD_NO_EXT_BIN_IO is also #defined)
434# define _RWSTD_NO_EXT_SETBASE
435 // disable the str(const char*) overload in stringbuf and stringstreams
436# define _RWSTD_NO_EXT_STRINGBUF_STR
437 // no support for member overloads on all fundamental types
438# define _RWSTD_NO_EXT_NUM_GET
439# define _RWSTD_NO_EXT_NUM_PUT
440 // no support for extended member overloads
441# define _RWSTD_NO_EXT_TIME_GET
442 // no support for optional mt-locking in iostreams
443# define _RWSTD_NO_EXT_REENTRANT_IO
444 // allocator<const T> not possible
445# define _RWSTD_NO_EXT_CONST_ALLOCATOR
446 // missing operator new or delete not defined
447# define _RWSTD_NO_EXT_OPERATOR_NEW
448 // void std::count<>() not defined (except when necessary)
449# define _RWSTD_NO_EXT_VOID_COUNT
450 // void std::distance() not defined
451# define _RWSTD_NO_EXT_VOID_DISTANCE
452
453 // calling width(0) only when insertion succeeds
454# define _RWSTD_NO_EXT_KEEP_WIDTH_ON_FAILURE
455
456 // deque::assign() clears container before assignment
457 // rather than assigning over existing elements
458# define _RWSTD_NO_EXT_DEQUE_ASSIGN_IN_PLACE
459 // deque::insert() creates a copy of the container
460 // to insert into and on success swaps the copy
461# define _RWSTD_NO_EXT_DEQUE_INSERT_IN_PLACE
462
463 // primary templates not defined
464# define _RWSTD_NO_EXT_CHAR_TRAITS_PRIMARY
465# define _RWSTD_NO_EXT_CODECVT_PRIMARY
466# define _RWSTD_NO_EXT_COLLATE_PRIMARY
467# define _RWSTD_NO_EXT_CTYPE_PRIMARY
468 // random number generator used by algorithms such as random_shuffle
469 // utilizes the entire range of size_t and will not generate the same
470 // sequence of values between ILP32 and LP64 (or LLP64)
471# define _RWSTD_NO_EXT_PORTABLE_RANDOM_SEQUENCE
472
473 // disable the implementation of LWG issue 559 (numeric_limits
474 // limits specialized on cv-qualified scalar types)
475# define _RWSTD_NO_EXT_CV_QUALIFIED_LIMITS
476
477// commented out macros not implemented yet
478// # define _RWSTD_NO_EXT_MONEYPUNCT_PRIMARY
479// # define _RWSTD_NO_EXT_NUMPUNCT_PRIMARY
480// # define _RWSTD_NO_EXT_TIME_GET_PRIMARY
481// # define _RWSTD_NO_EXT_TIME_PUT_PRIMARY
482// # define _RWSTD_NO_EXT_MESSAGES_PRIMARY
483
484#endif // _RWSTD_STRICT_ANSI
485
486 // macros that are enabled in library source files
487#ifdef _RWSTD_LIB_SRC
488 // don't instantiate templates in library source code
489 // (but see _RWSTD_INSTANTIATE_TEMPLATES macro below)
490# define _RWSTD_NO_TEMPLATE_DEFINITIONS
491 // don't provide definitions of operator new in library
492# define _RWSTD_NO_EXT_OPERATOR_NEW
493#endif // _RWSTD_LIB_SRC
494
495#if _MSC_VER <= 1300
496 // msvc60 expects a definition to be provided for all variants
497 // of operator new/delete that are declared. This means that either
498 // the operators must be defined - preventing redefinition in user code -
499 // or that they must be undeclared - preventing them from being called
500 // directly in user code. We have chosen the former option.
501# undef _RWSTD_NO_EXT_OPERATOR_NEW
502#endif // _MSC_VER
503
504#ifdef _RWSTD_INSTANTIATE_TEMPLATES
505 // instantiate templates (this macro is defined at the top of each
506 // library source file (.cpp file) that explicitly instantiates class
507 // or function templates using the _RWSTD_INSTANTIATE_N() macros
508# undef _RWSTD_NO_TEMPLATE_DEFINITIONS
509#endif
510
511#endif // _RWSTD_RW_CONFIG_H_INCLUDED