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