/home/ntakagi/work/STLport-5.1.5/stlport/stl/config/features.hGo to the documentation of this file.00001 /* 00002 * 00003 * Copyright (c) 1994 00004 * Hewlett-Packard Company 00005 * 00006 * Copyright (c) 1996,1997 00007 * Silicon Graphics Computer Systems, Inc. 00008 * 00009 * Copyright (c) 1997 00010 * Moscow Center for SPARC Technology 00011 * 00012 * Copyright (c) 1999 00013 * Boris Fomitchev 00014 * 00015 * This material is provided "as is", with absolutely no warranty expressed 00016 * or implied. Any use is at your own risk. 00017 * 00018 * Permission to use or copy this software for any purpose is hereby granted 00019 * without fee, provided the above notices are retained on all copies. 00020 * Permission to modify the code and to distribute modified code is granted, 00021 * provided the above notices are retained, and a notice that the code was 00022 * modified is included with the above copyright notice. 00023 * 00024 */ 00025 00026 #ifndef _STLP_FEATURES_H 00027 #define _STLP_FEATURES_H 00028 00029 /* 00030 * Purpose of this file: 00031 * 00032 * Defines all STLport settings. 00033 * This file is actually a wrapper : it includes compiler-specific 00034 * settings from <config/stlcomp.h> 00035 * and user-defined settings from <config/user_config.h>. 00036 * See <config/stl_mycomp.h> and <config/user_config.h> for the description 00037 * of those macros 00038 * 00039 */ 00040 00041 /* Definition of the STLport version informations */ 00042 #include <stl/_stlport_version.h> 00043 00044 /* Other macros defined by this file: 00045 00046 * bool, true, and false, if _STLP_NO_BOOL is defined. 00047 * typename, as a null macro if it's not already a keyword. 00048 * explicit, as a null macro if it's not already a keyword. 00049 * namespace-related macros (_STLP_STD, _STLP_BEGIN_NAMESPACE, etc.) 00050 * exception-related macros (_STLP_TRY, _STLP_UNWIND, etc.) 00051 * _STLP_ASSERT, either as a test or as a null macro, depending on 00052 whether or not _STLP_ASSERTIONS is defined. 00053 */ 00054 00055 /* Definition of the 2 STLport debug levels */ 00056 #define _STLP_STLPORT_DBG_LEVEL 1 00057 #define _STLP_STANDARD_DBG_LEVEL 2 00058 00059 /* Placeholder for user to override settings. 00060 * It could be also used to mask settings from 00061 * different directories. 00062 */ 00063 #include <stl/config/user_config.h> 00064 00065 #if defined (_STLP_DEBUG) && !defined (_STLP_DEBUG_LEVEL) 00066 # define _STLP_DEBUG_LEVEL _STLP_STLPORT_DBG_LEVEL 00067 #endif 00068 00069 #if defined (__BUILDING_STLPORT) 00070 /* For the STLport implementation we can use everything: 00071 */ 00072 # if defined (_STLP_NO_ANACHRONISMS) 00073 # undef _STLP_NO_ANACHRONISMS 00074 # endif 00075 # if defined (_STLP_NO_EXTENSIONS) 00076 # undef _STLP_NO_EXTENSIONS 00077 # endif 00078 /* Moreover there are things that has no sens: 00079 */ 00080 # if defined (_STLP_NO_IOSTREAMS) 00081 # error If you do not use iostreams you do not need to build the STLport library. 00082 # endif 00083 #endif 00084 00085 /* ========================================================= */ 00086 /* This file is used for compatibility; it accepts old-style config 00087 switches */ 00088 #include <stl/config/compat.h> 00089 00090 /* Common configuration file for this particular installation. */ 00091 #include <stl/config/host.h> 00092 00093 /* Operational Environment specific */ 00094 #include <stl/config/_system.h> 00095 00096 /* ========================================================= */ 00097 00098 /* some fixes to configuration. This also includes modifications 00099 * of STLport switches depending on compiler flags, 00100 * or settings applicable to a group of compilers, such as 00101 * to all who use EDG front-end. 00102 */ 00103 #include <stl/config/stl_confix.h> 00104 00105 #ifdef _STLP_USE_BOOST_SUPPORT 00106 /* We are going to use the boost library support. To limit the problem 00107 * of self referencing headers we have to specify clearly to the boost 00108 * library that the Standard lib is STLport: 00109 */ 00110 # ifndef BOOST_STDLIB_CONFIG 00111 # define BOOST_STDLIB_CONFIG <boost/config/stdlib/stlport.hpp> 00112 # endif 00113 #endif 00114 00115 00116 /* 00117 * Performs integrity check on user-specified parameters 00118 * and site-specific settings. 00119 */ 00120 /* 00121 # include <stl/_check_config.h> 00122 */ 00123 00124 /* SGI terms */ 00125 00126 #if !defined (_STLP_NO_MEMBER_TEMPLATES) && !defined (_STLP_MEMBER_TEMPLATES) 00127 # define _STLP_MEMBER_TEMPLATES 1 00128 #endif 00129 00130 #if !defined (_STLP_NO_FRIEND_TEMPLATES) && !defined (_STLP_FRIEND_TEMPLATES) 00131 # define _STLP_FRIEND_TEMPLATES 1 00132 #endif 00133 00134 #if !defined (_STLP_NO_MEMBER_TEMPLATE_CLASSES) && !defined (_STLP_MEMBER_TEMPLATE_CLASSES) 00135 # define _STLP_MEMBER_TEMPLATE_CLASSES 1 00136 #endif 00137 00138 #if defined (_STLP_NO_MEMBER_TEMPLATE_CLASSES) && !defined (_STLP_DONT_SUPPORT_REBIND_MEMBER_TEMPLATE) 00139 # define _STLP_DONT_SUPPORT_REBIND_MEMBER_TEMPLATE 1 00140 #endif 00141 00142 #if !defined (_STLP_NO_CLASS_PARTIAL_SPECIALIZATION) && !defined (_STLP_CLASS_PARTIAL_SPECIALIZATION) 00143 # define _STLP_CLASS_PARTIAL_SPECIALIZATION 1 00144 #endif 00145 00146 #if !defined (_STLP_FUNCTION_TMPL_PARTIAL_ORDER) && !defined (_STLP_NO_FUNCTION_TMPL_PARTIAL_ORDER) 00147 # define _STLP_FUNCTION_TMPL_PARTIAL_ORDER 1 00148 #endif 00149 00150 #if !defined (_STLP_DONT_USE_SHORT_STRING_OPTIM) && !defined (_STLP_USE_SHORT_STRING_OPTIM) 00151 # define _STLP_USE_SHORT_STRING_OPTIM 1 00152 #endif 00153 00154 #if defined (_STLP_MEMBER_TEMPLATES) && !defined (_STLP_NO_EXTENSIONS) && \ 00155 !defined (_STLP_NO_CONTAINERS_EXTENSION) && !defined (_STLP_USE_CONTAINERS_EXTENSION) 00156 # define _STLP_USE_CONTAINERS_EXTENSION 00157 #endif 00158 00159 #if defined (_STLP_USE_CONTAINERS_EXTENSION) 00160 # define _STLP_TEMPLATE_FOR_CONT_EXT template <class _KT> 00161 #else 00162 # define _STLP_TEMPLATE_FOR_CONT_EXT 00163 #endif 00164 00165 #if defined (_STLP_USE_PTR_SPECIALIZATIONS) && \ 00166 (defined (_STLP_NO_CLASS_PARTIAL_SPECIALIZATION) && defined (_STLP_DONT_SIMULATE_PARTIAL_SPEC_FOR_TYPE_TRAITS)) 00167 # error "Sorry but according the STLport settings your compiler can not support the pointer specialization feature." 00168 #endif 00169 00170 #if defined (_STLP_NO_IOSTREAMS) && \ 00171 !defined (_STLP_USE_NEWALLOC) && !defined (_STLP_USE_MALLOC) 00172 # define _STLP_USE_NEWALLOC 00173 #endif 00174 00175 #if !defined (_STLP_BIG_ENDIAN) && !defined (_STLP_LITTLE_ENDIAN) 00176 # if defined (_MIPSEB) || defined (__sparc) || defined (_AIX) || \ 00177 defined (__hpux) || defined (macintosh) || defined (_MAC) 00178 # define _STLP_BIG_ENDIAN 1 00179 # elif defined (__i386) || defined (_M_IX86) || defined (_M_ARM) || \ 00180 defined (__amd64__) || defined (_M_AMD64) || defined (__x86_64__) || \ 00181 defined (__alpha__) 00182 # define _STLP_LITTLE_ENDIAN 1 00183 # elif defined (__ia64__) 00184 /* itanium allows both settings (for instance via gcc -mbig-endian) - hence a seperate check is required */ 00185 # if defined (__BIG_ENDIAN__) 00186 # define _STLP_BIG_ENDIAN 1 00187 # else 00188 # define _STLP_LITTLE_ENDIAN 1 00189 # endif 00190 # else 00191 # error "can't determine endianess" 00192 # endif 00193 #endif /* _STLP_BIG_ENDIAN */ 00194 00195 /* ========================================================== 00196 * final workaround tuning based on given flags 00197 * ========================================================== */ 00198 00199 #ifndef _STLP_UINT32_T 00200 # define _STLP_UINT32_T unsigned long 00201 #endif 00202 #ifndef _STLP_ABORT 00203 # define _STLP_ABORT() abort() 00204 #endif 00205 00206 #if !defined (_STLP_HAS_NO_NAMESPACES) 00207 # if defined _STLP_NO_NAMESPACES 00208 # undef _STLP_USE_NAMESPACES 00209 # else 00210 /* assume it as the default, turn it off later if NO_NAMESPACES selected */ 00211 # undef _STLP_USE_NAMESPACES 00212 # define _STLP_USE_NAMESPACES 1 00213 # endif 00214 #endif 00215 00216 #if defined (_STLP_NO_IOSTREAMS) 00217 # define _STLP_USE_NO_IOSTREAMS 00218 #endif 00219 00220 /* Operating system recognition (basic) */ 00221 #if defined (__unix) || defined (__linux__) || defined (__QNX__) || defined (_AIX) || defined (__NetBSD__) || defined(__OpenBSD__) || defined (__Lynx__) 00222 # define _STLP_UNIX 1 00223 #elif defined(macintosh) || defined (_MAC) 00224 # define _STLP_MAC 1 00225 #elif defined (_WIN32) || defined (__WIN32) || defined (WIN32) || defined (__WIN32__) 00226 # define _STLP_WIN32 1 00227 #elif defined (__WIN16) || defined (WIN16) || defined (_WIN16) 00228 # define _STLP_WIN16 00229 #endif /* __unix */ 00230 00231 #if defined (_STLP_WIN16) 00232 # define _STLP_LDOUBLE_80 00233 #elif defined(_STLP_WIN32) 00234 # if defined (_STLP_MSVC) || defined (__ICL) || defined (__BORLANDC__) || defined (__CYGWIN__) 00235 # define _STLP_LDOUBLE_64 00236 # else 00237 # define _STLP_LDOUBLE_96 00238 # endif 00239 #elif defined (_STLP_UNIX) 00240 # if defined (__CYGWIN__) 00241 # define _STLP_LDOUBLE_96 00242 # endif 00243 #endif 00244 00245 #if !defined (_STLP_LDOUBLE_64) && !defined (_STLP_LDOUBLE_80) && !defined (_STLP_LDOUBLE_96) && !defined (_STLP_LDOUBLE_128) 00246 # define _STLP_LDOUBLE_128 00247 #endif 00248 00249 #if !defined (_STLP_NO_LONG_DOUBLE) 00250 # define _STLP_LONGEST_FLOAT_TYPE long double 00251 #else 00252 # define _STLP_LONGEST_FLOAT_TYPE double 00253 #endif 00254 00255 /* Native headers access macros */ 00256 #include <stl/config/_native_headers.h> 00257 00258 /* shared library tune-up */ 00259 00260 #if defined (__BUILDING_STLPORT) 00261 /* if we are rebuilding right now, place everything here */ 00262 # undef _STLP_DESIGNATED_DLL 00263 # define _STLP_DESIGNATED_DLL 1 00264 #endif 00265 00266 /* Use own namespace always if possible and not explicitly instructed otherwise */ 00267 #if defined (_STLP_USE_NAMESPACES) && !defined (_STLP_BROKEN_USING_DIRECTIVE) && \ 00268 !defined (_STLP_NO_OWN_NAMESPACE) 00269 # undef _STLP_USE_OWN_NAMESPACE 00270 # define _STLP_USE_OWN_NAMESPACE 1 00271 #else 00272 # undef _STLP_WHOLE_NATIVE_STD 00273 #endif 00274 00275 #if !defined (_NOTHREADS) && !defined (_STLP_THREADS_DEFINED) 00276 00277 # if defined (_PTHREADS) 00278 # define _STLP_PTHREADS 00279 # define _STLP_THREADS 00280 # endif 00281 # if defined (_UITHREADS) 00282 # define _STLP_UITHREADS 00283 # define _STLP_THREADS 00284 # endif 00285 00286 # if defined (__sgi) && !defined (__KCC) && !defined (__GNUC__) 00287 # define _STLP_SGI_THREADS 00288 # elif defined (__DECC) || defined (__DECCXX) 00289 # define _STLP_DEC_THREADS 00290 # elif defined (_STLP_WIN32) && !defined (_STLP_PTHREADS) 00291 # define _STLP_WIN32THREADS 1 00292 # elif ((defined (__sun) && !defined (__linux__)) || defined (_UITHREADS) ) && \ 00293 !defined(_STLP_PTHREADS) 00294 # define _STLP_UITHREADS 00295 # elif defined (__OS2__) 00296 # define _STLP_OS2THREADS 00297 # elif defined (__BEOS__) 00298 # define _STLP_BETHREADS 00299 # elif defined (__MWERKS__) && defined (N_PLAT_NLM) /* (__dest_os == __netware_os) */ 00300 # define _STLP_NWTHREADS 00301 # else 00302 # define _STLP_PTHREADS 00303 # endif /* __sgi */ 00304 # define _STLP_THREADS_DEFINED 00305 #endif 00306 00307 #if (defined (_REENTRANT) || defined (_THREAD_SAFE) || \ 00308 (defined (_POSIX_THREADS) && defined (__OpenBSD__))) && \ 00309 !defined (_STLP_THREADS) 00310 # define _STLP_THREADS 00311 #endif /* _REENTRANT */ 00312 00313 #if defined (__linux__) && defined (_STLP_PTHREADS) 00314 /* # include <features.h> */ 00315 00316 # if defined (__USE_XOPEN2K) && !defined (_STLP_DONT_USE_PTHREAD_SPINLOCK) 00317 # define _STLP_USE_PTHREAD_SPINLOCK 00318 # define _STLP_STATIC_MUTEX _STLP_mutex 00319 # endif /* __USE_XOPEN2K */ 00320 #endif /* __linux__ && _STLP_PTHREADS */ 00321 00322 #if defined (__OpenBSD__) && defined (_POSIX_THREADS) && !defined (_STLP_DONT_USE_PTHREAD_SPINLOCK) 00323 # define _STLP_USE_PTHREAD_SPINLOCK 00324 # define _STLP_STATIC_MUTEX _STLP_mutex 00325 #endif 00326 00327 #ifndef _STLP_STATIC_MUTEX 00328 # define _STLP_STATIC_MUTEX _STLP_mutex_base 00329 #endif 00330 00331 #if (defined (_MFC_VER) || defined (_AFXDLL)) && !defined (_STLP_USE_MFC) 00332 # define _STLP_USE_MFC 1 00333 #endif 00334 00335 #if defined (_STLP_THREADS) 00336 # define _STLP_VOLATILE volatile 00337 /* windows.h _MUST be included before bool definition ;( */ 00338 # if defined (_STLP_WIN32THREADS) && defined (_STLP_NO_BOOL) 00339 # undef NOMINMAX 00340 # define NOMINMAX 00341 # ifdef _STLP_USE_MFC 00342 # include <afx.h> 00343 # else 00344 # include <windows.h> 00345 # endif 00346 # define _STLP_WINDOWS_H_INCLUDED 00347 # endif 00348 #else 00349 # define _STLP_VOLATILE 00350 #endif 00351 00352 #if !defined (_STLP_USE_NEW_C_HEADERS) && !defined (_STLP_HAS_NO_NEW_C_HEADERS) 00353 # define _STLP_USE_NEW_C_HEADERS 00354 #endif 00355 /* disable new-style headers if requested */ 00356 #if defined (_STLP_NO_NEW_C_HEADERS) 00357 # undef _STLP_USE_NEW_C_HEADERS 00358 #endif 00359 00360 #if !defined (_STLP_STATIC_TEMPLATE_DATA) 00361 # define _STLP_STATIC_TEMPLATE_DATA 1 00362 #endif 00363 00364 #if defined (_STLP_BASE_TYPEDEF_BUG) 00365 # undef _STLP_BASE_TYPEDEF_OUTSIDE_BUG 00366 # define _STLP_BASE_TYPEDEF_OUTSIDE_BUG 1 00367 #endif 00368 00369 #if defined (_STLP_NESTED_TYPE_PARAM_BUG) || (defined (_STLP_MSVC) && (_STLP_MSVC < 1100)) 00370 # define _STLP_GLOBAL_NESTED_RETURN_TYPE_PARAM_BUG 00371 #endif 00372 00373 /* SUNpro 4.2 inline string literal bug */ 00374 #ifdef _STLP_INLINE_STRING_LITERAL_BUG 00375 # define _STLP_FIX_LITERAL_BUG(__x) __x = __x; 00376 #else 00377 # define _STLP_FIX_LITERAL_BUG(__x) 00378 #endif 00379 00380 #if defined (_STLP_NON_TYPE_TMPL_PARAM_BUG) 00381 # undef _STLP_NO_DEFAULT_NON_TYPE_PARAM 00382 # define _STLP_NO_DEFAULT_NON_TYPE_PARAM 1 00383 #endif 00384 00385 #define _STLP_NEW new 00386 #define _STLP_PLACEMENT_NEW new 00387 00388 #ifdef _STLP_DEBUG 00389 # define _STLP_ASSERTIONS 1 00390 #endif 00391 00392 #if !defined (_STLP_STATIC_ASSERT) 00393 /* Some compiler support 0 size array so we use negative size array to generate 00394 * a compilation time error. 00395 */ 00396 # define _STLP_STATIC_ASSERT(expr) typedef char __static_assert[expr ? 1 : -1]; 00397 #endif 00398 00399 /* apple mpw exception handling bug */ 00400 #ifndef _STLP_MPWFIX_TRY 00401 # define _STLP_MPWFIX_TRY 00402 #endif 00403 #ifndef _STLP_MPWFIX_CATCH 00404 # define _STLP_MPWFIX_CATCH 00405 #endif 00406 #ifndef _STLP_MPWFIX_CATCH_ACTION 00407 # define _STLP_MPWFIX_CATCH_ACTION(action) 00408 #endif 00409 00410 /* if _STLP_DEBUG or _STLP_ASSERTIONS are set, stl/debug/_debug.h defines those */ 00411 00412 #if !defined (_STLP_ASSERTIONS) && !defined (_STLP_DEBUG) && !defined (_STLP_DEBUG_ALLOC) 00413 # define _STLP_ASSERT(expr) 00414 #endif 00415 00416 #if !defined (_STLP_DEBUG) 00417 # define _STLP_VERBOSE_ASSERT(expr,diagnostic) 00418 # define _STLP_DEBUG_CHECK(expr) 00419 # define _STLP_DEBUG_DO(expr) 00420 #endif 00421 00422 #if !defined (_STLP_WEAK) 00423 # define _STLP_WEAK 00424 #endif 00425 00426 /* default parameters as template types derived from arguments ( not always supported ) */ 00427 #if defined (_STLP_LIMITED_DEFAULT_TEMPLATES) 00428 # define _STLP_DFL_TMPL_PARAM( classname, defval ) class classname 00429 #else 00430 # if !defined (_STLP_DEFAULT_TYPE_PARAM) 00431 # define _STLP_DEFAULT_TYPE_PARAM 1 00432 # endif 00433 # define _STLP_DFL_TMPL_PARAM( classname, defval ) class classname = defval 00434 #endif 00435 00436 /* default parameters as complete types */ 00437 #if defined (_STLP_DEFAULT_TYPE_PARAM) 00438 # define _STLP_DFL_TYPE_PARAM( classname, defval ) class classname = defval 00439 # define _STLP_DFL_NON_TYPE_PARAM(type,name,val) type name = val 00440 #else 00441 # define _STLP_DFL_TYPE_PARAM( classname, defval ) class classname 00442 # define _STLP_DFL_NON_TYPE_PARAM(type,name,val) type name 00443 #endif 00444 00445 /* SGI compatibility */ 00446 00447 #ifdef _STLP_NO_WCHAR_T 00448 # ifndef _STLP_NO_NATIVE_WIDE_STREAMS 00449 # define _STLP_NO_NATIVE_WIDE_STREAMS 1 00450 # endif 00451 #else 00452 # define _STLP_HAS_WCHAR_T 1 00453 #endif 00454 00455 #if !defined (_STLP_NO_AT_MEMBER_FUNCTION) 00456 # define _STLP_CAN_THROW_RANGE_ERRORS 1 00457 #endif 00458 00459 #if !defined (_STLP_USE_RAW_SGI_ALLOCATORS) 00460 # define _STLP_DEFAULT_ALLOCATOR(_Tp) allocator< _Tp > 00461 # define _STLP_DEFAULT_ALLOCATOR_SELECT( _Tp ) _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) 00462 # define _STLP_DEFAULT_PAIR_ALLOCATOR(_Key, _Tp) allocator< pair < _Key, _Tp > > 00463 # if defined (_STLP_LIMITED_DEFAULT_TEMPLATES) 00464 # define _STLP_DEFAULT_PAIR_ALLOCATOR_SELECT(_Key, _Tp ) class _Alloc 00465 # define _STLP_USE_WRAPPER_FOR_ALLOC_PARAM 1 00466 # else 00467 # define _STLP_DEFAULT_PAIR_ALLOCATOR_SELECT(_Key, _Tp ) \ 00468 class _Alloc = allocator< pair < _Key, _Tp > > 00469 # endif 00470 #else 00471 # define _STLP_DEFAULT_ALLOCATOR( _Tp ) __sgi_alloc 00472 # define _STLP_DEFAULT_ALLOCATOR_SELECT( _Tp ) _STLP_DFL_TYPE_PARAM(_Alloc,__sgi_alloc) 00473 # define _STLP_DEFAULT_PAIR_ALLOCATOR( _Key, _Tp ) __sgi_alloc 00474 # define _STLP_DEFAULT_PAIR_ALLOCATOR_SELECT(_Key, _Tp ) _STLP_DFL_TYPE_PARAM(_Alloc,__sgi_alloc) 00475 # if defined (_STLP_LIMITED_DEFAULT_TEMPLATES) && !defined (_STLP_DEFAULT_TYPE_PARAM) 00476 # define _STLP_USE_WRAPPER_FOR_ALLOC_PARAM 1 00477 # endif 00478 #endif 00479 00480 /* debug mode tool */ 00481 #if defined (_STLP_DEBUG) 00482 # define _STLP_NON_DBG_NAME(X) _NonDbg_##X 00483 #endif 00484 00485 /* pointer specialization tool */ 00486 #if defined (_STLP_USE_PTR_SPECIALIZATIONS) 00487 # define _STLP_PTR_IMPL_NAME(X) _Impl_##X 00488 #endif 00489 00490 #if defined (_STLP_USE_MSVC6_MEM_T_BUG_WORKAROUND) 00491 # define _STLP_NO_MEM_T_NAME(X) _NoMemT_##X 00492 # if defined (_STLP_DEBUG) 00493 # define _STLP_NON_DBG_NO_MEM_T_NAME(X) _NonDbg_NoMemT_##X 00494 # endif 00495 #endif 00496 00497 /* this always mean the C library is in global namespace */ 00498 #if defined (_STLP_HAS_NO_NEW_C_HEADERS) && !defined (_STLP_VENDOR_GLOBAL_CSTD) 00499 # define _STLP_VENDOR_GLOBAL_CSTD 1 00500 #endif 00501 00502 /* Depending of whether compiler supports namespaces, 00503 * tune the parameters for vendor-supplied libraries. 00504 * This section is guarded by _STLP_HAS_NO_NAMESPACES, not by _STLP_USE_NAMESPACES, 00505 * since it depends only on the native features, not on user's preference whether 00506 * to use namespace for STLport or not. 00507 */ 00508 #if !defined (_STLP_HAS_NO_NAMESPACES) 00509 /* Import some vendor's headers into corresponding STLport ones if they might be needed 00510 * (if we wrap native iostreams and use namepace other than std::) */ 00511 # if defined (_STLP_WHOLE_NATIVE_STD) 00512 # define _STLP_IMPORT_VENDOR_STD 1 00513 # undef _STLP_MINIMUM_IMPORT_STD 00514 # endif 00515 00516 /* if using stlport:: namespace or if C library stuff is not in vendor's std::, 00517 * try importing 'em. 00518 * MSVC has ambiguity problem when we try to import C-style std:: stuff back into global namespace */ 00519 # if defined (_STLP_USE_NAMESPACES) && (defined(_STLP_USE_OWN_NAMESPACE) || defined (_STLP_VENDOR_GLOBAL_CSTD)) 00520 # define _STLP_IMPORT_VENDOR_CSTD 1 00521 # endif 00522 00523 # if defined (_STLP_NO_USING_FOR_GLOBAL_FUNCTIONS) && !defined (_STLP_DO_IMPORT_CSTD_FUNCTIONS) 00524 # define _STLP_NO_CSTD_FUNCTION_IMPORTS 00525 # endif 00526 00527 # define _STLP_USING_NAMESPACE(x) using namespace x ; 00528 00529 namespace std { } 00530 namespace __std_alias = std; 00531 00532 /* assume std:: namespace for C++ std library if not being told otherwise */ 00533 # if defined (_STLP_VENDOR_GLOBAL_STD) 00534 # define _STLP_VENDOR_STD 00535 # else 00536 # define _STLP_VENDOR_STD __std_alias 00537 # endif 00538 00539 /* tune things that come from C library */ 00540 # if defined (_STLP_VENDOR_GLOBAL_CSTD) || !defined(_STLP_USE_NEW_C_HEADERS) 00541 /* in old-style headers, C functions go to global scope. */ 00542 # define _STLP_VENDOR_CSTD 00543 # define _STLP_USING_VENDOR_CSTD 00544 # else 00545 # define _STLP_VENDOR_CSTD _STLP_VENDOR_STD 00546 # define _STLP_USING_VENDOR_CSTD _STLP_USING_NAMESPACE(_STLP_VENDOR_CSTD) 00547 # endif /* _STLP_VENDOR_CSTD */ 00548 /* exception, typeinfo, new - always come from the vendor */ 00549 # if !defined (_STLP_VENDOR_EXCEPT_STD) 00550 # if defined (_STLP_VENDOR_GLOBAL_EXCEPT_STD) 00551 # define _STLP_VENDOR_EXCEPT_STD 00552 # else 00553 # define _STLP_VENDOR_EXCEPT_STD _STLP_VENDOR_STD 00554 # endif 00555 # endif 00556 # define _STLP_OLD_IO_NAMESPACE 00557 # if !defined (_STLP_VENDOR_MB_NAMESPACE) 00558 # define _STLP_VENDOR_MB_NAMESPACE _STLP_VENDOR_CSTD 00559 # endif 00560 #else 00561 /* compiler has no namespace support */ 00562 # define _STLP_VENDOR_STD 00563 # define _STLP_VENDOR_CSTD 00564 # define _STLP_USING_NAMESPACE(x) 00565 # define _STLP_USING_VENDOR_CSTD 00566 # define _STLP_VENDOR_EXCEPT_STD 00567 #endif 00568 00569 #if defined (_STLP_USE_NAMESPACES) 00570 00571 # if defined (_STLP_USE_OWN_NAMESPACE) 00572 # if !defined (_STLP_STD_NAME) 00573 # if !defined (_STLP_DEBUG) 00574 # if !defined (_STLP_USING_CROSS_NATIVE_RUNTIME_LIB) 00575 # ifndef _STLP_THREADS 00576 # define _STLP_STD_NAME stlpmtx_std 00577 # else 00578 # define _STLP_STD_NAME stlp_std 00579 # endif 00580 # else 00581 # ifndef _STLP_THREADS 00582 # define _STLP_STD_NAME stlpxmtx_std 00583 # else 00584 # define _STLP_STD_NAME stlpx_std 00585 # endif 00586 # endif 00587 # else 00588 /* 00589 * The STLport debug mode is binary incompatible with the other modes, 00590 * lets make it clear on the STLport namespace to generate link errors rather 00591 * than runtime. 00592 */ 00593 # if !defined (_STLP_USING_CROSS_NATIVE_RUNTIME_LIB) 00594 # ifndef _STLP_THREADS 00595 # define _STLP_STD_NAME stlpdmtx_std 00596 # else 00597 # define _STLP_STD_NAME stlpd_std 00598 # endif 00599 # else 00600 # ifndef _STLP_THREADS 00601 # define _STLP_STD_NAME stlpdxmtx_std 00602 # else 00603 # define _STLP_STD_NAME stlpdx_std 00604 # endif 00605 # endif 00606 # endif 00607 # endif 00608 namespace _STLP_STD_NAME { } 00609 # else 00610 # if defined (_STLP_DEBUG) 00611 namespace stdD = std; 00612 # endif 00613 # define _STLP_STD_NAME std 00614 # endif /* _STLP_USE_OWN_NAMESPACE */ 00615 00616 # if !defined (_STLP_USING_NAMESPACE_BUG) 00617 # define _STLP_PRIV_NAME stlp_priv 00618 namespace _STLP_PRIV_NAME { 00619 using namespace _STLP_STD_NAME; 00620 } 00621 # else 00622 # define _STLP_PRIV_NAME priv 00623 # endif 00624 00625 # define _STLP_BEGIN_NAMESPACE namespace _STLP_STD_NAME { 00626 # define _STLP_END_NAMESPACE } 00627 00628 # if !defined (_STLP_DONT_USE_PRIV_NAMESPACE) 00629 # if !defined (_STLP_USING_NAMESPACE_BUG) 00630 /* We prefer to make private namespace a totaly seperated namespace... 00631 */ 00632 # define _STLP_PRIV ::_STLP_PRIV_NAME:: 00633 # define _STLP_MOVE_TO_PRIV_NAMESPACE } namespace _STLP_PRIV_NAME { 00634 # define _STLP_MOVE_TO_STD_NAMESPACE } namespace _STLP_STD_NAME { 00635 # else 00636 /* but sometimes we can't: 00637 */ 00638 # define _STLP_PRIV _STLP_PRIV_NAME:: 00639 # define _STLP_MOVE_TO_PRIV_NAMESPACE namespace _STLP_PRIV_NAME { 00640 # define _STLP_MOVE_TO_STD_NAMESPACE } 00641 # endif 00642 # else 00643 # define _STLP_PRIV 00644 # define _STLP_MOVE_TO_PRIV_NAMESPACE 00645 # define _STLP_MOVE_TO_STD_NAMESPACE 00646 # endif 00647 00648 /* decide whether or not we use separate namespace for rel ops */ 00649 # if defined (_STLP_NO_RELOPS_NAMESPACE) 00650 # define _STLP_BEGIN_RELOPS_NAMESPACE _STLP_BEGIN_NAMESPACE namespace rel_ops {} 00651 # define _STLP_END_RELOPS_NAMESPACE } 00652 # else 00653 /* Use std::rel_ops namespace */ 00654 # define _STLP_BEGIN_RELOPS_NAMESPACE _STLP_BEGIN_NAMESPACE namespace rel_ops { 00655 # define _STLP_END_RELOPS_NAMESPACE } } 00656 # define _STLP_USE_SEPARATE_RELOPS_NAMESPACE 00657 # endif /* Use std::rel_ops namespace */ 00658 00659 # define _STLP_STD ::_STLP_STD_NAME 00660 00661 /* Official STLport namespace when std is not redefined. 00662 * Here we don't use a macro as stlport is used as file name by boost 00663 * and folder name under beos: 00664 */ 00665 namespace stlport = _STLP_STD_NAME; 00666 00667 /* Backward compatibility: 00668 */ 00669 namespace _STL = _STLP_STD_NAME; 00670 #undef __STLPORT_NAMESPACE 00671 #define __STLPORT_NAMESPACE _STLP_STD_NAME 00672 00673 #else /* _STLP_USE_NAMESPACES */ 00674 /* STLport is being put into global namespace */ 00675 # define _STLP_STD 00676 # define _STLP_PRIV 00677 # define _STLP_BEGIN_NAMESPACE 00678 # define _STLP_END_NAMESPACE 00679 # define _STLP_MOVE_TO_PRIV_NAMESPACE 00680 # define _STLP_MOVE_TO_STD_NAMESPACE 00681 00682 /* boris : it was found out that _STLP_USE_SEPARATE_RELOPS_NAMESPACE 00683 causes less problems than having relational operator templates in global namespace 00684 Please define _STLP_NO_RELOPS_NAMESPACE in config/user_config.h if your code rely on them. */ 00685 # if !defined (_STLP_NO_RELOPS_NAMESPACE) 00686 # define _STLP_USE_SEPARATE_RELOPS_NAMESPACE 00687 # endif 00688 # define _STLP_BEGIN_RELOPS_NAMESPACE 00689 # define _STLP_END_RELOPS_NAMESPACE 00690 # undef _STLP_USE_OWN_NAMESPACE 00691 #endif /* _STLP_USE_NAMESPACES */ 00692 00693 #define STLPORT_CSTD _STLP_VENDOR_CSTD 00694 #define STLPORT _STLP_STD_NAME 00695 00696 #if defined(_STLP_BOGUS_TEMPLATE_TYPE_MATCHING_BUG) 00697 # define _STLP_SIMPLE_TYPE(T) _stl_trivial_proxy<T> 00698 #else 00699 # define _STLP_SIMPLE_TYPE(T) T 00700 #endif 00701 00702 #ifndef _STLP_RAND48 00703 # define _STLP_NO_DRAND48 00704 #endif 00705 00706 /* advanced keywords usage */ 00707 #define __C_CAST(__x, __y) ((__x)(__y)) 00708 #ifndef _STLP_NO_NEW_STYLE_CASTS 00709 # define __CONST_CAST(__x,__y) const_cast<__x>(__y) 00710 # define __STATIC_CAST(__x,__y) static_cast<__x>(__y) 00711 # define __REINTERPRET_CAST(__x,__y) reinterpret_cast<__x>(__y) 00712 # define __DYNAMIC_CAST(__x,__y) dynamic_cast<__x>(__y) 00713 #else 00714 # define __STATIC_CAST(__x,__y) __C_CAST(__x, __y) 00715 # define __CONST_CAST(__x,__y) __C_CAST(__x, __y) 00716 # define __REINTERPRET_CAST(__x,__y) __C_CAST(__x, __y) 00717 # define __DYNAMIC_CAST(__x,__y) __C_CAST(__x, __y) 00718 #endif 00719 00720 #if defined (_STLP_NEED_TYPENAME) && ! defined (typename) 00721 # define typename 00722 #endif 00723 00724 #if defined (_STLP_NEED_TYPENAME) || defined (_STLP_NO_TYPENAME_ON_RETURN_TYPE ) 00725 # define _STLP_TYPENAME_ON_RETURN_TYPE 00726 #else 00727 # define _STLP_TYPENAME_ON_RETURN_TYPE typename 00728 #endif 00729 00730 #ifdef _STLP_NO_TYPENAME_IN_TEMPLATE_HEADER 00731 # define _STLP_HEADER_TYPENAME 00732 #else 00733 # define _STLP_HEADER_TYPENAME typename 00734 #endif 00735 00736 #ifndef _STLP_NO_MEMBER_TEMPLATE_KEYWORD 00737 # define _STLP_TEMPLATE template 00738 #else 00739 # define _STLP_TEMPLATE 00740 #endif 00741 00742 #if defined (_STLP_USE_CONTAINERS_EXTENSION) 00743 # define _STLP_KEY_TYPE_FOR_CONT_EXT(type) 00744 # define _STLP_TEMPLATE_FOR_CONT_EXT template <class _KT> 00745 #else 00746 # define _STLP_KEY_TYPE_FOR_CONT_EXT(type) typedef type _KT; 00747 # define _STLP_TEMPLATE_FOR_CONT_EXT 00748 #endif 00749 00750 #if defined (_STLP_NEED_EXPLICIT) && !defined (explicit) 00751 # define explicit 00752 #endif 00753 00754 #if !defined (_STLP_NEED_MUTABLE) 00755 # define _STLP_ASSIGN_MUTABLE(type,x,y) x = y 00756 #else 00757 # define _STLP_ASSIGN_MUTABLE(type,x,y) __CONST_CAST(type,x)=y 00758 # define mutable 00759 #endif 00760 00761 #if defined (_STLP_NO_SIGNED_BUILTINS) 00762 /* old HP-UX doesn't understand "signed" keyword */ 00763 # define signed 00764 #endif 00765 00766 #if defined (_STLP_LOOP_INLINE_PROBLEMS) 00767 # define _STLP_INLINE_LOOP 00768 #else 00769 # define _STLP_INLINE_LOOP inline 00770 #endif 00771 00772 #define _STLP_PRIVATE public 00773 00774 #ifndef _STLP_NO_PARTIAL_SPECIALIZATION_SYNTAX 00775 # define _STLP_TEMPLATE_NULL template<> 00776 #else 00777 # define _STLP_TEMPLATE_NULL 00778 #endif 00779 00780 #ifdef _STLP_FUNCTION_TMPL_PARTIAL_ORDER 00781 # define _STLP_OPERATOR_TEMPLATE 00782 #else 00783 # define _STLP_OPERATOR_TEMPLATE _STLP_TEMPLATE_NULL 00784 #endif 00785 00786 #ifndef _STLP_CLASS_PARTIAL_SPECIALIZATION 00787 /* unless we have other compiler problem, try simulating partial spec here */ 00788 # if !defined (_STLP_DONT_SIMULATE_PARTIAL_SPEC_FOR_TYPE_TRAITS) 00789 # define _STLP_SIMULATE_PARTIAL_SPEC_FOR_TYPE_TRAITS 00790 # endif 00791 /* For your own iterators, please use inheritance from iterator<> instead of these obsolete queries. */ 00792 # if (defined (_STLP_NESTED_TYPE_PARAM_BUG) || !defined (_STLP_SIMULATE_PARTIAL_SPEC_FOR_TYPE_TRAITS)) 00793 # if ! defined ( _STLP_USE_OLD_HP_ITERATOR_QUERIES ) 00794 # define _STLP_USE_OLD_HP_ITERATOR_QUERIES 00795 # endif 00796 # elif defined ( _STLP_NO_ANACHRONISMS ) 00797 # undef _STLP_USE_OLD_HP_ITERATOR_QUERIES 00798 # endif 00799 #endif 00800 00801 #ifndef _STLP_NO_EXPLICIT_FUNCTION_TMPL_ARGS 00802 # define _STLP_NULL_TMPL_ARGS <> 00803 # else 00804 # define _STLP_NULL_TMPL_ARGS 00805 #endif 00806 00807 #if !defined (_STLP_ALLOCATOR_TYPE_DFL) 00808 # if defined (_STLP_DONT_SUP_DFLT_PARAM) 00809 # define _STLP_NEEDS_EXTRA_TEMPLATE_CONSTRUCTORS 00810 # endif 00811 # if defined (_STLP_NEEDS_EXTRA_TEMPLATE_CONSTRUCTORS) 00812 # define _STLP_ALLOCATOR_TYPE_DFL 00813 # else 00814 # define _STLP_ALLOCATOR_TYPE_DFL = allocator_type() 00815 # endif 00816 #endif 00817 00818 /* When the compiler do not correctly initialized the basic types value in default parameters we prefer 00819 * to avoid them to be able to correct this bug. 00820 */ 00821 #if defined (_STLP_DEF_CONST_DEF_PARAM_BUG) 00822 # define _STLP_DONT_SUP_DFLT_PARAM 1 00823 #endif 00824 00825 #if defined (__SGI_STL_NO_ARROW_OPERATOR) && ! defined (_STLP_NO_ARROW_OPERATOR) 00826 # define _STLP_NO_ARROW_OPERATOR 00827 #endif 00828 00829 #if !defined (_STLP_CLASS_PARTIAL_SPECIALIZATION) 00830 # if !(defined (_STLP_NO_ARROW_OPERATOR)) && \ 00831 !defined (_STLP_NO_MSVC50_COMPATIBILITY) && !defined (_STLP_MSVC50_COMPATIBILITY) 00832 /* this one is needed for proper reverse_iterator<> operator ->() handling */ 00833 # define _STLP_MSVC50_COMPATIBILITY 1 00834 # endif 00835 #endif 00836 00837 #if defined ( _STLP_CLASS_PARTIAL_SPECIALIZATION ) 00838 # if (defined(__IBMCPP__) && (500 <= __IBMCPP__) && (__IBMCPP__ < 600) ) 00839 # define _STLP_DECLARE_REVERSE_ITERATORS(__reverse_iterator) \ 00840 typedef typename _STLP_STD :: reverse_iterator<const_iterator> const_reverse_iterator; \ 00841 typedef typename _STLP_STD :: reverse_iterator<iterator> reverse_iterator 00842 # elif (defined (__sgi) && ! defined (__GNUC__)) || defined (__SUNPRO_CC) || defined (__xlC__) 00843 # define _STLP_DECLARE_REVERSE_ITERATORS(__reverse_iterator) \ 00844 typedef _STLP_STD:: _STLP_TEMPLATE reverse_iterator<const_iterator> const_reverse_iterator; \ 00845 typedef _STLP_STD:: _STLP_TEMPLATE reverse_iterator<iterator> reverse_iterator 00846 # else 00847 # define _STLP_DECLARE_REVERSE_ITERATORS(__reverse_iterator) \ 00848 typedef _STLP_STD::reverse_iterator<const_iterator> const_reverse_iterator; \ 00849 typedef _STLP_STD::reverse_iterator<iterator> reverse_iterator 00850 # endif 00851 #else /* _STLP_CLASS_PARTIAL_SPECIALIZATION */ 00852 # if defined (_STLP_MSVC50_COMPATIBILITY) 00853 # define _STLP_DECLARE_REVERSE_ITERATORS(__reverse_iterator) \ 00854 typedef _STLP_STD::__reverse_iterator<const_iterator, value_type, const_reference, \ 00855 const_pointer, difference_type> const_reverse_iterator; \ 00856 typedef _STLP_STD::__reverse_iterator<iterator, value_type, reference, pointer, difference_type> \ 00857 reverse_iterator 00858 # else 00859 # define _STLP_DECLARE_REVERSE_ITERATORS(__reverse_iterator) \ 00860 typedef _STLP_STD::__reverse_iterator<const_iterator, value_type, const_reference, \ 00861 difference_type> const_reverse_iterator; \ 00862 typedef _STLP_STD::__reverse_iterator<iterator, value_type, \ 00863 reference, difference_type> \ 00864 reverse_iterator 00865 # endif 00866 #endif /* _STLP_CLASS_PARTIAL_SPECIALIZATION */ 00867 00868 #define _STLP_DECLARE_BIDIRECTIONAL_REVERSE_ITERATORS \ 00869 _STLP_DECLARE_REVERSE_ITERATORS(reverse_bidirectional_iterator) 00870 #define _STLP_DECLARE_RANDOM_ACCESS_REVERSE_ITERATORS \ 00871 _STLP_DECLARE_REVERSE_ITERATORS(reverse_iterator) 00872 00873 #define __IMPORT_CONTAINER_TYPEDEFS(_Super) \ 00874 typedef typename _Super::value_type value_type; \ 00875 typedef typename _Super::size_type size_type; \ 00876 typedef typename _Super::difference_type difference_type; \ 00877 typedef typename _Super::reference reference; \ 00878 typedef typename _Super::const_reference const_reference; \ 00879 typedef typename _Super::pointer pointer; \ 00880 typedef typename _Super::const_pointer const_pointer; \ 00881 typedef typename _Super::allocator_type allocator_type; 00882 00883 00884 #define __IMPORT_ITERATORS(_Super) \ 00885 typedef typename _Super::iterator iterator; \ 00886 typedef typename _Super::const_iterator const_iterator; 00887 00888 #define __IMPORT_REVERSE_ITERATORS(_Super) \ 00889 typedef typename _Super::const_reverse_iterator const_reverse_iterator; \ 00890 typedef typename _Super::reverse_iterator reverse_iterator; 00891 00892 #define __IMPORT_SUPER_COPY_ASSIGNMENT(__derived_name, _Self, _SUPER) \ 00893 __derived_name(const _Super& __x) : _SUPER(__x) {} \ 00894 _Self& operator=(const _Super& __x) { \ 00895 *(_Super*)this = __x; \ 00896 return *this; \ 00897 } \ 00898 __derived_name(const _Self& __x) : _SUPER(__x) {} \ 00899 _Self& operator=(const _Self& __x) { \ 00900 *(_Super*)this = __x; \ 00901 return *this; \ 00902 } 00903 00904 #define __IMPORT_WITH_ITERATORS(_Super) \ 00905 __IMPORT_CONTAINER_TYPEDEFS(_Super) __IMPORT_ITERATORS(_Super) 00906 00907 #define __IMPORT_WITH_REVERSE_ITERATORS(_Super) \ 00908 __IMPORT_WITH_ITERATORS(_Super) __IMPORT_REVERSE_ITERATORS(_Super) 00909 00910 #if defined (_STLP_TRIVIAL_CONSTRUCTOR_BUG) 00911 # define __TRIVIAL_CONSTRUCTOR(__type) __type() {} 00912 #else 00913 # define __TRIVIAL_CONSTRUCTOR(__type) 00914 #endif 00915 00916 #if defined (_STLP_TRIVIAL_DESTRUCTOR_BUG) 00917 # define __TRIVIAL_DESTRUCTOR(__type) ~__type() {} 00918 #else 00919 # define __TRIVIAL_DESTRUCTOR(__type) 00920 #endif 00921 00922 #define __TRIVIAL_STUFF(__type) \ 00923 __TRIVIAL_CONSTRUCTOR(__type) __TRIVIAL_DESTRUCTOR(__type) 00924 00925 #if defined (_STLP_HAS_NO_EXCEPTIONS) 00926 # define _STLP_NO_EXCEPTIONS 00927 #endif 00928 00929 #if !defined (_STLP_DONT_USE_EXCEPTIONS) && !defined (_STLP_NO_EXCEPTIONS) && !defined (_STLP_USE_EXCEPTIONS) 00930 # define _STLP_USE_EXCEPTIONS 00931 #endif 00932 00933 #if defined (_STLP_USE_EXCEPTIONS) 00934 # define _STLP_TRY try 00935 # define _STLP_CATCH_ALL catch(...) 00936 # ifndef _STLP_THROW 00937 # define _STLP_THROW(x) throw x 00938 # endif 00939 # define _STLP_RETHROW throw 00940 00941 # define _STLP_UNWIND(action) catch(...) { action; throw; } 00942 00943 # ifdef _STLP_THROW_RETURN_BUG 00944 # define _STLP_RET_AFTER_THROW(data) return data; 00945 # else 00946 # define _STLP_RET_AFTER_THROW(data) 00947 # endif 00948 00949 /* We do not use exception throw specifications unless we are forced to */ 00950 # if !defined (_STLP_THROWS) 00951 # define _STLP_THROWS(x) 00952 # endif 00953 # if !defined (_STLP_NOTHROW) 00954 # define _STLP_NOTHROW 00955 # endif 00956 #else 00957 # define _STLP_TRY 00958 # define _STLP_CATCH_ALL if (false) 00959 # ifndef _STLP_THROW 00960 # define _STLP_THROW(x) 00961 # endif 00962 # define _STLP_RETHROW {} 00963 # define _STLP_UNWIND(action) 00964 # define _STLP_THROWS(x) 00965 # define _STLP_NOTHROW 00966 # define _STLP_RET_AFTER_THROW(data) 00967 #endif 00968 00969 /* 00970 * Here we check _STLP_NO_EXCEPTIONS which means that the compiler has no 00971 * exception support but not the _STLP_USE_EXCEPTIONS which simply means 00972 * that the user do not want to use them. 00973 */ 00974 #if !defined (_STLP_NO_EXCEPTIONS) && !defined (_STLP_NO_EXCEPTION_SPEC) 00975 # define _STLP_THROWS_INHERENTLY(x) throw x 00976 # define _STLP_NOTHROW_INHERENTLY throw() 00977 #else 00978 # define _STLP_THROWS_INHERENTLY(x) 00979 # define _STLP_NOTHROW_INHERENTLY 00980 #endif 00981 00982 /* STLport function not returning are functions that throw so we translate 00983 * the noreturn functions in throwing functions taking also into account 00984 * exception support activation. 00985 */ 00986 #if defined (_STLP_NORETURN_FUNCTION) && !defined (_STLP_NO_EXCEPTIONS) && \ 00987 !defined (_STLP_FUNCTION_THROWS) 00988 # define _STLP_FUNCTION_THROWS _STLP_NORETURN_FUNCTION 00989 #else 00990 # define _STLP_FUNCTION_THROWS 00991 #endif 00992 00993 #if defined(_STLP_NO_BOOL) 00994 # if (defined (__IBMCPP__) && (__IBMCPP__ < 400)) && ! defined (_AIX) 00995 # include <isynonym.hpp> 00996 # if defined (__OS400__) 00997 typedef int bool; 00998 # elif !( defined (__xlC__) || defined (_AIX)) 00999 typedef Boolean bool; 01000 # endif 01001 # else 01002 # if defined(_STLP_YVALS_H) 01003 # include <yvals.h> 01004 # else 01005 # if defined (_STLP_DONT_USE_BOOL_TYPEDEF) 01006 # define bool int 01007 # else 01008 typedef int bool; 01009 # endif 01010 # define true 1 01011 # define false 0 01012 # endif 01013 # endif /* __IBMCPP__ */ 01014 #else 01015 # define _STLP_BOOL_KEYWORD 1 01016 #endif /* _STLP_NO_BOOL */ 01017 01018 #ifndef _STLP_MPW_EXTRA_CONST 01019 # define _STLP_MPW_EXTRA_CONST 01020 #endif 01021 01022 #ifndef _STLP_DEFAULTCHAR 01023 # define _STLP_DEFAULTCHAR char 01024 #endif 01025 01026 #if defined (_STLP_DEBUG_ALLOC) && !defined (_STLP_ASSERTIONS) 01027 # define _STLP_ASSERTIONS 1 01028 #endif 01029 01030 /* uninitialized value filler */ 01031 #ifndef _STLP_SHRED_BYTE 01032 /* This value is designed to cause problems if an error occurs */ 01033 # define _STLP_SHRED_BYTE 0xA3 01034 #endif /* _STLP_SHRED_BYTE */ 01035 01036 /* shared library tune-up */ 01037 #ifndef _STLP_IMPORT_DECLSPEC 01038 # define _STLP_IMPORT_DECLSPEC 01039 #endif 01040 01041 /* a keyword used to instantiate export template */ 01042 #ifndef _STLP_EXPORT_TEMPLATE_KEYWORD 01043 # define _STLP_EXPORT_TEMPLATE_KEYWORD 01044 #endif 01045 #ifndef _STLP_IMPORT_TEMPLATE_KEYWORD 01046 # define _STLP_IMPORT_TEMPLATE_KEYWORD 01047 #endif 01048 01049 #ifdef _STLP_USE_NO_IOSTREAMS 01050 /* 01051 * If we do not use iostreams we do not use the export/import 01052 * techniques to avoid build of the STLport library. 01053 */ 01054 # undef _STLP_USE_DECLSPEC 01055 /* We also undef USE_DYNAMIC_LIB macro as this macro add some code 01056 * to use the dynamic (shared) STLport library for some platform/compiler 01057 * configuration leading to problem when do not link to the STLport lib. 01058 */ 01059 # undef _STLP_USE_DYNAMIC_LIB 01060 #endif 01061 01062 #if defined (_STLP_DLLEXPORT_NEEDS_PREDECLARATION) && defined (_STLP_USE_DECLSPEC) 01063 # if ! defined (_STLP_USE_TEMPLATE_EXPORT) 01064 /* this setting turns on "extern template" extension use */ 01065 # define _STLP_USE_TEMPLATE_EXPORT 01066 # endif 01067 # if defined (_STLP_DESIGNATED_DLL) && ! defined (_STLP_NO_FORCE_INSTANTIATE) 01068 # define _STLP_NO_FORCE_INSTANTIATE 01069 # endif 01070 #endif 01071 01072 #if defined (_STLP_DESIGNATED_DLL) /* This is a lib which will contain STLport exports */ 01073 # define _STLP_EXPORT _STLP_EXPORT_TEMPLATE_KEYWORD 01074 #else 01075 # define _STLP_EXPORT _STLP_IMPORT_TEMPLATE_KEYWORD 01076 #endif 01077 01078 #ifndef _STLP_EXPORT_TEMPLATE 01079 # define _STLP_EXPORT_TEMPLATE _STLP_EXPORT template 01080 #endif 01081 01082 #if defined (_STLP_USE_DECLSPEC) /* using export/import technique */ 01083 01084 # ifndef _STLP_EXPORT_DECLSPEC 01085 # define _STLP_EXPORT_DECLSPEC 01086 # endif 01087 # ifndef _STLP_IMPORT_DECLSPEC 01088 # define _STLP_IMPORT_DECLSPEC 01089 # endif 01090 # ifndef _STLP_CLASS_EXPORT_DECLSPEC 01091 # define _STLP_CLASS_EXPORT_DECLSPEC 01092 # endif 01093 # ifndef _STLP_CLASS_IMPORT_DECLSPEC 01094 # define _STLP_CLASS_IMPORT_DECLSPEC 01095 # endif 01096 # if defined (_STLP_DESIGNATED_DLL) /* This is a lib which will contain STLport exports */ 01097 # define _STLP_DECLSPEC _STLP_EXPORT_DECLSPEC 01098 # define _STLP_CLASS_DECLSPEC _STLP_CLASS_EXPORT_DECLSPEC 01099 # else 01100 # define _STLP_DECLSPEC _STLP_IMPORT_DECLSPEC /* Other modules, importing STLport exports */ 01101 # define _STLP_CLASS_DECLSPEC _STLP_CLASS_IMPORT_DECLSPEC 01102 # endif 01103 01104 #else /* Not using DLL export/import specifications */ 01105 01106 # define _STLP_DECLSPEC 01107 # define _STLP_CLASS_DECLSPEC 01108 01109 #endif 01110 01111 #define _STLP_EXPORT_TEMPLATE_CLASS _STLP_EXPORT template class _STLP_CLASS_DECLSPEC 01112 01113 #if defined (_STLP_MSVC) || defined (__ICL) 01114 # define _STLP_STATIC_MEMBER_DECLSPEC 01115 #else 01116 # define _STLP_STATIC_MEMBER_DECLSPEC _STLP_DECLSPEC 01117 #endif 01118 01119 #if !defined (_STLP_CALL) 01120 # define _STLP_CALL 01121 #endif 01122 01123 #ifndef _STLP_USE_NO_IOSTREAMS 01124 01125 # if defined (__DECCXX) && ! defined (__USE_STD_IOSTREAM) 01126 # define __USE_STD_IOSTREAM 01127 # endif 01128 01129 /* We only need to expose details of streams implementation 01130 if we use non-standard i/o or are building STLport*/ 01131 # if defined (__BUILDING_STLPORT) || defined (_STLP_NO_FORCE_INSTANTIATE) || !defined(_STLP_NO_CUSTOM_IO) 01132 # define _STLP_EXPOSE_STREAM_IMPLEMENTATION 1 01133 # endif 01134 01135 /* We only need to expose details of global implementation if we are building STLport 01136 or have not instantiated everything in the lib */ 01137 # if defined (__BUILDING_STLPORT) || defined (_STLP_NO_FORCE_INSTANTIATE) 01138 # undef _STLP_EXPOSE_GLOBALS_IMPLEMENTATION 01139 # define _STLP_EXPOSE_GLOBALS_IMPLEMENTATION 1 01140 # endif 01141 01142 #else /* _STLP_USE_NO_IOSTREAMS */ 01143 /* when we are not using SGI iostreams, we must expose globals, but not streams implementation */ 01144 # define _STLP_EXPOSE_GLOBALS_IMPLEMENTATION 01145 #endif /* _STLP_USE_NO_IOSTREAMS */ 01146 01147 #ifdef _STLP_PARTIAL_SPEC_NEEDS_TEMPLATE_ARGS 01148 # define _STLP_PSPEC2(t1,t2) < t1,t2 > 01149 # define _STLP_PSPEC3(t1,t2,t3) < t1,t2,t3 > 01150 #else 01151 # define _STLP_PSPEC2(t1,t2) /* nothing */ 01152 # define _STLP_PSPEC3(t1,t2,t3) /* nothing */ 01153 #endif 01154 01155 /* Activation of the partial template workaround: 01156 */ 01157 #if !defined(_STLP_DONT_USE_PARTIAL_SPEC_WRKD) &&\ 01158 (!defined(_STLP_CLASS_PARTIAL_SPECIALIZATION) || !defined(_STLP_FUNCTION_TMPL_PARTIAL_ORDER)) 01159 # define _STLP_USE_PARTIAL_SPEC_WORKAROUND 01160 #endif 01161 01162 #ifndef _STLP_USE_NO_IOSTREAMS 01163 # define _STLP_NEW_IO_NAMESPACE _STLP_STD 01164 # define _STLP_NO_WIDE_STREAMS _STLP_NO_WCHAR_T 01165 #endif 01166 01167 #ifdef _STLP_USE_SEPARATE_RELOPS_NAMESPACE 01168 # define _STLP_RELOPS_OPERATORS(_TMPL, _TP) \ 01169 _TMPL inline bool _STLP_CALL operator!=(const _TP& __x, const _TP& __y) {return !(__x == __y);}\ 01170 _TMPL inline bool _STLP_CALL operator>(const _TP& __x, const _TP& __y) {return __y < __x;}\ 01171 _TMPL inline bool _STLP_CALL operator<=(const _TP& __x, const _TP& __y) { return !(__y < __x);}\ 01172 _TMPL inline bool _STLP_CALL operator>=(const _TP& __x, const _TP& __y) { return !(__x < __y);} 01173 #else 01174 # define _STLP_RELOPS_OPERATORS(_TMPL, _TP) 01175 #endif 01176 01177 #if defined ( _STLP_USE_ABBREVS ) 01178 # include <stl/_abbrevs.h> 01179 #endif 01180 01181 /* A really useful macro */ 01182 #define _STLP_ARRAY_SIZE(A) sizeof(A) / sizeof(A[0]) 01183 #define _STLP_ARRAY_AND_SIZE(A) A, sizeof(A) / sizeof(A[0]) 01184 01185 /* some cleanup */ 01186 #undef _STLP_DONT_USE_BOOL_TYPEDEF 01187 #undef _STLP_YVALS_H 01188 #undef _STLP_LOOP_INLINE_PROBLEMS 01189 #undef _STLP_NEED_EXPLICIT 01190 #undef _STLP_NEED_TYPENAME 01191 #undef _STLP_NO_NEW_STYLE_CASTS 01192 #undef __AUTO_CONFIGURED 01193 01194 #endif /* _STLP_FEATURES_H */
Generated on Mon Mar 10 15:32:46 2008 by ![]() |