stl_gcc.h

00001 /* STLport configuration file
00002  * It is internal STLport header - DO NOT include it directly
00003  */
00004 
00005 /* Systems having GLIBC installed have different traits */
00006 #if ! defined (_STLP_USE_GLIBC) && ( defined (__linux__) || defined (__CYGWIN__) )
00007 # define _STLP_USE_GLIBC
00008 #endif
00009 
00010 #   define _STLP_NO_MEMBER_TEMPLATE_KEYWORD
00011 
00012 # if defined(__FreeBSD__) || defined (__hpux)
00013 #  define _STLP_NO_WCHAR_T
00014 # endif
00015 
00016 # if defined (__sun)
00017 
00018 // gcc does not support ELF64 yet ; however; it supports ultrasparc + v8plus.
00019 // limits.h contains invalid values for this combination
00020 # if (defined  (__sparc_v9__) || defined (__sparcv9)) && ! defined ( __WORD64 )
00021 #  define __LONG_MAX__ 2147483647L
00022 # endif
00023 
00024 #  include <config/stl_solaris.h>
00025 # endif
00026 
00027 
00028 // azov: gcc on lynx have a bug that causes internal
00029 // compiler errors when compiling STLport with namespaces turned on. 
00030 // When the compiler gets better - comment out _STLP_HAS_NO_NAMESPACES
00031 # if defined (__Lynx__) && (__GNUC__ < 3)
00032 #   define _STLP_HAS_NO_NAMESPACES 1
00033 #   define _STLP_NO_STATIC_TEMPLATE_DATA 1
00034 //  turn off useless warning about including system headers
00035 #   define __NO_INCLUDE_WARN__ 1
00036 # endif
00037 
00038 
00039 /* Tru64 Unix, AIX, HP : gcc there by default uses uses native ld and hence cannot auto-instantiate 
00040    static template data. If you are using GNU ld, please say so in stl_user_config.h header */    
00041 # if (__GNUC__ < 3) && ! (_STLP_GCC_USES_GNU_LD) && \
00042    ((defined (__osf__) && defined (__alpha__)) || defined (_AIX) || defined (__hpux))
00043 #   define _STLP_NO_STATIC_TEMPLATE_DATA
00044 # endif
00045 
00046 # if defined(__DJGPP)
00047 #   define _STLP_RAND48         1
00048 #   define _NOTHREADS           1
00049 #   undef  _PTHREADS
00050 #   define _STLP_LITTLE_ENDIAN
00051 # endif 
00052 
00053 # if defined(__MINGW32__)
00054 /* Mingw32, egcs compiler using the Microsoft C runtime */
00055 #   undef  _STLP_NO_DRAND48
00056 #   define _STLP_NO_DRAND48
00057 #   ifdef _MT
00058 #     define _REENTRANT
00059 #   endif
00060 #  define _STLP_IMPORT_DECLSPEC __attribute__((dllimport))
00061 #  define _STLP_EXPORT_DECLSPEC __attribute__((dllexport))
00062 #  define _STLP_CLASS_IMPORT_DECLSPEC __attribute__((dllimport))
00063 #  define _STLP_CLASS_EXPORT_DECLSPEC __attribute__((dllexport))
00064 #  define _STLP_CALL
00065 
00066 #  if defined (_STLP_USE_DYNAMIC_LIB)
00067 #   define _STLP_USE_DECLSPEC 1
00068 // #   define _STLP_USE_TEMPLATE_EXPORT 1
00069 /* Using dynamic library in MinGW requires _STLP_NO_CUSTOM_IO */
00070 # define _STLP_NO_CUSTOM_IO
00071 #  endif
00072 
00073 # endif
00074 
00075 #if defined (__CYGWIN__) || defined (__MINGW32__) || !(defined (_STLP_USE_GLIBC) || defined (__sun)) 
00076 #ifndef __MINGW32__
00077 #   define _STLP_NO_NATIVE_MBSTATE_T      1
00078 #endif
00079 #   define _STLP_NO_NATIVE_WIDE_FUNCTIONS 1
00080 #   define _STLP_NO_NATIVE_WIDE_STREAMS   1
00081 # elif defined(__linux__)
00082 #   define _STLP_NO_NATIVE_WIDE_FUNCTIONS 1
00083 #   define _STLP_NO_NATIVE_WIDE_STREAMS   1
00084 # elif defined (__sun)
00085 #   define _STLP_WCHAR_BORLAND_EXCLUDE
00086 #   define _STLP_NO_NATIVE_WIDE_FUNCTIONS 1
00087 #endif
00088 
00089 /* Mac OS X is a little different with namespaces and cannot instantiate
00090  * static data members in template classes */
00091 # if defined (__APPLE__)
00092 /* Mac OS X is missing a required typedef and standard macro */
00093 typedef unsigned int wint_t;
00094 
00095 #  define __unix
00096 
00097  /* Mac OS X needs one and only one source file to initialize all static data
00098   * members in template classes. Only one source file in an executable or
00099   * library can declare instances for such data members, otherwise duplicate
00100   * symbols will be generated. */
00101 
00102 #   define _STLP_NO_STATIC_TEMPLATE_DATA
00103 #   define _STLP_STATIC_CONST_INIT_BUG 1
00104 #   define _STLP_STATIC_TEMPLATE_DATA 0
00105 #   define _STLP_WEAK_ATTRIBUTE 0
00106 #   define _STLP_NO_LONG_DOUBLE
00107 
00108 /* Mac OS X needs all "::" scope references to be "std::" */
00109 #  undef _STLP_VENDOR_GLOBAL_STD
00110 #  undef _STLP_VENDOR_GLOBAL_CSTD
00111 #  define _STLP_NO_CSTD_FUNCTION_IMPORTS
00112  /* Workaround for the broken Mac OS X C++ preprocessor which cannot handle
00113   * parameterized macros in #include statements */
00114 #  define _STLP_NATIVE_HEADER(header) <../g++/##header##>
00115 #  define _STLP_NATIVE_C_HEADER(header) <../include/##header##>
00116 #  define _STLP_NATIVE_CPP_C_HEADER(header) <../g++/##header##>
00117 #  define _STLP_NATIVE_OLD_STREAMS_HEADER(header) <../g++/##header##>
00118 #  define _STLP_NATIVE_CPP_RUNTIME_HEADER(header) <../g++/##header##>
00119 # endif
00120 
00121 
00122 # if defined(__BEOS__) && defined(__INTEL__)
00123 #  define _STLP_NATIVE_HEADER(header) <../stlport/beos/##header##>
00124 #  define _STLP_NATIVE_C_HEADER(header) <../stlport/beos/##header##>
00125 #  define _STLP_NATIVE_CPP_C_HEADER(header) <../stlport/beos/##header##>
00126 #  define _STLP_NATIVE_OLD_STREAMS_HEADER(header) <../stlport/beos/##header##>
00127 #  define _STLP_NATIVE_CPP_RUNTIME_HEADER(header) <../stlport/beos/##header##>
00128 #  define _STLP_NO_NATIVE_WIDE_FUNCTIONS 1
00129 #  define _STLP_NO_NATIVE_WIDE_STREAMS   1
00130 //#  define _NOTHREADS 1
00131 #  ifdef _PTHREADS
00132 #    undef  _PTHREADS
00133 #  endif
00134 #  ifdef _STLP_PTHREADS
00135 #    undef _STLP_PTHREADS
00136 #  endif
00137 #  define _STLP_USE_STDIO_IO 1
00138 #  define _STLP_USE_GLIBC 1
00139 # endif
00140 
00141 
00142 /* g++ 2.7.x and above */
00143 #   define _STLP_LONG_LONG long long 
00144 
00145 #   if (__GNUC__ >= 3)
00146 #    define _STLP_HAS_NATIVE_FLOAT_ABS
00147 #   endif
00148 
00149 #   if (__GNUC__ < 3)
00150 #    define _STLP_HAS_NO_NEW_C_HEADERS     1
00151 #    define _STLP_VENDOR_GLOBAL_CSTD       1
00152 #    define _STLP_HAS_NO_NEW_IOSTREAMS     1
00153 #    ifndef __HONOR_STD
00154 #     define _STLP_VENDOR_GLOBAL_EXCEPT_STD 1
00155 #    endif
00156 #   endif
00157 
00158 #   if (__GNUC_MINOR__ < 95)  && (__GNUC__ < 3)
00159 /* egcs fails to initialize builtin types in expr. like this : new(p) char();  */
00160 #     define _STLP_DEFAULT_CONSTRUCTOR_BUG 1
00161 #     define _STLP_INCOMPLETE_EXCEPTION_HEADER
00162 #   endif
00163 
00164 #   if (__GNUC_MINOR__ < 9)  && (__GNUC__ < 3) /* gcc 2.8 */
00165 #     define _STLP_NO_TEMPLATE_CONVERSIONS
00166 #     define _STLP_NO_MEMBER_TEMPLATE_CLASSES 1
00167 #     define _STLP_NO_FUNCTION_TMPL_PARTIAL_ORDER 1
00168 #     define _STLP_NO_FRIEND_TEMPLATES 1
00169 #     define _STLP_HAS_NO_NAMESPACES 1
00170 #     define _STLP_NO_METHOD_SPECIALIZATION 1
00171 #     define _STLP_NO_MEMBER_TEMPLATES 1
00172 #     define _STLP_NO_CLASS_PARTIAL_SPECIALIZATION 1
00173 #     define _STLP_DONT_SIMULATE_PARTIAL_SPEC_FOR_TYPE_TRAITS
00174 /*  DJGPP doesn't seem to implement it in 2.8.x */
00175 #     ifdef DJGPP
00176 #      define  _STLP_NO_STATIC_TEMPLATE_DATA 1
00177 #     endif
00178 #   endif
00179 
00180 #  if __GNUC__ <= 2 && __GNUC_MINOR__ <= 7 && ! defined (__CYGWIN32__)
00181 /* Will it work with 2.6 ? I doubt it. */
00182 #   if ( __GNUC_MINOR__ < 6 )
00183     __GIVE_UP_WITH_STL(GCC_272);
00184 #   endif
00185 
00186 # define  _STLP_NO_RELOPS_NAMESPACE
00187 # define  _STLP_NON_TYPE_TMPL_PARAM_BUG
00188 # define  _STLP_LIMITED_DEFAULT_TEMPLATES 1
00189 # define  _STLP_DEFAULT_TYPE_PARAM 1
00190 # define  _STLP_NO_BAD_ALLOC
00191 # define  _STLP_NO_ARROW_OPERATOR 1
00192 # ifndef _STLP_NO_STATIC_TEMPLATE_DATA
00193 #  define  _STLP_NO_STATIC_TEMPLATE_DATA
00194 # endif
00195 # define  _STLP_STATIC_CONST_INIT_BUG 1
00196 # define  _STLP_NO_METHOD_SPECIALIZATION 1
00197 
00198 #  if !defined (__CYGWIN32__) 
00199 #   define _STLP_NESTED_TYPE_PARAM_BUG   1
00200 #   define _STLP_BASE_MATCH_BUG       1
00201 /*  unused operators are required (forward) */
00202 #   define  _STLP_CONST_CONSTRUCTOR_BUG 
00203 #   define _STLP_NO_DEFAULT_NON_TYPE_PARAM
00204 #  endif
00205 #   define _STLP_NO_PARTIAL_SPECIALIZATION_SYNTAX 1
00206 #   define _STLP_NO_EXPLICIT_FUNCTION_TMPL_ARGS 1
00207 #   define _STLP_NO_EXCEPTION_HEADER 1
00208 #  else /* ! <= 2.7.* */
00209 #  endif /* ! <= 2.7.* */
00210 
00211 /* static template data members workaround strategy for gcc tries
00212  * to use weak symbols.
00213  * if you don't want to use that, #define _STLP_WEAK_ATTRIBUTE=0 ( you'll
00214  * have to put "#define __PUT_STATIC_DATA_MEMBERS_HERE" line in one of your
00215  * compilation unit ( or CFLAGS for it ) _before_ including any STL header ).
00216  */
00217 #   if defined (_STLP_NO_STATIC_TEMPLATE_DATA) && ! defined (_STLP_WEAK_ATTRIBUTE )
00218 /* systems using GNU ld or format that supports weak symbols
00219    may use "weak" attribute
00220    Linux & Solaris ( x86 & SPARC ) are being auto-recognized here */
00221 #    if defined(_STLP_GNU_LD) || defined(__ELF__) || defined (__CYGWIN__) || \
00222      (( defined (__SVR4) || defined ( __svr4__ )) && \
00223       ( defined (sun) || defined ( __sun__ )))
00224 #     define _STLP_WEAK_ATTRIBUTE 1
00225 #    endif
00226 #   endif /* _STLP_WEAK_ATTRIBUTE */
00227 
00228 
00229 /* strict ANSI prohibits "long long" ( gcc) */
00230 #  if defined ( __STRICT_ANSI__ )
00231 #    undef _STLP_LONG_LONG
00232 // #    define _STLP_STRICT_ANSI 1
00233 #  endif
00234 
00235 //# if !defined (__STRICT_ANSI__) || defined (__BUILDING_STLPORT)
00236 //#    define _STLP_USE_TEMPLATE_EXPORT
00237 //#    define _STLP_EXPORT_TEMPLATE_KEYWORD extern
00238 //#    define _STLP_IMPORT_TEMPLATE_KEYWORD extern
00239 //# endif
00240 
00241 #   ifndef __EXCEPTIONS
00242 #     undef  _STLP_HAS_NO_EXCEPTIONS
00243 #     define _STLP_HAS_NO_EXCEPTIONS  1
00244 #   endif
00245 
00246 # if (__GNUC__ >= 3)
00247 
00248 #  define _STLP_NATIVE_INCLUDE_PATH ../g++-v3
00249 #  define _STLP_NATIVE_OLD_STREAMS_INCLUDE_PATH ../g++-v3/backward
00250 
00251 # elif (__GNUC_MINOR__ < 8)
00252 
00253 #  define _STLP_NO_OWN_IOSTREAMS 1
00254 #  undef  _STLP_OWN_IOSTREAMS
00255 #  define _STLP_NATIVE_INCLUDE_PATH ../g++-include
00256 
00257 /* tuning of static template data members workaround */
00258 #  if ( _STLP_STATIC_TEMPLATE_DATA < 1 )
00259 #   if ( _STLP_WEAK_ATTRIBUTE > 0 )
00260 #    define _STLP_WEAK __attribute__ (( weak ))
00261 #   else
00262 #    define _STLP_WEAK
00263 #   endif /* _STLP_WEAK_ATTRIBUTE */
00264 
00265 #   ifdef __PUT_STATIC_DATA_MEMBERS_HERE
00266 #    define __DECLARE_INSTANCE(type,item,init) type item _STLP_WEAK init
00267 #   else
00268 #    define __DECLARE_INSTANCE(type,item,init)
00269 #   endif /* __PUT_STATIC_DATA_MEMBERS_HERE */
00270 #  endif /* _STLP_STATIC_TEMPLATE_DATA */
00271 
00272 # else
00273 
00274 // gcc-2.95.0 used to use "g++-3" directory which has been changed to "g++" in
00275 // system-dependent "include" for 2.95.2 except for Cygwin and Mingw packages.
00276 // I expect "g++-3" not being used in later releases.
00277 // If your installation use "g++-3" include directory for any reason (pre-2.95.2 or Win binary kit),
00278 // please change the macro below to point to your directory. 
00279 
00280 # if defined(__DJGPP)
00281 #   define _STLP_NATIVE_INCLUDE_PATH ../lang/cxx
00282 # elif (__GNUC__ >= 3) || (__GNUC_MINOR__ >= 97)
00283 #   define _STLP_NATIVE_INCLUDE_PATH ../include/g++-v3
00284 # elif ((__GNUC_MINOR__ >= 95 && __GNUC_MINOR__ < 97) && !( defined (__FreeBSD__) || defined (__NetBSD__) || defined(__sgi) ) )
00285 #   define _STLP_NATIVE_INCLUDE_PATH ../g++-3
00286 # elif (__GNUC_MINOR__ > 8) && (__GNUC_MINOR__ < 95) && (__GNUC__ < 3) && !defined( __Lynx__ )
00287 // this really sucks, as GNUpro does not really identifies itself, so we have to guess 
00288 // depending on a platform
00289 #   ifdef __hpux
00290 #    define _STLP_NATIVE_INCLUDE_PATH ../g++-3
00291 #   else
00292 #    define _STLP_NATIVE_INCLUDE_PATH ../g++-2
00293 #   endif
00294 # else
00295 #   define _STLP_NATIVE_INCLUDE_PATH g++
00296 # endif
00297 
00298 // <exception> et al
00299 # ifdef __FreeBSD__
00300 #   if (__GNUC__ > 2) || (__GNUC__ == 2 && __GNUC_MINOR__ > 95)
00301 #     define _STLP_NATIVE_CPP_RUNTIME_INCLUDE_PATH ../include
00302 #   endif
00303 # else
00304 // azov
00305 #   ifdef __Lynx__ 
00306 #     define _STLP_NATIVE_CPP_RUNTIME_INCLUDE_PATH _STLP_NATIVE_INCLUDE_PATH
00307 #   else
00308 #    if (__GNUC__ > 2) || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)
00309 // #     define _STLP_NATIVE_CPP_RUNTIME_INCLUDE_PATH ../g++-v3
00310 #   else
00311 #     define _STLP_NATIVE_CPP_RUNTIME_INCLUDE_PATH ../include
00312 #   endif
00313 #  endif
00314 # endif
00315 
00316 #endif /* GNUC_MINOR < 8 */
00317 
00318 # define _STLP_NATIVE_CPP_C_INCLUDE_PATH _STLP_NATIVE_INCLUDE_PATH
00319 # define _STLP_NATIVE_C_INCLUDE_PATH ../include
00320 
00321 
00322 #ifdef _SCO_ELF
00323 # define _STLP_SCO_OPENSERVER
00324 #     if defined(_REENTRANT)
00325 #           define _UITHREADS     /* if      UnixWare < 7.0.1 */
00326 #           define _STLP_UITHREADS
00327 #     endif /* _REENTRANT */
00328 #endif
00329 
00330 // Tune settings for the case where static template data members are not 
00331 // instaniated by default
00332 # if defined ( _STLP_NO_STATIC_TEMPLATE_DATA )
00333 #   define _STLP_STATIC_TEMPLATE_DATA 0
00334 #   if !defined ( _STLP_WEAK_ATTRIBUTE )
00335 #    define _STLP_WEAK_ATTRIBUTE 0
00336 #   endif
00337 #  ifdef __PUT_STATIC_DATA_MEMBERS_HERE
00338 #   define __DECLARE_INSTANCE(type,item,init) type item init
00339 #  else
00340 #   define __DECLARE_INSTANCE(type,item,init)
00341 #  endif
00342 # else
00343 #   define _STLP_STATIC_TEMPLATE_DATA 1
00344 # endif
00345 
00346 
00347 
00348 

Generated on Mon Jun 5 10:20:45 2006 for Intelligence.kdevelop by  doxygen 1.4.6