epoc32/include/tools/stlport/stl/config/features.h
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:33:34 +0100
branchSymbian3
changeset 4 837f303aceeb
permissions -rw-r--r--
Current Symbian^3 public API header files (from PDK 3.0.h)
This is the epoc32/include tree with the "platform" subtrees removed, and
all but a selected few mbg and rsg files removed.
     1  /*
     2   *
     3   * Copyright (c) 1994
     4   * Hewlett-Packard Company
     5   *
     6   * Copyright (c) 1996,1997
     7   * Silicon Graphics Computer Systems, Inc.
     8   *
     9   * Copyright (c) 1997
    10   * Moscow Center for SPARC Technology
    11   *
    12   * Copyright (c) 1999
    13   * Boris Fomitchev
    14   *
    15   * This material is provided "as is", with absolutely no warranty expressed
    16   * or implied. Any use is at your own risk.
    17   *
    18   * Permission to use or copy this software for any purpose is hereby granted
    19   * without fee, provided the above notices are retained on all copies.
    20   * Permission to modify the code and to distribute modified code is granted,
    21   * provided the above notices are retained, and a notice that the code was
    22   * modified is included with the above copyright notice.
    23   *
    24   */
    25 
    26 #ifndef _STLP_FEATURES_H
    27 #define _STLP_FEATURES_H
    28 
    29 /*
    30  * Purpose of this file:
    31  *
    32  * Defines all STLport settings.
    33  * This file is actually a wrapper : it includes compiler-specific
    34  * settings from <config/stlcomp.h>
    35  * and user-defined settings from <stl_user_config.h>.
    36  * See <config/stl_mycomp.h> and <stl_user_config.h> for the description
    37  * of those macros
    38  *
    39  */
    40 
    41 /* Definition of the STLport version informations */
    42 #include <stl/_stlport_version.h>
    43 
    44 /* Other macros defined by this file:
    45 
    46  * bool, true, and false, if _STLP_NO_BOOL is defined.
    47  * typename, as a null macro if it's not already a keyword.
    48  * explicit, as a null macro if it's not already a keyword.
    49  * namespace-related macros (_STLP_STD, _STLP_BEGIN_NAMESPACE, etc.)
    50  * exception-related macros (_STLP_TRY, _STLP_UNWIND, etc.)
    51  * _STLP_ASSERT, either as a test or as a null macro, depending on
    52    whether or not _STLP_ASSERTIONS is defined.
    53 */
    54 
    55 /* Definition of the 2 STLport debug levels */
    56 #define _STLP_STLPORT_DBG_LEVEL 1
    57 #define _STLP_STANDARD_DBG_LEVEL 2
    58 
    59 /* Placeholder for user to override settings.
    60  * It could be also used to mask settings from
    61  * different directories.
    62  */
    63 #include <stl/config/user_config.h>
    64 
    65 #if defined (_STLP_DEBUG) && !defined (_STLP_DEBUG_LEVEL)
    66 #  define _STLP_DEBUG_LEVEL _STLP_STLPORT_DBG_LEVEL
    67 #endif
    68 
    69 #if defined (__BUILDING_STLPORT)
    70 /* For the STLport implementation we can use everything:
    71  */
    72 #  if defined (_STLP_NO_ANACHRONISMS)
    73 #    undef _STLP_NO_ANACHRONISMS
    74 #  endif
    75 #  if defined (_STLP_NO_EXTENSIONS)
    76 #    undef _STLP_NO_EXTENSIONS
    77 #  endif
    78 /* Moreover there are things that has no sens:
    79  */
    80 #  if defined (_STLP_NO_IOSTREAMS)
    81 #    error If you do not use iostreams you do not need to build the STLport library.
    82 #  endif
    83 #endif
    84 
    85 /* ========================================================= */
    86 /* This file is used for compatibility; it accepts old-style config
    87    switches */
    88 #include <stl/config/compat.h>
    89 
    90 /* Common configuration file for this particular installation. */
    91 #include <stl/config/host.h>
    92 
    93 /* Operational Environment specific */
    94 #include <stl/config/_system.h>
    95 
    96 /* ========================================================= */
    97 
    98 /* some fixes to configuration. This also includes modifications
    99  * of STLport switches depending on compiler flags,
   100  * or settings applicable to a group of compilers, such as
   101  * to all who use EDG front-end.
   102  */
   103 #include <stl/config/stl_confix.h>
   104 
   105 #ifdef _STLP_USE_BOOST_SUPPORT
   106 /* We are going to use the boost library support. To limit the problem
   107  * of self referencing headers we have to specify clearly to the boost
   108  * library that the Standard lib is STLport:
   109  */
   110 #  ifndef BOOST_STDLIB_CONFIG
   111 #    define BOOST_STDLIB_CONFIG <boost/config/stdlib/stlport.hpp>
   112 #  endif
   113 #endif
   114 
   115 
   116 /*
   117  * Performs integrity check on user-specified parameters
   118  * and site-specific settings.
   119  */
   120 /*
   121 # include <stl/_check_config.h>
   122 */
   123 
   124 /* SGI terms */
   125 
   126 #if !defined (_STLP_NO_MEMBER_TEMPLATES) && !defined (_STLP_MEMBER_TEMPLATES)
   127 #  define _STLP_MEMBER_TEMPLATES 1
   128 #endif
   129 
   130 #if !defined (_STLP_NO_FRIEND_TEMPLATES) && !defined (_STLP_FRIEND_TEMPLATES)
   131 #  define _STLP_FRIEND_TEMPLATES 1
   132 #endif
   133 
   134 #if !defined (_STLP_NO_MEMBER_TEMPLATE_CLASSES) && !defined (_STLP_MEMBER_TEMPLATE_CLASSES)
   135 #  define _STLP_MEMBER_TEMPLATE_CLASSES 1
   136 #endif
   137 
   138 #if defined (_STLP_NO_MEMBER_TEMPLATE_CLASSES) && !defined (_STLP_DONT_SUPPORT_REBIND_MEMBER_TEMPLATE)
   139 #  define _STLP_DONT_SUPPORT_REBIND_MEMBER_TEMPLATE 1
   140 #endif
   141 
   142 #if !defined (_STLP_NO_CLASS_PARTIAL_SPECIALIZATION) && !defined (_STLP_CLASS_PARTIAL_SPECIALIZATION)
   143 #  define _STLP_CLASS_PARTIAL_SPECIALIZATION 1
   144 #endif
   145 
   146 #if !defined (_STLP_FUNCTION_TMPL_PARTIAL_ORDER) && !defined (_STLP_NO_FUNCTION_TMPL_PARTIAL_ORDER)
   147 #  define _STLP_FUNCTION_TMPL_PARTIAL_ORDER 1
   148 #endif
   149 
   150 #if !defined (_STLP_DONT_USE_SHORT_STRING_OPTIM) && !defined (_STLP_USE_SHORT_STRING_OPTIM)
   151 #  define _STLP_USE_SHORT_STRING_OPTIM 1
   152 #endif
   153 
   154 #if defined (_STLP_MEMBER_TEMPLATES) && !defined (_STLP_NO_EXTENSIONS) && \
   155    !defined (_STLP_NO_CONTAINERS_EXTENSION) && !defined (_STLP_USE_CONTAINERS_EXTENSION)
   156 #  define _STLP_USE_CONTAINERS_EXTENSION
   157 #endif
   158 
   159 #if defined (_STLP_USE_CONTAINERS_EXTENSION)
   160 #  define _STLP_TEMPLATE_FOR_CONT_EXT template <class _KT>
   161 #else
   162 #  define _STLP_TEMPLATE_FOR_CONT_EXT
   163 #endif
   164 
   165 #if defined (_STLP_USE_PTR_SPECIALIZATIONS) && \
   166     (defined (_STLP_NO_CLASS_PARTIAL_SPECIALIZATION) && defined (_STLP_DONT_SIMULATE_PARTIAL_SPEC_FOR_TYPE_TRAITS))
   167 #  error "Sorry but according the STLport settings your compiler can not support the pointer specialization feature."
   168 #endif
   169 
   170 #if defined (_STLP_NO_IOSTREAMS) && \
   171    !defined (_STLP_USE_NEWALLOC) && !defined (_STLP_USE_MALLOC)
   172 #  define _STLP_USE_NEWALLOC
   173 #endif
   174 
   175 #if !defined (_STLP_BIG_ENDIAN) && !defined (_STLP_LITTLE_ENDIAN)
   176 #  if defined (_MIPSEB) || defined (__sparc) || defined (_AIX) || \
   177       defined (__hpux) || defined (macintosh) || defined (_MAC)
   178 #    define _STLP_BIG_ENDIAN 1
   179 #  elif defined (__i386) || defined (_M_IX86) || defined (_M_ARM) || \
   180         defined (__amd64__) || defined (_M_AMD64) || defined (__x86_64__) || \
   181         defined (__alpha__)
   182 #    define _STLP_LITTLE_ENDIAN 1
   183 #  elif defined (__ia64__)
   184     /* itanium allows both settings (for instance via gcc -mbig-endian) - hence a seperate check is required */
   185 #    if defined (__BIG_ENDIAN__)
   186 #      define _STLP_BIG_ENDIAN 1
   187 #    else
   188 #      define _STLP_LITTLE_ENDIAN 1
   189 #    endif
   190 #  else
   191 #    error "can't determine endianess"
   192 #  endif
   193 #endif /* _STLP_BIG_ENDIAN */
   194 
   195 /* ==========================================================
   196  * final workaround tuning based on given flags
   197  * ========================================================== */
   198 
   199 #ifndef _STLP_UINT32_T
   200 #  define _STLP_UINT32_T unsigned long
   201 #endif
   202 #ifndef _STLP_ABORT
   203 #  define _STLP_ABORT() abort()
   204 #endif
   205 
   206 #if !defined (_STLP_HAS_NO_NAMESPACES)
   207 #  if defined _STLP_NO_NAMESPACES
   208 #    undef _STLP_USE_NAMESPACES
   209 #  else
   210 /* assume it as the default, turn it off later if NO_NAMESPACES selected */
   211 #    undef _STLP_USE_NAMESPACES
   212 #    define _STLP_USE_NAMESPACES 1
   213 #  endif
   214 #endif
   215 
   216 #if defined (_STLP_NO_IOSTREAMS)
   217 #  define _STLP_USE_NO_IOSTREAMS
   218 #endif
   219 
   220 /* Operating system recognition (basic) */
   221 #if defined (__unix) || defined (__linux__) || defined (__QNX__) || defined (_AIX)  || defined (__NetBSD__) || defined(__OpenBSD__) || defined (__Lynx__)
   222 #  define _STLP_UNIX 1
   223 #elif defined(macintosh) || defined (_MAC)
   224 #  define _STLP_MAC  1
   225 #elif defined (_WIN32) || defined (__WIN32) || defined (WIN32) || defined (__WIN32__)
   226 #  define _STLP_WIN32 1
   227 #elif defined (__WIN16) || defined (WIN16) || defined (_WIN16)
   228 #  define _STLP_WIN16
   229 #endif /* __unix */
   230 
   231 #if defined (_STLP_WIN16)
   232 #  define _STLP_LDOUBLE_80
   233 #elif defined(_STLP_WIN32)
   234 #  if defined (_STLP_MSVC) || defined (__ICL) || defined (__BORLANDC__) || defined (__CYGWIN__)
   235 #    define _STLP_LDOUBLE_64
   236 #  else
   237 #    define _STLP_LDOUBLE_96
   238 #  endif
   239 #elif defined (_STLP_UNIX)
   240 #  if defined (__CYGWIN__)
   241 #    define _STLP_LDOUBLE_96
   242 #  endif
   243 #endif
   244 
   245 #if !defined (_STLP_LDOUBLE_64) && !defined (_STLP_LDOUBLE_80) && !defined (_STLP_LDOUBLE_96) && !defined (_STLP_LDOUBLE_128)
   246 #  define _STLP_LDOUBLE_128
   247 #endif
   248 
   249 #if !defined (_STLP_NO_LONG_DOUBLE)
   250 #  define _STLP_LONGEST_FLOAT_TYPE long double
   251 #else
   252 #  define _STLP_LONGEST_FLOAT_TYPE double
   253 #endif
   254 
   255 /* Native headers access macros */
   256 #include <stl/config/_native_headers.h>
   257 
   258 /*  shared library tune-up */
   259 
   260 #if defined (__BUILDING_STLPORT)
   261 /*  if we are rebuilding right now, place everything here */
   262 #  undef  _STLP_DESIGNATED_DLL
   263 #  define _STLP_DESIGNATED_DLL 1
   264 #endif
   265 
   266 /* Use own namespace always if possible and not explicitly instructed otherwise */
   267 #if defined (_STLP_USE_NAMESPACES) && !defined (_STLP_BROKEN_USING_DIRECTIVE) && \
   268    !defined (_STLP_NO_OWN_NAMESPACE)
   269 #  undef  _STLP_USE_OWN_NAMESPACE
   270 #  define _STLP_USE_OWN_NAMESPACE  1
   271 #else
   272 #  undef _STLP_WHOLE_NATIVE_STD
   273 #endif
   274 
   275 #if !defined (_NOTHREADS) && !defined (_STLP_THREADS_DEFINED)
   276 
   277 #  if defined (_PTHREADS)
   278 #    define _STLP_PTHREADS
   279 #    define _STLP_THREADS
   280 #  endif
   281 #  if defined (_UITHREADS)
   282 #    define _STLP_UITHREADS
   283 #    define _STLP_THREADS
   284 #  endif
   285 
   286 #  if defined (__sgi) && !defined (__KCC) && !defined (__GNUC__)
   287 #    define _STLP_SGI_THREADS
   288 #  elif defined (__DECC) || defined (__DECCXX)
   289 #    define _STLP_DEC_THREADS
   290 #  elif defined (_STLP_WIN32) && !defined (_STLP_PTHREADS)
   291 #    define _STLP_WIN32THREADS 1
   292 #  elif ((defined (__sun) && !defined (__linux__)) || defined (_UITHREADS) ) && \
   293         !defined(_STLP_PTHREADS)
   294 #    define _STLP_UITHREADS
   295 #  elif defined (__OS2__)
   296 #    define _STLP_OS2THREADS
   297 #  elif defined (__BEOS__)
   298 #    define _STLP_BETHREADS
   299 #  elif defined (__MWERKS__) && defined (N_PLAT_NLM) /* (__dest_os == __netware_os) */
   300 #    define _STLP_NWTHREADS
   301 #  else
   302 #    define _STLP_PTHREADS
   303 #  endif /* __sgi */
   304 #  define _STLP_THREADS_DEFINED
   305 #endif
   306 
   307 #if (defined (_REENTRANT) || defined (_THREAD_SAFE) || \
   308     (defined (_POSIX_THREADS) && defined (__OpenBSD__))) && \
   309     !defined (_STLP_THREADS)
   310 #  define _STLP_THREADS
   311 #endif /* _REENTRANT */
   312 
   313 #if defined (__linux__) && defined (_STLP_PTHREADS)
   314 /* #  include <features.h> */
   315 
   316 #  if defined (__USE_XOPEN2K) && !defined (_STLP_DONT_USE_PTHREAD_SPINLOCK)
   317 #    define _STLP_USE_PTHREAD_SPINLOCK
   318 #    define _STLP_STATIC_MUTEX _STLP_mutex
   319 #  endif /* __USE_XOPEN2K */
   320 #endif /* __linux__ && _STLP_PTHREADS */
   321 
   322 #if defined (__OpenBSD__) && defined (_POSIX_THREADS) && !defined (_STLP_DONT_USE_PTHREAD_SPINLOCK)
   323 #  define _STLP_USE_PTHREAD_SPINLOCK
   324 #  define _STLP_STATIC_MUTEX _STLP_mutex
   325 #endif
   326 
   327 #ifndef _STLP_STATIC_MUTEX
   328 #  define _STLP_STATIC_MUTEX _STLP_mutex_base
   329 #endif
   330 
   331 #if (defined (_MFC_VER) || defined (_AFXDLL)) && !defined (_STLP_USE_MFC)
   332 #  define _STLP_USE_MFC 1
   333 #endif
   334 
   335 #if defined (_STLP_THREADS)
   336 #  define _STLP_VOLATILE volatile
   337 /* windows.h _MUST be included before bool definition ;( */
   338 #  if defined (_STLP_WIN32THREADS) && defined (_STLP_NO_BOOL)
   339 #    undef  NOMINMAX
   340 #    define NOMINMAX
   341 #    ifdef _STLP_USE_MFC
   342 #      include <afx.h>
   343 #    else
   344 #      include <windows.h>
   345 #    endif
   346 #    define _STLP_WINDOWS_H_INCLUDED
   347 #  endif
   348 #else
   349 #  define _STLP_VOLATILE
   350 #endif
   351 
   352 #if !defined (_STLP_USE_NEW_C_HEADERS) && !defined (_STLP_HAS_NO_NEW_C_HEADERS)
   353 #  define _STLP_USE_NEW_C_HEADERS
   354 #endif
   355 /* disable new-style headers if requested */
   356 #if defined (_STLP_NO_NEW_C_HEADERS)
   357 #  undef _STLP_USE_NEW_C_HEADERS
   358 #endif
   359 
   360 #if !defined (_STLP_STATIC_TEMPLATE_DATA)
   361 #  define _STLP_STATIC_TEMPLATE_DATA 1
   362 #endif
   363 
   364 #if defined (_STLP_BASE_TYPEDEF_BUG)
   365 #  undef  _STLP_BASE_TYPEDEF_OUTSIDE_BUG
   366 #  define _STLP_BASE_TYPEDEF_OUTSIDE_BUG 1
   367 #endif
   368 
   369 #if defined (_STLP_NESTED_TYPE_PARAM_BUG) || (defined (_STLP_MSVC) && (_STLP_MSVC < 1100))
   370 #  define _STLP_GLOBAL_NESTED_RETURN_TYPE_PARAM_BUG
   371 #endif
   372 
   373 /* SUNpro 4.2 inline string literal bug */
   374 #ifdef _STLP_INLINE_STRING_LITERAL_BUG
   375 #  define _STLP_FIX_LITERAL_BUG(__x) __x = __x;
   376 #else
   377 #  define _STLP_FIX_LITERAL_BUG(__x)
   378 #endif
   379 
   380 #if defined (_STLP_NON_TYPE_TMPL_PARAM_BUG)
   381 #  undef  _STLP_NO_DEFAULT_NON_TYPE_PARAM
   382 #  define _STLP_NO_DEFAULT_NON_TYPE_PARAM 1
   383 #endif
   384 
   385 #define _STLP_NEW new
   386 #define _STLP_PLACEMENT_NEW new
   387 
   388 #ifdef _STLP_DEBUG
   389 #  define _STLP_ASSERTIONS 1
   390 #endif
   391 
   392 #if !defined (_STLP_STATIC_ASSERT)
   393 /* Some compiler support 0 size array so we use negative size array to generate
   394  * a compilation time error.
   395  */
   396 #  define _STLP_STATIC_ASSERT(expr) typedef char __static_assert[expr ? 1 : -1];
   397 #endif
   398 
   399 /* apple mpw exception handling bug */
   400 #ifndef _STLP_MPWFIX_TRY
   401 #  define _STLP_MPWFIX_TRY
   402 #endif
   403 #ifndef _STLP_MPWFIX_CATCH
   404 #  define _STLP_MPWFIX_CATCH
   405 #endif
   406 #ifndef _STLP_MPWFIX_CATCH_ACTION
   407 #  define _STLP_MPWFIX_CATCH_ACTION(action)
   408 #endif
   409 
   410 /* if _STLP_DEBUG or _STLP_ASSERTIONS are set, stl/debug/_debug.h defines those */
   411 
   412 #if !defined (_STLP_ASSERTIONS) && !defined (_STLP_DEBUG) && !defined (_STLP_DEBUG_ALLOC)
   413 #  define _STLP_ASSERT(expr)
   414 #endif
   415 
   416 #if !defined (_STLP_DEBUG)
   417 #  define _STLP_VERBOSE_ASSERT(expr,diagnostic)
   418 #  define _STLP_DEBUG_CHECK(expr)
   419 #  define _STLP_DEBUG_DO(expr)
   420 #endif
   421 
   422 #if !defined (_STLP_WEAK)
   423 #  define _STLP_WEAK
   424 #endif
   425 
   426 /* default parameters as template types derived from arguments ( not always supported ) */
   427 #if defined (_STLP_LIMITED_DEFAULT_TEMPLATES)
   428 #  define _STLP_DFL_TMPL_PARAM( classname, defval ) class classname
   429 #else
   430 #  if !defined (_STLP_DEFAULT_TYPE_PARAM)
   431 #    define _STLP_DEFAULT_TYPE_PARAM 1
   432 #  endif
   433 #  define _STLP_DFL_TMPL_PARAM( classname, defval ) class classname = defval
   434 #endif
   435 
   436 /* default parameters as complete types */
   437 #if defined (_STLP_DEFAULT_TYPE_PARAM)
   438 #  define _STLP_DFL_TYPE_PARAM( classname, defval ) class classname = defval
   439 #  define _STLP_DFL_NON_TYPE_PARAM(type,name,val) type name = val
   440 #else
   441 #  define _STLP_DFL_TYPE_PARAM( classname, defval ) class classname
   442 #  define _STLP_DFL_NON_TYPE_PARAM(type,name,val) type name
   443 #endif
   444 
   445 /* SGI compatibility */
   446 
   447 #ifdef _STLP_NO_WCHAR_T
   448 #  ifndef _STLP_NO_NATIVE_WIDE_STREAMS
   449 #    define  _STLP_NO_NATIVE_WIDE_STREAMS 1
   450 #  endif
   451 #else
   452 #  define _STLP_HAS_WCHAR_T 1
   453 #endif
   454 
   455 #if !defined (_STLP_NO_AT_MEMBER_FUNCTION)
   456 #  define _STLP_CAN_THROW_RANGE_ERRORS 1
   457 #endif
   458 
   459 #if !defined (_STLP_USE_RAW_SGI_ALLOCATORS)
   460 #  define _STLP_DEFAULT_ALLOCATOR(_Tp) allocator< _Tp >
   461 #  define _STLP_DEFAULT_ALLOCATOR_SELECT( _Tp ) _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >)
   462 #  define _STLP_DEFAULT_PAIR_ALLOCATOR(_Key, _Tp) allocator< pair < _Key, _Tp > >
   463 #  if defined (_STLP_LIMITED_DEFAULT_TEMPLATES)
   464 #    define _STLP_DEFAULT_PAIR_ALLOCATOR_SELECT(_Key, _Tp ) class _Alloc
   465 #    define _STLP_USE_WRAPPER_FOR_ALLOC_PARAM 1
   466 #  else
   467 #    define _STLP_DEFAULT_PAIR_ALLOCATOR_SELECT(_Key, _Tp ) \
   468             class _Alloc = allocator< pair < _Key, _Tp > >
   469 #  endif
   470 #else
   471 #  define _STLP_DEFAULT_ALLOCATOR( _Tp ) __sgi_alloc
   472 #  define _STLP_DEFAULT_ALLOCATOR_SELECT( _Tp ) _STLP_DFL_TYPE_PARAM(_Alloc,__sgi_alloc)
   473 #  define _STLP_DEFAULT_PAIR_ALLOCATOR( _Key, _Tp ) __sgi_alloc
   474 #  define _STLP_DEFAULT_PAIR_ALLOCATOR_SELECT(_Key, _Tp ) _STLP_DFL_TYPE_PARAM(_Alloc,__sgi_alloc)
   475 #  if defined (_STLP_LIMITED_DEFAULT_TEMPLATES) && !defined (_STLP_DEFAULT_TYPE_PARAM)
   476 #    define _STLP_USE_WRAPPER_FOR_ALLOC_PARAM 1
   477 #  endif
   478 #endif
   479 
   480 /* debug mode tool */
   481 #if defined (_STLP_DEBUG)
   482 #  define _STLP_NON_DBG_NAME(X) _NonDbg_##X
   483 #endif
   484 
   485 /* pointer specialization tool */
   486 #if defined (_STLP_USE_PTR_SPECIALIZATIONS)
   487 #  define _STLP_PTR_IMPL_NAME(X) _Impl_##X
   488 #endif
   489 
   490 #if defined (_STLP_USE_MSVC6_MEM_T_BUG_WORKAROUND)
   491 #  define _STLP_NO_MEM_T_NAME(X) _NoMemT_##X
   492 #  if defined (_STLP_DEBUG)
   493 #    define _STLP_NON_DBG_NO_MEM_T_NAME(X) _NonDbg_NoMemT_##X
   494 #  endif
   495 #endif
   496 
   497 /* this always mean the C library is in global namespace */
   498 #if defined (_STLP_HAS_NO_NEW_C_HEADERS) && !defined (_STLP_VENDOR_GLOBAL_CSTD)
   499 #  define _STLP_VENDOR_GLOBAL_CSTD 1
   500 #endif
   501 
   502 /* Depending of whether compiler supports namespaces,
   503  * tune the parameters for vendor-supplied libraries.
   504  * This section is guarded by _STLP_HAS_NO_NAMESPACES, not by _STLP_USE_NAMESPACES,
   505  * since it depends only on the native features, not on user's preference whether
   506  * to use namespace for STLport or not.
   507  */
   508 #if !defined (_STLP_HAS_NO_NAMESPACES)
   509 /* Import some vendor's headers into corresponding STLport ones if they might be needed
   510  * (if we wrap native iostreams and use namepace other than std::) */
   511 #  if defined (_STLP_WHOLE_NATIVE_STD)
   512 #    define  _STLP_IMPORT_VENDOR_STD 1
   513 #    undef   _STLP_MINIMUM_IMPORT_STD
   514 #  endif
   515 
   516 /* if using stlport:: namespace or if C library stuff is not in vendor's std::,
   517  * try importing 'em.
   518  * MSVC has ambiguity problem when we try to import C-style std:: stuff back into global namespace */
   519 #  if defined (_STLP_USE_NAMESPACES) && (defined(_STLP_USE_OWN_NAMESPACE) || defined (_STLP_VENDOR_GLOBAL_CSTD))
   520 #    define  _STLP_IMPORT_VENDOR_CSTD 1
   521 #  endif
   522 
   523 #  if defined (_STLP_NO_USING_FOR_GLOBAL_FUNCTIONS) && !defined (_STLP_DO_IMPORT_CSTD_FUNCTIONS)
   524 #    define _STLP_NO_CSTD_FUNCTION_IMPORTS
   525 #  endif
   526 
   527 #  define _STLP_USING_NAMESPACE(x) using namespace x ;
   528 
   529 namespace std { }
   530 namespace __std_alias = std;
   531 
   532 /* assume std:: namespace for C++ std library if not being told otherwise */
   533 #  if defined (_STLP_VENDOR_GLOBAL_STD)
   534 #    define _STLP_VENDOR_STD
   535 #  else
   536 #    define _STLP_VENDOR_STD __std_alias
   537 #  endif
   538 
   539 /* tune things that come from C library */
   540 #  if  defined (_STLP_VENDOR_GLOBAL_CSTD) || !defined(_STLP_USE_NEW_C_HEADERS)
   541 /*  in old-style headers, C functions go to global scope. */
   542 #    define _STLP_VENDOR_CSTD
   543 #    define _STLP_USING_VENDOR_CSTD
   544 #  else
   545 #    define _STLP_VENDOR_CSTD  _STLP_VENDOR_STD
   546 #    define _STLP_USING_VENDOR_CSTD _STLP_USING_NAMESPACE(_STLP_VENDOR_CSTD)
   547 #  endif /* _STLP_VENDOR_CSTD */
   548 /* exception, typeinfo, new - always come from the vendor */
   549 #  if !defined (_STLP_VENDOR_EXCEPT_STD)
   550 #    if defined (_STLP_VENDOR_GLOBAL_EXCEPT_STD)
   551 #      define _STLP_VENDOR_EXCEPT_STD
   552 #    else
   553 #      define _STLP_VENDOR_EXCEPT_STD _STLP_VENDOR_STD
   554 #    endif
   555 #  endif
   556 #  define _STLP_OLD_IO_NAMESPACE
   557 #  if !defined (_STLP_VENDOR_MB_NAMESPACE)
   558 #    define _STLP_VENDOR_MB_NAMESPACE _STLP_VENDOR_CSTD
   559 #  endif
   560 #else
   561 /* compiler has no namespace support */
   562 #  define _STLP_VENDOR_STD
   563 #  define _STLP_VENDOR_CSTD
   564 #  define _STLP_USING_NAMESPACE(x)
   565 #  define _STLP_USING_VENDOR_CSTD
   566 #  define _STLP_VENDOR_EXCEPT_STD
   567 #endif
   568 
   569 #if defined (_STLP_USE_NAMESPACES)
   570 
   571 #  if defined (_STLP_USE_OWN_NAMESPACE)
   572 #    if !defined (_STLP_STD_NAME)
   573 #      if !defined (_STLP_DEBUG)
   574 #        if !defined (_STLP_USING_CROSS_NATIVE_RUNTIME_LIB)
   575 #          ifndef _STLP_THREADS
   576 #            define _STLP_STD_NAME  stlpmtx_std
   577 #          else
   578 #            define _STLP_STD_NAME  stlp_std
   579 #          endif
   580 #        else
   581 #          ifndef _STLP_THREADS
   582 #            define _STLP_STD_NAME  stlpxmtx_std
   583 #          else
   584 #            define _STLP_STD_NAME  stlpx_std
   585 #          endif
   586 #        endif
   587 #      else
   588 /*
   589  * The STLport debug mode is binary incompatible with the other modes,
   590  * lets make it clear on the STLport namespace to generate link errors rather
   591  * than runtime.
   592  */
   593 #        if !defined (_STLP_USING_CROSS_NATIVE_RUNTIME_LIB)
   594 #          ifndef _STLP_THREADS
   595 #            define _STLP_STD_NAME  stlpdmtx_std
   596 #          else
   597 #            define _STLP_STD_NAME  stlpd_std
   598 #          endif
   599 #        else
   600 #          ifndef _STLP_THREADS
   601 #            define _STLP_STD_NAME  stlpdxmtx_std
   602 #          else
   603 #            define _STLP_STD_NAME  stlpdx_std
   604 #          endif
   605 #        endif
   606 #      endif
   607 #    endif
   608 namespace _STLP_STD_NAME { }
   609 #  else
   610 #    if defined (_STLP_DEBUG)
   611 namespace stdD = std;
   612 #    endif
   613 #    define _STLP_STD_NAME std
   614 #  endif /* _STLP_USE_OWN_NAMESPACE */
   615 
   616 #  if !defined (_STLP_USING_NAMESPACE_BUG)
   617 #    define _STLP_PRIV_NAME stlp_priv
   618 namespace _STLP_PRIV_NAME {
   619   using namespace _STLP_STD_NAME;
   620 }
   621 #  else
   622 #    define _STLP_PRIV_NAME priv
   623 #  endif
   624 
   625 #  define _STLP_BEGIN_NAMESPACE namespace _STLP_STD_NAME {
   626 #  define _STLP_END_NAMESPACE }
   627 
   628 #  if !defined (_STLP_DONT_USE_PRIV_NAMESPACE)
   629 #    if !defined (_STLP_USING_NAMESPACE_BUG)
   630 /* We prefer to make private namespace a totaly seperated namespace...
   631  */
   632 #      define _STLP_PRIV ::_STLP_PRIV_NAME::
   633 #      define _STLP_MOVE_TO_PRIV_NAMESPACE } namespace _STLP_PRIV_NAME {
   634 #      define _STLP_MOVE_TO_STD_NAMESPACE } namespace _STLP_STD_NAME {
   635 #    else
   636 /* but sometimes we can't:
   637  */
   638 #      define _STLP_PRIV _STLP_PRIV_NAME::
   639 #      define _STLP_MOVE_TO_PRIV_NAMESPACE namespace _STLP_PRIV_NAME {
   640 #      define _STLP_MOVE_TO_STD_NAMESPACE }
   641 #    endif
   642 #  else
   643 #    define _STLP_PRIV
   644 #    define _STLP_MOVE_TO_PRIV_NAMESPACE
   645 #    define _STLP_MOVE_TO_STD_NAMESPACE
   646 #  endif
   647 
   648 /* decide whether or not we use separate namespace for rel ops */
   649 #  if defined (_STLP_NO_RELOPS_NAMESPACE)
   650 #    define _STLP_BEGIN_RELOPS_NAMESPACE _STLP_BEGIN_NAMESPACE namespace rel_ops {}
   651 #    define _STLP_END_RELOPS_NAMESPACE }
   652 #  else
   653 /* Use std::rel_ops namespace */
   654 #    define _STLP_BEGIN_RELOPS_NAMESPACE _STLP_BEGIN_NAMESPACE namespace rel_ops {
   655 #    define _STLP_END_RELOPS_NAMESPACE } }
   656 #    define _STLP_USE_SEPARATE_RELOPS_NAMESPACE
   657 #  endif /* Use std::rel_ops namespace */
   658 
   659 #  define _STLP_STD ::_STLP_STD_NAME
   660 
   661 /* Official STLport namespace when std is not redefined.
   662  * Here we don't use a macro as stlport is used as file name by boost
   663  * and folder name under beos:
   664  */
   665 namespace stlport = _STLP_STD_NAME;
   666 
   667 /* Backward compatibility:
   668  */
   669 namespace _STL = _STLP_STD_NAME;
   670 #undef __STLPORT_NAMESPACE
   671 #define __STLPORT_NAMESPACE _STLP_STD_NAME
   672 
   673 #else /* _STLP_USE_NAMESPACES */
   674 /* STLport is being put into global namespace */
   675 #  define _STLP_STD
   676 #  define _STLP_PRIV
   677 #  define _STLP_BEGIN_NAMESPACE
   678 #  define _STLP_END_NAMESPACE
   679 #  define _STLP_MOVE_TO_PRIV_NAMESPACE
   680 #  define _STLP_MOVE_TO_STD_NAMESPACE
   681 
   682 /* boris : it was found out that _STLP_USE_SEPARATE_RELOPS_NAMESPACE
   683    causes less problems than having relational operator templates in global namespace
   684    Please define _STLP_NO_RELOPS_NAMESPACE in stl_user_config.h if your code rely on them. */
   685 #  if !defined (_STLP_NO_RELOPS_NAMESPACE)
   686 #    define _STLP_USE_SEPARATE_RELOPS_NAMESPACE
   687 #  endif
   688 #  define _STLP_BEGIN_RELOPS_NAMESPACE
   689 #  define _STLP_END_RELOPS_NAMESPACE
   690 #  undef  _STLP_USE_OWN_NAMESPACE
   691 #endif  /* _STLP_USE_NAMESPACES */
   692 
   693 #define STLPORT_CSTD _STLP_VENDOR_CSTD
   694 #define STLPORT      _STLP_STD_NAME
   695 
   696 #if defined(_STLP_BOGUS_TEMPLATE_TYPE_MATCHING_BUG)
   697 #  define _STLP_SIMPLE_TYPE(T) _stl_trivial_proxy<T>
   698 #else
   699 #  define _STLP_SIMPLE_TYPE(T) T
   700 #endif
   701 
   702 #ifndef _STLP_RAND48
   703 #  define _STLP_NO_DRAND48
   704 #endif
   705 
   706 /* advanced keywords usage */
   707 #define __C_CAST(__x, __y) ((__x)(__y))
   708 #ifndef  _STLP_NO_NEW_STYLE_CASTS
   709 #  define __CONST_CAST(__x,__y) const_cast<__x>(__y)
   710 #  define __STATIC_CAST(__x,__y) static_cast<__x>(__y)
   711 #  define __REINTERPRET_CAST(__x,__y) reinterpret_cast<__x>(__y)
   712 #  define __DYNAMIC_CAST(__x,__y) dynamic_cast<__x>(__y)
   713 #else
   714 #  define __STATIC_CAST(__x,__y) __C_CAST(__x, __y)
   715 #  define __CONST_CAST(__x,__y) __C_CAST(__x, __y)
   716 #  define __REINTERPRET_CAST(__x,__y) __C_CAST(__x, __y)
   717 #  define __DYNAMIC_CAST(__x,__y) __C_CAST(__x, __y)
   718 #endif
   719 
   720 #if defined (_STLP_NEED_TYPENAME) && ! defined (typename)
   721 #  define typename
   722 #endif
   723 
   724 #if defined (_STLP_NEED_TYPENAME) || defined (_STLP_NO_TYPENAME_ON_RETURN_TYPE )
   725 #  define _STLP_TYPENAME_ON_RETURN_TYPE
   726 #else
   727 #  define _STLP_TYPENAME_ON_RETURN_TYPE typename
   728 #endif
   729 
   730 #ifdef _STLP_NO_TYPENAME_IN_TEMPLATE_HEADER
   731 #  define _STLP_HEADER_TYPENAME
   732 #else
   733 #  define _STLP_HEADER_TYPENAME typename
   734 #endif
   735 
   736 #ifndef _STLP_NO_MEMBER_TEMPLATE_KEYWORD
   737 #  define _STLP_TEMPLATE template
   738 #else
   739 #  define _STLP_TEMPLATE
   740 #endif
   741 
   742 #if defined (_STLP_USE_CONTAINERS_EXTENSION)
   743 #  define _STLP_KEY_TYPE_FOR_CONT_EXT(type)
   744 #  define _STLP_TEMPLATE_FOR_CONT_EXT template <class _KT>
   745 #else
   746 #  define _STLP_KEY_TYPE_FOR_CONT_EXT(type) typedef type _KT;
   747 #  define _STLP_TEMPLATE_FOR_CONT_EXT
   748 #endif
   749 
   750 #if defined (_STLP_NEED_EXPLICIT) && !defined (explicit)
   751 #  define explicit
   752 #endif
   753 
   754 #if !defined (_STLP_NEED_MUTABLE)
   755 #  define _STLP_ASSIGN_MUTABLE(type,x,y) x = y
   756 #else
   757 #  define _STLP_ASSIGN_MUTABLE(type,x,y) __CONST_CAST(type,x)=y
   758 #  define mutable
   759 #endif
   760 
   761 #if defined (_STLP_NO_SIGNED_BUILTINS)
   762 /* old HP-UX doesn't understand "signed" keyword */
   763 #  define signed
   764 #endif
   765 
   766 #if defined (_STLP_LOOP_INLINE_PROBLEMS)
   767 #  define _STLP_INLINE_LOOP
   768 #else
   769 #  define _STLP_INLINE_LOOP inline
   770 #endif
   771 
   772 #define _STLP_PRIVATE public
   773 
   774 #ifndef _STLP_NO_PARTIAL_SPECIALIZATION_SYNTAX
   775 #  define _STLP_TEMPLATE_NULL template<>
   776 #else
   777 #  define _STLP_TEMPLATE_NULL
   778 #endif
   779 
   780 #ifdef _STLP_FUNCTION_TMPL_PARTIAL_ORDER
   781 #  define _STLP_OPERATOR_TEMPLATE
   782 #else
   783 #  define _STLP_OPERATOR_TEMPLATE _STLP_TEMPLATE_NULL
   784 #endif
   785 
   786 #ifndef _STLP_CLASS_PARTIAL_SPECIALIZATION
   787 /* unless we have other compiler problem, try simulating partial spec here */
   788 #  if !defined (_STLP_DONT_SIMULATE_PARTIAL_SPEC_FOR_TYPE_TRAITS)
   789 #    define _STLP_SIMULATE_PARTIAL_SPEC_FOR_TYPE_TRAITS
   790 #  endif
   791 /* For your own iterators, please use inheritance from iterator<> instead of these obsolete queries. */
   792 #  if  (defined (_STLP_NESTED_TYPE_PARAM_BUG) || !defined (_STLP_SIMULATE_PARTIAL_SPEC_FOR_TYPE_TRAITS))
   793 #    if ! defined ( _STLP_USE_OLD_HP_ITERATOR_QUERIES )
   794 #      define _STLP_USE_OLD_HP_ITERATOR_QUERIES
   795 #    endif
   796 #  elif defined ( _STLP_NO_ANACHRONISMS )
   797 #    undef _STLP_USE_OLD_HP_ITERATOR_QUERIES
   798 #  endif
   799 #endif
   800 
   801 #ifndef _STLP_NO_EXPLICIT_FUNCTION_TMPL_ARGS
   802 #  define _STLP_NULL_TMPL_ARGS <>
   803 # else
   804 #  define _STLP_NULL_TMPL_ARGS
   805 #endif
   806 
   807 #if !defined (_STLP_ALLOCATOR_TYPE_DFL)
   808 #  if defined (_STLP_DONT_SUP_DFLT_PARAM)
   809 #    define _STLP_NEEDS_EXTRA_TEMPLATE_CONSTRUCTORS
   810 #  endif
   811 #  if defined (_STLP_NEEDS_EXTRA_TEMPLATE_CONSTRUCTORS)
   812 #    define _STLP_ALLOCATOR_TYPE_DFL
   813 #  else
   814 #    define _STLP_ALLOCATOR_TYPE_DFL = allocator_type()
   815 #  endif
   816 #endif
   817 
   818 /* When the compiler do not correctly initialized the basic types value in default parameters we prefer
   819  * to avoid them to be able to correct this bug.
   820  */
   821 #if defined (_STLP_DEF_CONST_DEF_PARAM_BUG)
   822 #  define _STLP_DONT_SUP_DFLT_PARAM 1
   823 #endif
   824 
   825 #if defined (__SGI_STL_NO_ARROW_OPERATOR) && ! defined (_STLP_NO_ARROW_OPERATOR)
   826 #  define _STLP_NO_ARROW_OPERATOR
   827 #endif
   828 
   829 #if !defined (_STLP_CLASS_PARTIAL_SPECIALIZATION)
   830 #  if !(defined (_STLP_NO_ARROW_OPERATOR)) && \
   831        !defined (_STLP_NO_MSVC50_COMPATIBILITY) && !defined (_STLP_MSVC50_COMPATIBILITY)
   832 /* this one is needed for proper reverse_iterator<> operator ->() handling */
   833 #    define _STLP_MSVC50_COMPATIBILITY 1
   834 #  endif
   835 #endif
   836 
   837 #if defined ( _STLP_CLASS_PARTIAL_SPECIALIZATION )
   838 #  if (defined(__IBMCPP__) && (500 <= __IBMCPP__) && (__IBMCPP__ < 600) )
   839 #    define _STLP_DECLARE_REVERSE_ITERATORS(__reverse_iterator) \
   840    typedef typename _STLP_STD :: reverse_iterator<const_iterator> const_reverse_iterator; \
   841    typedef typename _STLP_STD :: reverse_iterator<iterator> reverse_iterator
   842 #  elif (defined (__sgi) && ! defined (__GNUC__)) || defined (__SUNPRO_CC) || defined (__xlC__)
   843 #    define _STLP_DECLARE_REVERSE_ITERATORS(__reverse_iterator) \
   844    typedef _STLP_STD:: _STLP_TEMPLATE reverse_iterator<const_iterator> const_reverse_iterator; \
   845    typedef _STLP_STD:: _STLP_TEMPLATE reverse_iterator<iterator> reverse_iterator
   846 #  else
   847 #    define _STLP_DECLARE_REVERSE_ITERATORS(__reverse_iterator) \
   848    typedef _STLP_STD::reverse_iterator<const_iterator> const_reverse_iterator; \
   849    typedef _STLP_STD::reverse_iterator<iterator> reverse_iterator
   850 #  endif
   851 #else /* _STLP_CLASS_PARTIAL_SPECIALIZATION */
   852 #  if defined (_STLP_MSVC50_COMPATIBILITY)
   853 #    define _STLP_DECLARE_REVERSE_ITERATORS(__reverse_iterator) \
   854   typedef _STLP_STD::__reverse_iterator<const_iterator, value_type, const_reference, \
   855     const_pointer, difference_type>  const_reverse_iterator; \
   856   typedef _STLP_STD::__reverse_iterator<iterator, value_type, reference, pointer, difference_type> \
   857     reverse_iterator
   858 #  else
   859 #    define _STLP_DECLARE_REVERSE_ITERATORS(__reverse_iterator) \
   860   typedef _STLP_STD::__reverse_iterator<const_iterator, value_type, const_reference, \
   861     difference_type>  const_reverse_iterator; \
   862   typedef _STLP_STD::__reverse_iterator<iterator, value_type, \
   863     reference, difference_type> \
   864     reverse_iterator
   865 #  endif
   866 #endif /* _STLP_CLASS_PARTIAL_SPECIALIZATION */
   867 
   868 #define _STLP_DECLARE_BIDIRECTIONAL_REVERSE_ITERATORS \
   869         _STLP_DECLARE_REVERSE_ITERATORS(reverse_bidirectional_iterator)
   870 #define _STLP_DECLARE_RANDOM_ACCESS_REVERSE_ITERATORS \
   871         _STLP_DECLARE_REVERSE_ITERATORS(reverse_iterator)
   872 
   873 #define __IMPORT_CONTAINER_TYPEDEFS(_Super)                              \
   874     typedef typename _Super::value_type value_type;                      \
   875     typedef typename _Super::size_type size_type;                        \
   876     typedef typename _Super::difference_type difference_type;            \
   877     typedef typename _Super::reference reference;                        \
   878     typedef typename _Super::const_reference const_reference;            \
   879     typedef typename _Super::pointer pointer;                            \
   880     typedef typename _Super::const_pointer const_pointer;                \
   881     typedef typename _Super::allocator_type allocator_type;
   882 
   883 
   884 #define __IMPORT_ITERATORS(_Super)                                       \
   885     typedef typename _Super::iterator iterator;                          \
   886     typedef typename _Super::const_iterator const_iterator;
   887 
   888 #define __IMPORT_REVERSE_ITERATORS(_Super)                                   \
   889     typedef typename _Super::const_reverse_iterator  const_reverse_iterator; \
   890     typedef typename _Super::reverse_iterator reverse_iterator;
   891 
   892 #define  __IMPORT_SUPER_COPY_ASSIGNMENT(__derived_name, _Self, _SUPER)       \
   893     __derived_name(const _Super& __x) : _SUPER(__x) {}                       \
   894     _Self& operator=(const _Super& __x) {                                    \
   895         *(_Super*)this = __x;                                                \
   896         return *this;                                                        \
   897     }                                                                        \
   898     __derived_name(const _Self& __x) : _SUPER(__x) {}                        \
   899     _Self& operator=(const _Self& __x) {                                     \
   900         *(_Super*)this = __x;                                                \
   901         return *this;                                                        \
   902     }
   903 
   904 #define __IMPORT_WITH_ITERATORS(_Super) \
   905   __IMPORT_CONTAINER_TYPEDEFS(_Super) __IMPORT_ITERATORS(_Super)
   906 
   907 #define __IMPORT_WITH_REVERSE_ITERATORS(_Super) \
   908   __IMPORT_WITH_ITERATORS(_Super) __IMPORT_REVERSE_ITERATORS(_Super)
   909 
   910 #if defined (_STLP_TRIVIAL_CONSTRUCTOR_BUG)
   911 #  define __TRIVIAL_CONSTRUCTOR(__type) __type() {}
   912 #else
   913 #  define __TRIVIAL_CONSTRUCTOR(__type)
   914 #endif
   915 
   916 #if defined (_STLP_TRIVIAL_DESTRUCTOR_BUG)
   917 #  define __TRIVIAL_DESTRUCTOR(__type) ~__type() {}
   918 #else
   919 #  define __TRIVIAL_DESTRUCTOR(__type)
   920 #endif
   921 
   922 #define __TRIVIAL_STUFF(__type)  \
   923   __TRIVIAL_CONSTRUCTOR(__type) __TRIVIAL_DESTRUCTOR(__type)
   924 
   925 #if defined (_STLP_HAS_NO_EXCEPTIONS)
   926 #  define _STLP_NO_EXCEPTIONS
   927 #endif
   928 
   929 #if !defined (_STLP_DONT_USE_EXCEPTIONS) && !defined (_STLP_NO_EXCEPTIONS) && !defined (_STLP_USE_EXCEPTIONS)
   930 #  define _STLP_USE_EXCEPTIONS
   931 #endif
   932 
   933 #if defined (_STLP_USE_EXCEPTIONS)
   934 #  define _STLP_TRY try
   935 #  define _STLP_CATCH_ALL catch(...)
   936 #  ifndef _STLP_THROW
   937 #    define _STLP_THROW(x) throw x
   938 #  endif
   939 #  define _STLP_RETHROW throw
   940 
   941 #  define _STLP_UNWIND(action) catch(...) { action; throw; }
   942 
   943 #  ifdef _STLP_THROW_RETURN_BUG
   944 #    define _STLP_RET_AFTER_THROW(data) return data;
   945 #  else
   946 #    define _STLP_RET_AFTER_THROW(data)
   947 #  endif
   948 
   949 /* We do not use exception throw specifications unless we are forced to */
   950 #  if !defined (_STLP_THROWS)
   951 #    define _STLP_THROWS(x)
   952 #  endif
   953 #  if !defined (_STLP_NOTHROW)
   954 #    define _STLP_NOTHROW
   955 #  endif
   956 #else
   957 #  define _STLP_TRY
   958 #  define _STLP_CATCH_ALL if (false)
   959 #  ifndef _STLP_THROW
   960 #    define _STLP_THROW(x)
   961 #  endif
   962 #  define _STLP_RETHROW {}
   963 #  define _STLP_UNWIND(action)
   964 #  define _STLP_THROWS(x)
   965 #  define _STLP_NOTHROW
   966 #  define _STLP_RET_AFTER_THROW(data)
   967 #endif
   968 
   969 /*
   970  * Here we check _STLP_NO_EXCEPTIONS which means that the compiler has no
   971  * exception support but not the _STLP_USE_EXCEPTIONS which simply means
   972  * that the user do not want to use them.
   973  */
   974 #if !defined (_STLP_NO_EXCEPTIONS) && !defined (_STLP_NO_EXCEPTION_SPEC)
   975 #  define _STLP_THROWS_INHERENTLY(x) throw x
   976 #  define _STLP_NOTHROW_INHERENTLY throw()
   977 #else
   978 #  define _STLP_THROWS_INHERENTLY(x)
   979 #  define _STLP_NOTHROW_INHERENTLY
   980 #endif
   981 
   982 /* STLport function not returning are functions that throw so we translate
   983  * the noreturn functions in throwing functions taking also into account
   984  * exception support activation.
   985  */
   986 #if defined (_STLP_NORETURN_FUNCTION) && !defined (_STLP_NO_EXCEPTIONS) && \
   987    !defined (_STLP_FUNCTION_THROWS)
   988 #  define _STLP_FUNCTION_THROWS _STLP_NORETURN_FUNCTION
   989 #else
   990 #  define _STLP_FUNCTION_THROWS
   991 #endif
   992 
   993 #if defined(_STLP_NO_BOOL)
   994 #  if (defined (__IBMCPP__) && (__IBMCPP__ < 400)) && ! defined (_AIX)
   995 #    include <isynonym.hpp>
   996 #    if defined (__OS400__)
   997 typedef int bool;
   998 #    elif !( defined (__xlC__) || defined (_AIX))
   999 typedef Boolean bool;
  1000 #    endif
  1001 #  else
  1002 #    if defined(_STLP_YVALS_H)
  1003 #      include <yvals.h>
  1004 #    else
  1005 #      if defined (_STLP_DONT_USE_BOOL_TYPEDEF)
  1006 #        define bool int
  1007 #      else
  1008 typedef int bool;
  1009 #      endif
  1010 #      define true 1
  1011 #      define false 0
  1012 #    endif
  1013 #  endif /* __IBMCPP__ */
  1014 #else
  1015 #  define _STLP_BOOL_KEYWORD 1
  1016 #endif /* _STLP_NO_BOOL */
  1017 
  1018 #ifndef _STLP_MPW_EXTRA_CONST
  1019 #  define _STLP_MPW_EXTRA_CONST
  1020 #endif
  1021 
  1022 #ifndef _STLP_DEFAULTCHAR
  1023 #  define _STLP_DEFAULTCHAR char
  1024 #endif
  1025 
  1026 #if defined (_STLP_DEBUG_ALLOC) && !defined (_STLP_ASSERTIONS)
  1027 #  define _STLP_ASSERTIONS 1
  1028 #endif
  1029 
  1030 /* uninitialized value filler */
  1031 #ifndef _STLP_SHRED_BYTE
  1032 /* This value is designed to cause problems if an error occurs */
  1033 #  define _STLP_SHRED_BYTE 0xA3
  1034 #endif /* _STLP_SHRED_BYTE */
  1035 
  1036 /* shared library tune-up */
  1037 #ifndef _STLP_IMPORT_DECLSPEC
  1038 #  define _STLP_IMPORT_DECLSPEC
  1039 #endif
  1040 
  1041 /* a keyword used to instantiate export template */
  1042 #ifndef _STLP_EXPORT_TEMPLATE_KEYWORD
  1043 #  define _STLP_EXPORT_TEMPLATE_KEYWORD
  1044 #endif
  1045 #ifndef _STLP_IMPORT_TEMPLATE_KEYWORD
  1046 #  define _STLP_IMPORT_TEMPLATE_KEYWORD
  1047 #endif
  1048 
  1049 #ifdef _STLP_USE_NO_IOSTREAMS
  1050 /*
  1051  * If we do not use iostreams we do not use the export/import
  1052  * techniques to avoid build of the STLport library.
  1053  */
  1054 #  undef _STLP_USE_DECLSPEC
  1055 /* We also undef USE_DYNAMIC_LIB macro as this macro add some code
  1056  * to use the dynamic (shared) STLport library for some platform/compiler
  1057  * configuration leading to problem when do not link to the STLport lib.
  1058  */
  1059 #  undef _STLP_USE_DYNAMIC_LIB
  1060 #endif
  1061 
  1062 #if  defined (_STLP_DLLEXPORT_NEEDS_PREDECLARATION) && defined (_STLP_USE_DECLSPEC)
  1063 #  if ! defined (_STLP_USE_TEMPLATE_EXPORT)
  1064 /* this setting turns on "extern template" extension use */
  1065 #    define _STLP_USE_TEMPLATE_EXPORT
  1066 #  endif
  1067 #  if defined (_STLP_DESIGNATED_DLL) && ! defined (_STLP_NO_FORCE_INSTANTIATE)
  1068 #    define _STLP_NO_FORCE_INSTANTIATE
  1069 #  endif
  1070 #endif
  1071 
  1072 #if defined (_STLP_DESIGNATED_DLL) /* This is a lib which will contain STLport exports */
  1073 #  define  _STLP_EXPORT _STLP_EXPORT_TEMPLATE_KEYWORD
  1074 #else
  1075 #  define  _STLP_EXPORT _STLP_IMPORT_TEMPLATE_KEYWORD
  1076 #endif
  1077 
  1078 #ifndef _STLP_EXPORT_TEMPLATE
  1079 #  define  _STLP_EXPORT_TEMPLATE _STLP_EXPORT template
  1080 #endif
  1081 
  1082 #if defined (_STLP_USE_DECLSPEC) /* using export/import technique */
  1083 
  1084 #  ifndef _STLP_EXPORT_DECLSPEC
  1085 #    define _STLP_EXPORT_DECLSPEC
  1086 #  endif
  1087 #  ifndef _STLP_IMPORT_DECLSPEC
  1088 #    define _STLP_IMPORT_DECLSPEC
  1089 #  endif
  1090 #  ifndef _STLP_CLASS_EXPORT_DECLSPEC
  1091 #    define _STLP_CLASS_EXPORT_DECLSPEC
  1092 #  endif
  1093 #  ifndef _STLP_CLASS_IMPORT_DECLSPEC
  1094 #    define _STLP_CLASS_IMPORT_DECLSPEC
  1095 #  endif
  1096 #  if defined (_STLP_DESIGNATED_DLL) /* This is a lib which will contain STLport exports */
  1097 #    define  _STLP_DECLSPEC        _STLP_EXPORT_DECLSPEC
  1098 #    define  _STLP_CLASS_DECLSPEC  _STLP_CLASS_EXPORT_DECLSPEC
  1099 #  else
  1100 #    define  _STLP_DECLSPEC        _STLP_IMPORT_DECLSPEC   /* Other modules, importing STLport exports */
  1101 #    define  _STLP_CLASS_DECLSPEC  _STLP_CLASS_IMPORT_DECLSPEC
  1102 #  endif
  1103 
  1104 #else /* Not using DLL export/import specifications */
  1105 
  1106 #  define _STLP_DECLSPEC
  1107 #  define _STLP_CLASS_DECLSPEC
  1108 
  1109 #endif
  1110 
  1111 #define _STLP_EXPORT_TEMPLATE_CLASS _STLP_EXPORT template class _STLP_CLASS_DECLSPEC
  1112 
  1113 #if defined (_STLP_MSVC) || defined (__ICL)
  1114 #  define _STLP_STATIC_MEMBER_DECLSPEC
  1115 #else
  1116 #  define _STLP_STATIC_MEMBER_DECLSPEC _STLP_DECLSPEC
  1117 #endif
  1118 
  1119 #if !defined (_STLP_CALL)
  1120 #  define _STLP_CALL
  1121 #endif
  1122 
  1123 #ifndef _STLP_USE_NO_IOSTREAMS
  1124 
  1125 #  if defined (__DECCXX) && ! defined (__USE_STD_IOSTREAM)
  1126 #    define __USE_STD_IOSTREAM
  1127 #  endif
  1128 
  1129 /* We only need to expose details of streams implementation
  1130    if we use non-standard i/o or are building STLport*/
  1131 #  if defined (__BUILDING_STLPORT) || defined (_STLP_NO_FORCE_INSTANTIATE) || !defined(_STLP_NO_CUSTOM_IO)
  1132 #    define _STLP_EXPOSE_STREAM_IMPLEMENTATION 1
  1133 #  endif
  1134 
  1135 /* We only need to expose details of global implementation if we are building STLport
  1136    or have not instantiated everything in the lib */
  1137 #  if defined (__BUILDING_STLPORT) || defined (_STLP_NO_FORCE_INSTANTIATE)
  1138 #    undef  _STLP_EXPOSE_GLOBALS_IMPLEMENTATION
  1139 #    define _STLP_EXPOSE_GLOBALS_IMPLEMENTATION 1
  1140 #  endif
  1141 
  1142 #else /* _STLP_USE_NO_IOSTREAMS */
  1143 /* when we are not using SGI iostreams, we must expose globals, but not streams implementation */
  1144 #  define _STLP_EXPOSE_GLOBALS_IMPLEMENTATION
  1145 #endif /* _STLP_USE_NO_IOSTREAMS */
  1146 
  1147 #ifdef _STLP_PARTIAL_SPEC_NEEDS_TEMPLATE_ARGS
  1148 #  define _STLP_PSPEC2(t1,t2) < t1,t2 >
  1149 #  define _STLP_PSPEC3(t1,t2,t3) < t1,t2,t3 >
  1150 #else
  1151 #  define _STLP_PSPEC2(t1,t2)  /* nothing */
  1152 #  define _STLP_PSPEC3(t1,t2,t3)  /* nothing */
  1153 #endif
  1154 
  1155 /* Activation of the partial template workaround:
  1156  */
  1157 #if !defined(_STLP_DONT_USE_PARTIAL_SPEC_WRKD) &&\
  1158    (!defined(_STLP_CLASS_PARTIAL_SPECIALIZATION) || !defined(_STLP_FUNCTION_TMPL_PARTIAL_ORDER))
  1159 #  define _STLP_USE_PARTIAL_SPEC_WORKAROUND
  1160 #endif
  1161 
  1162 #ifndef _STLP_USE_NO_IOSTREAMS
  1163 #  define _STLP_NEW_IO_NAMESPACE _STLP_STD
  1164 #  define _STLP_NO_WIDE_STREAMS  _STLP_NO_WCHAR_T
  1165 #endif
  1166 
  1167 #ifdef _STLP_USE_SEPARATE_RELOPS_NAMESPACE
  1168 #  define _STLP_RELOPS_OPERATORS(_TMPL, _TP) \
  1169 _TMPL inline bool _STLP_CALL operator!=(const _TP& __x, const _TP& __y) {return !(__x == __y);}\
  1170 _TMPL inline bool _STLP_CALL operator>(const _TP& __x, const _TP& __y)  {return __y < __x;}\
  1171 _TMPL inline bool _STLP_CALL operator<=(const _TP& __x, const _TP& __y) { return !(__y < __x);}\
  1172 _TMPL inline bool _STLP_CALL operator>=(const _TP& __x, const _TP& __y) { return !(__x < __y);}
  1173 #else
  1174 #  define _STLP_RELOPS_OPERATORS(_TMPL, _TP)
  1175 #endif
  1176 
  1177 #if defined ( _STLP_USE_ABBREVS )
  1178 #  include <stl/_abbrevs.h>
  1179 #endif
  1180 
  1181 /* A really useful macro */
  1182 #define _STLP_ARRAY_SIZE(A) sizeof(A) / sizeof(A[0])
  1183 #define _STLP_ARRAY_AND_SIZE(A) A, sizeof(A) / sizeof(A[0])
  1184 
  1185 /* some cleanup */
  1186 #undef _STLP_DONT_USE_BOOL_TYPEDEF
  1187 #undef _STLP_YVALS_H
  1188 #undef _STLP_LOOP_INLINE_PROBLEMS
  1189 #undef _STLP_NEED_EXPLICIT
  1190 #undef _STLP_NEED_TYPENAME
  1191 #undef _STLP_NO_NEW_STYLE_CASTS
  1192 #undef __AUTO_CONFIGURED
  1193 
  1194 #endif /* _STLP_FEATURES_H */