19720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block /*
29720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  *
39720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  * Copyright (c) 1994
49720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  * Hewlett-Packard Company
59720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  *
69720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  * Copyright (c) 1996,1997
79720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  * Silicon Graphics Computer Systems, Inc.
89720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  *
99720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  * Copyright (c) 1997
109720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  * Moscow Center for SPARC Technology
119720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  *
129720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  * Copyright (c) 1999
139720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  * Boris Fomitchev
149720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  *
159720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  * This material is provided "as is", with absolutely no warranty expressed
169720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  * or implied. Any use is at your own risk.
179720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  *
189720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  * Permission to use or copy this software for any purpose is hereby granted
199720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  * without fee, provided the above notices are retained on all copies.
209720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  * Permission to modify the code and to distribute modified code is granted,
219720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  * provided the above notices are retained, and a notice that the code was
229720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  * modified is included with the above copyright notice.
239720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  *
249720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  */
259720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
269720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#ifndef _STLP_FEATURES_H
279720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#define _STLP_FEATURES_H
289720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
299720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block/*
309720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block * Purpose of this file:
319720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block *
329720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block * Defines all STLport settings.
339720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block * This file is actually a wrapper : it includes compiler-specific
349720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block * settings from <config/stlcomp.h>
359720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block * and user-defined settings from <config/user_config.h>.
369720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block * See <config/stl_mycomp.h> and <config/user_config.h> for the description
379720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block * of those macros
389720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block *
399720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block */
409720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
419720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block/* Definition of the STLport version informations */
429720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#include <stl/_stlport_version.h>
439720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
449720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block/* Other macros defined by this file:
459720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
469720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block * bool, true, and false, if _STLP_NO_BOOL is defined.
479720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block * typename, as a null macro if it's not already a keyword.
489720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block * explicit, as a null macro if it's not already a keyword.
499720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block * namespace-related macros (_STLP_STD, _STLP_BEGIN_NAMESPACE, etc.)
509720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block * exception-related macros (_STLP_TRY, _STLP_UNWIND, etc.)
519720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block * _STLP_ASSERT, either as a test or as a null macro, depending on
529720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block   whether or not _STLP_ASSERTIONS is defined.
539720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block*/
549720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
559720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block/* Definition of the 2 STLport debug levels */
569720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#define _STLP_STLPORT_DBG_LEVEL 1
579720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#define _STLP_STANDARD_DBG_LEVEL 2
589720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
599720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block/* Placeholder for user to override settings.
609720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block * It could be also used to mask settings from
619720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block * different directories.
629720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block */
639720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#include <stl/config/user_config.h>
649720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
65a721beb6d7372334152406a36e8db016650a9691Tareq A. Siraj#ifdef __GNUC__
66a721beb6d7372334152406a36e8db016650a9691Tareq A. Siraj#  define _STLP_UNUSED(x) x __attribute__((unused))
67a721beb6d7372334152406a36e8db016650a9691Tareq A. Siraj#else
68a721beb6d7372334152406a36e8db016650a9691Tareq A. Siraj#  define _STLP_UNUSED(x) x
69a721beb6d7372334152406a36e8db016650a9691Tareq A. Siraj#endif /* __GNUC__ */
70a721beb6d7372334152406a36e8db016650a9691Tareq A. Siraj
719720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#if defined (_STLP_DEBUG) && !defined (_STLP_DEBUG_LEVEL)
729720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define _STLP_DEBUG_LEVEL _STLP_STLPORT_DBG_LEVEL
739720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif
749720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
759720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#if defined (__BUILDING_STLPORT)
769720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block/* For the STLport implementation we can use everything:
779720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block */
789720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  if defined (_STLP_NO_ANACHRONISMS)
799720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#    undef _STLP_NO_ANACHRONISMS
809720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  endif
819720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  if defined (_STLP_NO_EXTENSIONS)
829720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#    undef _STLP_NO_EXTENSIONS
839720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  endif
84e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott/* Moreover there are things that have no sens:
859720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block */
869720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  if defined (_STLP_NO_IOSTREAMS)
879720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#    error If you do not use iostreams you do not need to build the STLport library.
889720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  endif
899720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif
909720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
919720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block/* ========================================================= */
929720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block/* This file is used for compatibility; it accepts old-style config
939720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block   switches */
949720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#include <stl/config/compat.h>
959720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
969720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block/* Common configuration file for this particular installation. */
979720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#include <stl/config/host.h>
989720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
999720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block/* Operational Environment specific */
1009720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#include <stl/config/_system.h>
1019720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
1029720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block/* ========================================================= */
1039720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
1049720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block/* some fixes to configuration. This also includes modifications
1059720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block * of STLport switches depending on compiler flags,
1069720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block * or settings applicable to a group of compilers, such as
1079720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block * to all who use EDG front-end.
1089720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block */
1099720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#include <stl/config/stl_confix.h>
1109720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
1119720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#if !defined (_STLP_NO_MEMBER_TEMPLATES) && !defined (_STLP_MEMBER_TEMPLATES)
1129720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define _STLP_MEMBER_TEMPLATES 1
1139720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif
1149720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
1159720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#if !defined (_STLP_NO_MEMBER_TEMPLATE_CLASSES) && !defined (_STLP_MEMBER_TEMPLATE_CLASSES)
1169720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define _STLP_MEMBER_TEMPLATE_CLASSES 1
1179720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif
1189720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
1199720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#if defined (_STLP_NO_MEMBER_TEMPLATE_CLASSES) && !defined (_STLP_DONT_SUPPORT_REBIND_MEMBER_TEMPLATE)
1209720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define _STLP_DONT_SUPPORT_REBIND_MEMBER_TEMPLATE 1
1219720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif
1229720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
1239720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#if !defined (_STLP_NO_CLASS_PARTIAL_SPECIALIZATION) && !defined (_STLP_CLASS_PARTIAL_SPECIALIZATION)
1249720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define _STLP_CLASS_PARTIAL_SPECIALIZATION 1
1259720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif
1269720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
1279720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#if !defined (_STLP_FUNCTION_TMPL_PARTIAL_ORDER) && !defined (_STLP_NO_FUNCTION_TMPL_PARTIAL_ORDER)
1289720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define _STLP_FUNCTION_TMPL_PARTIAL_ORDER 1
1299720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif
1309720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
1319720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#if !defined (_STLP_DONT_USE_SHORT_STRING_OPTIM) && !defined (_STLP_USE_SHORT_STRING_OPTIM)
1329720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define _STLP_USE_SHORT_STRING_OPTIM 1
1339720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif
1349720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
1359720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#if defined (_STLP_MEMBER_TEMPLATES) && !defined (_STLP_NO_EXTENSIONS) && \
1369720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block   !defined (_STLP_NO_CONTAINERS_EXTENSION) && !defined (_STLP_USE_CONTAINERS_EXTENSION)
1379720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define _STLP_USE_CONTAINERS_EXTENSION
1389720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif
1399720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
1409720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#if defined (_STLP_USE_CONTAINERS_EXTENSION)
1419720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define _STLP_TEMPLATE_FOR_CONT_EXT template <class _KT>
1429720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#else
1439720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define _STLP_TEMPLATE_FOR_CONT_EXT
1449720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif
1459720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
1469720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#if defined (_STLP_USE_PTR_SPECIALIZATIONS) && \
1479720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block    (defined (_STLP_NO_CLASS_PARTIAL_SPECIALIZATION) && defined (_STLP_DONT_SIMULATE_PARTIAL_SPEC_FOR_TYPE_TRAITS))
148e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott#  error Sorry but according the STLport settings your compiler can not support the pointer specialization feature.
149e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott#endif
150e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott
151e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott#if defined (_STLP_WHOLE_NATIVE_STD) && defined (_STLP_NO_OWN_NAMESPACE)
152e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott#  error Sorry but asking for both STLport to be in the real std namespace and also having STLport import all native std stuff \
153e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott  is invalid, chose one or none.
154e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott#endif
155e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott
156e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott#if defined (_STLP_VERBOSE) && !defined (_STLP_VERBOSE_MODE_SUPPORTED)
157e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott#  error Sorry but the verbose mode is not implemented for your compiler.
1589720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif
1599720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
1609720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#if defined (_STLP_NO_IOSTREAMS) && \
1619720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block   !defined (_STLP_USE_NEWALLOC) && !defined (_STLP_USE_MALLOC)
1629720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define _STLP_USE_NEWALLOC
1639720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif
1649720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
1659720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#if !defined (_STLP_BIG_ENDIAN) && !defined (_STLP_LITTLE_ENDIAN)
1669720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  if defined (_MIPSEB) || defined (__sparc) || defined (_AIX) || \
1679720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block      defined (__hpux) || defined (macintosh) || defined (_MAC)
1689720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#    define _STLP_BIG_ENDIAN 1
1699720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  elif defined (__i386) || defined (_M_IX86) || defined (_M_ARM) || \
1709720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block        defined (__amd64__) || defined (_M_AMD64) || defined (__x86_64__) || \
17189f07d6a92dab765c534266a640933ebd2f6d9e4Chris Dearman        defined (__alpha__) || defined (_MIPSEL)
1729720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#    define _STLP_LITTLE_ENDIAN 1
1739720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  elif defined (__ia64__)
1749720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block    /* itanium allows both settings (for instance via gcc -mbig-endian) - hence a seperate check is required */
1759720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#    if defined (__BIG_ENDIAN__)
1769720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#      define _STLP_BIG_ENDIAN 1
1779720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#    else
1789720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#      define _STLP_LITTLE_ENDIAN 1
1799720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#    endif
1809720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  else
1819720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#    error "can't determine endianess"
1829720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  endif
1839720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif /* _STLP_BIG_ENDIAN */
1849720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
1859720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block/* ==========================================================
1869720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block * final workaround tuning based on given flags
1879720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block * ========================================================== */
1889720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
1899720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#ifndef _STLP_UINT32_T
1909720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define _STLP_UINT32_T unsigned long
1919720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif
1929720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#ifndef _STLP_ABORT
1939720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define _STLP_ABORT() abort()
1949720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif
1959720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
1969720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#if !defined (_STLP_HAS_NO_NAMESPACES)
1979720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  if defined _STLP_NO_NAMESPACES
1989720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#    undef _STLP_USE_NAMESPACES
1999720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  else
2009720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block/* assume it as the default, turn it off later if NO_NAMESPACES selected */
2019720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#    undef _STLP_USE_NAMESPACES
2029720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#    define _STLP_USE_NAMESPACES 1
2039720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  endif
2049720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif
2059720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
2069720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#if defined (_STLP_NO_IOSTREAMS)
2079720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define _STLP_USE_NO_IOSTREAMS
2089720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif
2099720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
2109720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block/* Operating system recognition (basic) */
211e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott#if (defined(__unix) || defined(__linux__) || defined(__QNX__) || defined(_AIX)  || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__Lynx__) || defined(__hpux) || defined(__sgi)) && \
212e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott     !defined (_STLP_UNIX)
2139720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define _STLP_UNIX 1
2149720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif /* __unix */
2159720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
2169720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#if !defined (_STLP_NO_LONG_DOUBLE)
2179720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define _STLP_LONGEST_FLOAT_TYPE long double
2189720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#else
2199720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define _STLP_LONGEST_FLOAT_TYPE double
2209720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif
2219720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
2229720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block/* Native headers access macros */
223e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott#if !defined (_STLP_HAS_INCLUDE_NEXT)
224e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott#  include <stl/config/_native_headers.h>
225e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott#endif
2269720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
2279720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block/*  shared library tune-up */
2289720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
2299720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#if defined (__BUILDING_STLPORT)
2309720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block/*  if we are rebuilding right now, place everything here */
2319720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  undef  _STLP_DESIGNATED_DLL
2329720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define _STLP_DESIGNATED_DLL 1
2339720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif
2349720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
2359720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block/* Use own namespace always if possible and not explicitly instructed otherwise */
2369720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#if defined (_STLP_USE_NAMESPACES) && !defined (_STLP_BROKEN_USING_DIRECTIVE) && \
2379720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block   !defined (_STLP_NO_OWN_NAMESPACE)
2389720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  undef  _STLP_USE_OWN_NAMESPACE
2399720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define _STLP_USE_OWN_NAMESPACE  1
2409720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#else
2419720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  undef _STLP_WHOLE_NATIVE_STD
2429720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif
2439720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
2449720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#if !defined (_NOTHREADS) && !defined (_STLP_THREADS_DEFINED)
2459720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
2469720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  if defined (_PTHREADS)
2479720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#    define _STLP_PTHREADS
2489720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#    define _STLP_THREADS
2499720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  endif
2509720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  if defined (_UITHREADS)
2519720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#    define _STLP_UITHREADS
2529720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#    define _STLP_THREADS
2539720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  endif
2549720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
255e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott#  if defined (_STLP_WIN32) && !defined (_STLP_PTHREADS)
2569720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#    define _STLP_WIN32THREADS 1
2579720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  elif ((defined (__sun) && !defined (__linux__)) || defined (_UITHREADS) ) && \
2589720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block        !defined(_STLP_PTHREADS)
2599720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#    define _STLP_UITHREADS
2609720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  else
2619720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#    define _STLP_PTHREADS
2629720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  endif /* __sgi */
2639720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define _STLP_THREADS_DEFINED
2649720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif
2659720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
266e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott#if (defined (_REENTRANT) || defined (_THREAD_SAFE)) && !defined (_STLP_THREADS)
2679720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define _STLP_THREADS
2689720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif
2699720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
2709720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#ifndef _STLP_STATIC_MUTEX
2719720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define _STLP_STATIC_MUTEX _STLP_mutex_base
2729720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif
2739720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
2749720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#if (defined (_MFC_VER) || defined (_AFXDLL)) && !defined (_STLP_USE_MFC)
2759720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define _STLP_USE_MFC 1
2769720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif
2779720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
2789720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#if defined (_STLP_THREADS)
2799720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define _STLP_VOLATILE volatile
2809720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#else
2819720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define _STLP_VOLATILE
2829720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif
2839720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
2849720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#if !defined (_STLP_USE_NEW_C_HEADERS) && !defined (_STLP_HAS_NO_NEW_C_HEADERS)
2859720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define _STLP_USE_NEW_C_HEADERS
2869720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif
2879720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block/* disable new-style headers if requested */
2889720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#if defined (_STLP_NO_NEW_C_HEADERS)
2899720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  undef _STLP_USE_NEW_C_HEADERS
2909720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif
2919720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
2929720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#if defined (_STLP_BASE_TYPEDEF_BUG)
2939720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  undef  _STLP_BASE_TYPEDEF_OUTSIDE_BUG
2949720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define _STLP_BASE_TYPEDEF_OUTSIDE_BUG 1
2959720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif
2969720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
297e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott#if defined (_STLP_NESTED_TYPE_PARAM_BUG)
2989720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define _STLP_GLOBAL_NESTED_RETURN_TYPE_PARAM_BUG
2999720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif
3009720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
3019720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block/* SUNpro 4.2 inline string literal bug */
3029720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#ifdef _STLP_INLINE_STRING_LITERAL_BUG
3039720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define _STLP_FIX_LITERAL_BUG(__x) __x = __x;
3049720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#else
3059720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define _STLP_FIX_LITERAL_BUG(__x)
3069720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif
3079720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
3089720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#if defined (_STLP_NON_TYPE_TMPL_PARAM_BUG)
3099720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  undef  _STLP_NO_DEFAULT_NON_TYPE_PARAM
3109720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define _STLP_NO_DEFAULT_NON_TYPE_PARAM 1
3119720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif
3129720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
3139720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#if !defined (_STLP_STATIC_ASSERT)
3149720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block/* Some compiler support 0 size array so we use negative size array to generate
3159720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block * a compilation time error.
3169720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block */
3170e7a705cd6f755153c1f2cceb09af1e515ca9f1dMark Salyzyn#  define _STLP_STATIC_ASSERT(expr) typedef char __static_assert[expr ? 1 : -1] __attribute__((__unused__));
3189720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif
3199720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
3209720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block/* apple mpw exception handling bug */
3219720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#ifndef _STLP_MPWFIX_TRY
3229720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define _STLP_MPWFIX_TRY
3239720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif
3249720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#ifndef _STLP_MPWFIX_CATCH
3259720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define _STLP_MPWFIX_CATCH
3269720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif
3279720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#ifndef _STLP_MPWFIX_CATCH_ACTION
3289720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define _STLP_MPWFIX_CATCH_ACTION(action)
3299720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif
3309720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
3319720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#if !defined (_STLP_WEAK)
3329720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define _STLP_WEAK
3339720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif
3349720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
3359720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block/* default parameters as template types derived from arguments ( not always supported ) */
3369720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#if defined (_STLP_LIMITED_DEFAULT_TEMPLATES)
3379720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define _STLP_DFL_TMPL_PARAM( classname, defval ) class classname
3389720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#else
3399720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  if !defined (_STLP_DEFAULT_TYPE_PARAM)
3409720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#    define _STLP_DEFAULT_TYPE_PARAM 1
3419720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  endif
3429720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define _STLP_DFL_TMPL_PARAM( classname, defval ) class classname = defval
3439720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif
3449720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
345e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott#if defined (_STLP_LIMITED_DEFAULT_TEMPLATES)
346e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott#  define _STLP_DEFAULT_PAIR_ALLOCATOR_SELECT(_Key, _Tp ) class _Alloc
347e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott#else
348e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott#  define _STLP_DEFAULT_PAIR_ALLOCATOR_SELECT(_Key, _Tp ) \
349e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott            class _Alloc = allocator< pair < _Key, _Tp > >
350e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott#endif
351e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott
3529720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block/* default parameters as complete types */
3539720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#if defined (_STLP_DEFAULT_TYPE_PARAM)
3549720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define _STLP_DFL_TYPE_PARAM( classname, defval ) class classname = defval
3559720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define _STLP_DFL_NON_TYPE_PARAM(type,name,val) type name = val
3569720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#else
3579720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define _STLP_DFL_TYPE_PARAM( classname, defval ) class classname
3589720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define _STLP_DFL_NON_TYPE_PARAM(type,name,val) type name
3599720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif
3609720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
3619720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block/* SGI compatibility */
3629720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
3639720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#ifdef _STLP_NO_WCHAR_T
3649720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  ifndef _STLP_NO_NATIVE_WIDE_STREAMS
3659720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#    define  _STLP_NO_NATIVE_WIDE_STREAMS 1
3669720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  endif
3679720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#else
3689720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define _STLP_HAS_WCHAR_T 1
3699720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif
3709720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
3719720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#if !defined (_STLP_NO_AT_MEMBER_FUNCTION)
3729720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define _STLP_CAN_THROW_RANGE_ERRORS 1
3739720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif
3749720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
3759720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block/* debug mode tool */
3769720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#if defined (_STLP_DEBUG)
3779720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define _STLP_NON_DBG_NAME(X) _NonDbg_##X
3789720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif
3799720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
3809720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block/* pointer specialization tool */
3819720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#if defined (_STLP_USE_PTR_SPECIALIZATIONS)
3829720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define _STLP_PTR_IMPL_NAME(X) _Impl_##X
3839720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif
3849720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
385e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott#if defined (_STLP_USE_MSVC6_MEM_T_BUG_WORKAROUND) || \
386e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott    defined (_STLP_SIGNAL_RUNTIME_COMPATIBILITY) || defined (_STLP_CHECK_RUNTIME_COMPATIBILITY)
3879720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define _STLP_NO_MEM_T_NAME(X) _NoMemT_##X
3889720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif
3899720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
3909720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block/* this always mean the C library is in global namespace */
3919720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#if defined (_STLP_HAS_NO_NEW_C_HEADERS) && !defined (_STLP_VENDOR_GLOBAL_CSTD)
3929720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define _STLP_VENDOR_GLOBAL_CSTD 1
3939720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif
3949720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
3959720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block/* Depending of whether compiler supports namespaces,
3969720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block * tune the parameters for vendor-supplied libraries.
3979720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block * This section is guarded by _STLP_HAS_NO_NAMESPACES, not by _STLP_USE_NAMESPACES,
3989720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block * since it depends only on the native features, not on user's preference whether
3999720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block * to use namespace for STLport or not.
4009720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block */
4019720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#if !defined (_STLP_HAS_NO_NAMESPACES)
4029720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block/* Import some vendor's headers into corresponding STLport ones if they might be needed
4039720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block * (if we wrap native iostreams and use namepace other than std::) */
4049720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  if defined (_STLP_WHOLE_NATIVE_STD)
4059720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#    define  _STLP_IMPORT_VENDOR_STD 1
4069720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  endif
4079720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
4089720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block/* if using stlport:: namespace or if C library stuff is not in vendor's std::,
4099720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block * try importing 'em.
4109720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block * MSVC has ambiguity problem when we try to import C-style std:: stuff back into global namespace */
4119720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  if defined (_STLP_USE_NAMESPACES) && (defined(_STLP_USE_OWN_NAMESPACE) || defined (_STLP_VENDOR_GLOBAL_CSTD))
4129720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#    define  _STLP_IMPORT_VENDOR_CSTD 1
4139720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  endif
4149720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
4159720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  if defined (_STLP_NO_USING_FOR_GLOBAL_FUNCTIONS) && !defined (_STLP_DO_IMPORT_CSTD_FUNCTIONS)
4169720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#    define _STLP_NO_CSTD_FUNCTION_IMPORTS
4179720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  endif
4189720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
4199720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define _STLP_USING_NAMESPACE(x) using namespace x ;
4209720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
4219720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blocknamespace std { }
4229720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blocknamespace __std_alias = std;
4239720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
4249720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block/* assume std:: namespace for C++ std library if not being told otherwise */
4259720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  if defined (_STLP_VENDOR_GLOBAL_STD)
4269720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#    define _STLP_VENDOR_STD
4279720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  else
428e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott#    define _STLP_VENDOR_STD std
4299720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  endif
4309720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
4319720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block/* tune things that come from C library */
4329720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  if  defined (_STLP_VENDOR_GLOBAL_CSTD) || !defined(_STLP_USE_NEW_C_HEADERS)
4339720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block/*  in old-style headers, C functions go to global scope. */
4349720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#    define _STLP_VENDOR_CSTD
4359720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#    define _STLP_USING_VENDOR_CSTD
4369720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  else
4379720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#    define _STLP_VENDOR_CSTD  _STLP_VENDOR_STD
4389720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#    define _STLP_USING_VENDOR_CSTD _STLP_USING_NAMESPACE(_STLP_VENDOR_CSTD)
4399720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  endif /* _STLP_VENDOR_CSTD */
4409720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block/* exception, typeinfo, new - always come from the vendor */
4419720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  if !defined (_STLP_VENDOR_EXCEPT_STD)
4429720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#    if defined (_STLP_VENDOR_GLOBAL_EXCEPT_STD)
4439720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#      define _STLP_VENDOR_EXCEPT_STD
4449720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#    else
4459720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#      define _STLP_VENDOR_EXCEPT_STD _STLP_VENDOR_STD
4469720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#    endif
4479720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  endif
4489720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define _STLP_OLD_IO_NAMESPACE
4499720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  if !defined (_STLP_VENDOR_MB_NAMESPACE)
4509720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#    define _STLP_VENDOR_MB_NAMESPACE _STLP_VENDOR_CSTD
4519720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  endif
4529720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#else
4539720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block/* compiler has no namespace support */
4549720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define _STLP_VENDOR_STD
4559720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define _STLP_VENDOR_CSTD
4569720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define _STLP_USING_NAMESPACE(x)
4579720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define _STLP_USING_VENDOR_CSTD
4589720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define _STLP_VENDOR_EXCEPT_STD
4599720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif
4609720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
4619720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#if defined (_STLP_USE_NAMESPACES)
4629720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
4639720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  if defined (_STLP_USE_OWN_NAMESPACE)
4649720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#    if !defined (_STLP_STD_NAME)
4659720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#      if !defined (_STLP_DEBUG)
4669720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#        if !defined (_STLP_USING_CROSS_NATIVE_RUNTIME_LIB)
4679720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#          ifndef _STLP_THREADS
4689720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#            define _STLP_STD_NAME  stlpmtx_std
4699720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#          else
4709720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#            define _STLP_STD_NAME  stlp_std
4719720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#          endif
4729720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#        else
4739720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#          ifndef _STLP_THREADS
4749720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#            define _STLP_STD_NAME  stlpxmtx_std
4759720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#          else
4769720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#            define _STLP_STD_NAME  stlpx_std
4779720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#          endif
4789720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#        endif
4799720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#      else
4809720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block/*
4819720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block * The STLport debug mode is binary incompatible with the other modes,
4829720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block * lets make it clear on the STLport namespace to generate link errors rather
483e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott * than runtime ones.
4849720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block */
4859720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#        if !defined (_STLP_USING_CROSS_NATIVE_RUNTIME_LIB)
4869720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#          ifndef _STLP_THREADS
4879720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#            define _STLP_STD_NAME  stlpdmtx_std
4889720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#          else
4899720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#            define _STLP_STD_NAME  stlpd_std
4909720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#          endif
4919720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#        else
4929720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#          ifndef _STLP_THREADS
4939720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#            define _STLP_STD_NAME  stlpdxmtx_std
4949720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#          else
4959720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#            define _STLP_STD_NAME  stlpdx_std
4969720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#          endif
4979720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#        endif
4989720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#      endif
4999720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#    endif
5009720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blocknamespace _STLP_STD_NAME { }
5019720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  else
5029720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#    define _STLP_STD_NAME std
5039720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  endif /* _STLP_USE_OWN_NAMESPACE */
5049720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
5059720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define _STLP_BEGIN_NAMESPACE namespace _STLP_STD_NAME {
506e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott#  define _STLP_BEGIN_TR1_NAMESPACE namespace tr1 {
5079720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define _STLP_END_NAMESPACE }
5089720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
5099720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block/* decide whether or not we use separate namespace for rel ops */
5109720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  if defined (_STLP_NO_RELOPS_NAMESPACE)
5119720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#    define _STLP_BEGIN_RELOPS_NAMESPACE _STLP_BEGIN_NAMESPACE namespace rel_ops {}
5129720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#    define _STLP_END_RELOPS_NAMESPACE }
5139720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  else
5149720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block/* Use std::rel_ops namespace */
5159720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#    define _STLP_BEGIN_RELOPS_NAMESPACE _STLP_BEGIN_NAMESPACE namespace rel_ops {
5169720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#    define _STLP_END_RELOPS_NAMESPACE } }
5179720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#    define _STLP_USE_SEPARATE_RELOPS_NAMESPACE
5189720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  endif /* Use std::rel_ops namespace */
5199720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
5209720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define _STLP_STD ::_STLP_STD_NAME
521e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott#  if !defined (_STLP_TR1)
522e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott#    define _STLP_TR1 _STLP_STD::tr1::
523e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott#  endif
524e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott
525e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott#  if !defined (_STLP_DONT_USE_PRIV_NAMESPACE)
526e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott#    define _STLP_PRIV_NAME priv
527e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott#    define _STLP_PRIV _STLP_STD::_STLP_PRIV_NAME::
528e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott#    define _STLP_MOVE_TO_PRIV_NAMESPACE namespace _STLP_PRIV_NAME {
529e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott#    define _STLP_MOVE_TO_STD_NAMESPACE }
530e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott#  else
531e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott#      if !defined (_STLP_PRIV)
532e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott#        define _STLP_PRIV _STLP_STD::
533e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott#      endif
534e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott#    define _STLP_MOVE_TO_PRIV_NAMESPACE
535e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott#    define _STLP_MOVE_TO_STD_NAMESPACE
536e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott#  endif
5379720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
5389720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block/* Official STLport namespace when std is not redefined.
539e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott * Here we don't use a macro because we do not need it and because
540e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott * stlport is used as file name by boost and folder name under beos:
5419720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block */
5429720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blocknamespace stlport = _STLP_STD_NAME;
5439720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
5449720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block/* Backward compatibility:
5459720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block */
5469720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blocknamespace _STL = _STLP_STD_NAME;
5479720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#undef __STLPORT_NAMESPACE
5489720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#define __STLPORT_NAMESPACE _STLP_STD_NAME
5499720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
5509720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#else /* _STLP_USE_NAMESPACES */
5519720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block/* STLport is being put into global namespace */
5529720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define _STLP_STD
5539720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define _STLP_PRIV
554e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott#  define _STLP_TR1
5559720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define _STLP_BEGIN_NAMESPACE
556e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott#  define _STLP_BEGIN_TR1_NAMESPACE
5579720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define _STLP_END_NAMESPACE
5589720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define _STLP_MOVE_TO_PRIV_NAMESPACE
5599720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define _STLP_MOVE_TO_STD_NAMESPACE
5609720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
5619720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block/* boris : it was found out that _STLP_USE_SEPARATE_RELOPS_NAMESPACE
5629720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block   causes less problems than having relational operator templates in global namespace
5639720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block   Please define _STLP_NO_RELOPS_NAMESPACE in config/user_config.h if your code rely on them. */
5649720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  if !defined (_STLP_NO_RELOPS_NAMESPACE)
5659720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#    define _STLP_USE_SEPARATE_RELOPS_NAMESPACE
5669720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  endif
5679720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define _STLP_BEGIN_RELOPS_NAMESPACE
5689720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define _STLP_END_RELOPS_NAMESPACE
5699720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  undef  _STLP_USE_OWN_NAMESPACE
5709720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif  /* _STLP_USE_NAMESPACES */
5719720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
5729720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#define STLPORT_CSTD _STLP_VENDOR_CSTD
5739720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#define STLPORT      _STLP_STD_NAME
5749720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
5759720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#if defined(_STLP_BOGUS_TEMPLATE_TYPE_MATCHING_BUG)
5769720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define _STLP_SIMPLE_TYPE(T) _stl_trivial_proxy<T>
5779720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#else
5789720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define _STLP_SIMPLE_TYPE(T) T
5799720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif
5809720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
5819720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#ifndef _STLP_RAND48
5829720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define _STLP_NO_DRAND48
5839720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif
5849720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
5859720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block/* advanced keywords usage */
5869720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#define __C_CAST(__x, __y) ((__x)(__y))
5879720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#ifndef  _STLP_NO_NEW_STYLE_CASTS
5889720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define __CONST_CAST(__x,__y) const_cast<__x>(__y)
5899720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define __STATIC_CAST(__x,__y) static_cast<__x>(__y)
5909720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define __REINTERPRET_CAST(__x,__y) reinterpret_cast<__x>(__y)
5919720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#else
5929720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define __STATIC_CAST(__x,__y) __C_CAST(__x, __y)
5939720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define __CONST_CAST(__x,__y) __C_CAST(__x, __y)
5949720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define __REINTERPRET_CAST(__x,__y) __C_CAST(__x, __y)
5959720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif
5969720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
5979720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#if defined (_STLP_NEED_TYPENAME) && ! defined (typename)
5989720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define typename
5999720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif
6009720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
6019720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#if defined (_STLP_NEED_TYPENAME) || defined (_STLP_NO_TYPENAME_ON_RETURN_TYPE )
6029720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define _STLP_TYPENAME_ON_RETURN_TYPE
6039720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#else
6049720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define _STLP_TYPENAME_ON_RETURN_TYPE typename
6059720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif
6069720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
6079720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#ifdef _STLP_NO_TYPENAME_IN_TEMPLATE_HEADER
6089720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define _STLP_HEADER_TYPENAME
6099720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#else
6109720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define _STLP_HEADER_TYPENAME typename
6119720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif
6129720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
613e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott#ifdef _STLP_NO_TYPENAME_BEFORE_NAMESPACE
614e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott#  define _STLP_TYPENAME
615e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott#else
616e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott#  define _STLP_TYPENAME typename
617e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott#endif
618e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott
6199720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#ifndef _STLP_NO_MEMBER_TEMPLATE_KEYWORD
6209720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define _STLP_TEMPLATE template
6219720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#else
6229720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define _STLP_TEMPLATE
6239720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif
6249720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
6259720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#if defined (_STLP_USE_CONTAINERS_EXTENSION)
6269720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define _STLP_KEY_TYPE_FOR_CONT_EXT(type)
6279720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define _STLP_TEMPLATE_FOR_CONT_EXT template <class _KT>
6289720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#else
6299720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define _STLP_KEY_TYPE_FOR_CONT_EXT(type) typedef type _KT;
6309720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define _STLP_TEMPLATE_FOR_CONT_EXT
6319720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif
6329720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
6339720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#if defined (_STLP_NEED_EXPLICIT) && !defined (explicit)
6349720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define explicit
6359720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif
6369720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
6379720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#if !defined (_STLP_NEED_MUTABLE)
638e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott#  define _STLP_MUTABLE(type, x) x
6399720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#else
640e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott#  define _STLP_MUTABLE(type, x) __CONST_CAST(type*, this)->x
6419720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define mutable
6429720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif
6439720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
6449720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#if defined (_STLP_NO_SIGNED_BUILTINS)
6459720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block/* old HP-UX doesn't understand "signed" keyword */
6469720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define signed
6479720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif
6489720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
6499720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#if defined (_STLP_LOOP_INLINE_PROBLEMS)
6509720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define _STLP_INLINE_LOOP
6519720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#else
6529720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define _STLP_INLINE_LOOP inline
6539720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif
6549720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
6559720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#ifndef _STLP_NO_PARTIAL_SPECIALIZATION_SYNTAX
6569720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define _STLP_TEMPLATE_NULL template<>
6579720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#else
6589720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define _STLP_TEMPLATE_NULL
6599720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif
6609720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
6619720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#ifdef _STLP_FUNCTION_TMPL_PARTIAL_ORDER
6629720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define _STLP_OPERATOR_TEMPLATE
6639720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#else
6649720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define _STLP_OPERATOR_TEMPLATE _STLP_TEMPLATE_NULL
6659720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif
6669720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
6679720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#ifndef _STLP_CLASS_PARTIAL_SPECIALIZATION
6689720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block/* unless we have other compiler problem, try simulating partial spec here */
6699720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  if !defined (_STLP_DONT_SIMULATE_PARTIAL_SPEC_FOR_TYPE_TRAITS)
6709720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#    define _STLP_SIMULATE_PARTIAL_SPEC_FOR_TYPE_TRAITS
6719720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  endif
6729720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block/* For your own iterators, please use inheritance from iterator<> instead of these obsolete queries. */
6739720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  if  (defined (_STLP_NESTED_TYPE_PARAM_BUG) || !defined (_STLP_SIMULATE_PARTIAL_SPEC_FOR_TYPE_TRAITS))
6749720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#    if ! defined ( _STLP_USE_OLD_HP_ITERATOR_QUERIES )
6759720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#      define _STLP_USE_OLD_HP_ITERATOR_QUERIES
6769720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#    endif
6779720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  elif defined ( _STLP_NO_ANACHRONISMS )
6789720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#    undef _STLP_USE_OLD_HP_ITERATOR_QUERIES
6799720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  endif
6809720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif
6819720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
6829720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#ifndef _STLP_NO_EXPLICIT_FUNCTION_TMPL_ARGS
6839720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define _STLP_NULL_TMPL_ARGS <>
6849720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block# else
6859720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define _STLP_NULL_TMPL_ARGS
6869720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif
6879720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
6889720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#if !defined (_STLP_ALLOCATOR_TYPE_DFL)
6899720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  if defined (_STLP_DONT_SUP_DFLT_PARAM)
6909720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#    define _STLP_NEEDS_EXTRA_TEMPLATE_CONSTRUCTORS
6919720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  endif
6929720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  if defined (_STLP_NEEDS_EXTRA_TEMPLATE_CONSTRUCTORS)
6939720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#    define _STLP_ALLOCATOR_TYPE_DFL
6949720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  else
6959720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#    define _STLP_ALLOCATOR_TYPE_DFL = allocator_type()
6969720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  endif
6979720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif
6989720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
6999720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block/* When the compiler do not correctly initialized the basic types value in default parameters we prefer
7009720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block * to avoid them to be able to correct this bug.
7019720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block */
7029720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#if defined (_STLP_DEF_CONST_DEF_PARAM_BUG)
7039720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define _STLP_DONT_SUP_DFLT_PARAM 1
7049720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif
7059720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
7069720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#if defined (__SGI_STL_NO_ARROW_OPERATOR) && ! defined (_STLP_NO_ARROW_OPERATOR)
7079720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define _STLP_NO_ARROW_OPERATOR
7089720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif
7099720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
7109720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#if !defined (_STLP_CLASS_PARTIAL_SPECIALIZATION)
7119720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  if !(defined (_STLP_NO_ARROW_OPERATOR)) && \
7129720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block       !defined (_STLP_NO_MSVC50_COMPATIBILITY) && !defined (_STLP_MSVC50_COMPATIBILITY)
7139720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block/* this one is needed for proper reverse_iterator<> operator ->() handling */
7149720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#    define _STLP_MSVC50_COMPATIBILITY 1
7159720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  endif
7169720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif
7179720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
7189720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#if defined ( _STLP_CLASS_PARTIAL_SPECIALIZATION )
7199720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  if (defined(__IBMCPP__) && (500 <= __IBMCPP__) && (__IBMCPP__ < 600) )
7209720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#    define _STLP_DECLARE_REVERSE_ITERATORS(__reverse_iterator) \
7219720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block   typedef typename _STLP_STD :: reverse_iterator<const_iterator> const_reverse_iterator; \
7229720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block   typedef typename _STLP_STD :: reverse_iterator<iterator> reverse_iterator
7239720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  elif (defined (__sgi) && ! defined (__GNUC__)) || defined (__SUNPRO_CC) || defined (__xlC__)
7249720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#    define _STLP_DECLARE_REVERSE_ITERATORS(__reverse_iterator) \
7259720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block   typedef _STLP_STD:: _STLP_TEMPLATE reverse_iterator<const_iterator> const_reverse_iterator; \
7269720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block   typedef _STLP_STD:: _STLP_TEMPLATE reverse_iterator<iterator> reverse_iterator
7279720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  else
7289720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#    define _STLP_DECLARE_REVERSE_ITERATORS(__reverse_iterator) \
7299720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block   typedef _STLP_STD::reverse_iterator<const_iterator> const_reverse_iterator; \
7309720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block   typedef _STLP_STD::reverse_iterator<iterator> reverse_iterator
7319720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  endif
7329720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#else /* _STLP_CLASS_PARTIAL_SPECIALIZATION */
7339720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  if defined (_STLP_MSVC50_COMPATIBILITY)
7349720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#    define _STLP_DECLARE_REVERSE_ITERATORS(__reverse_iterator) \
7359720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  typedef _STLP_STD::__reverse_iterator<const_iterator, value_type, const_reference, \
7369720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block    const_pointer, difference_type>  const_reverse_iterator; \
7379720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  typedef _STLP_STD::__reverse_iterator<iterator, value_type, reference, pointer, difference_type> \
7389720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block    reverse_iterator
7399720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  else
7409720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#    define _STLP_DECLARE_REVERSE_ITERATORS(__reverse_iterator) \
7419720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  typedef _STLP_STD::__reverse_iterator<const_iterator, value_type, const_reference, \
7429720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block    difference_type>  const_reverse_iterator; \
7439720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  typedef _STLP_STD::__reverse_iterator<iterator, value_type, \
7449720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block    reference, difference_type> \
7459720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block    reverse_iterator
7469720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  endif
7479720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif /* _STLP_CLASS_PARTIAL_SPECIALIZATION */
7489720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
7499720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#define _STLP_DECLARE_BIDIRECTIONAL_REVERSE_ITERATORS \
7509720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block        _STLP_DECLARE_REVERSE_ITERATORS(reverse_bidirectional_iterator)
7519720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#define _STLP_DECLARE_RANDOM_ACCESS_REVERSE_ITERATORS \
7529720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block        _STLP_DECLARE_REVERSE_ITERATORS(reverse_iterator)
7539720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
7549720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#define __IMPORT_CONTAINER_TYPEDEFS(_Super)                              \
7559720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block    typedef typename _Super::value_type value_type;                      \
7569720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block    typedef typename _Super::size_type size_type;                        \
7579720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block    typedef typename _Super::difference_type difference_type;            \
7589720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block    typedef typename _Super::reference reference;                        \
7599720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block    typedef typename _Super::const_reference const_reference;            \
7609720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block    typedef typename _Super::pointer pointer;                            \
7619720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block    typedef typename _Super::const_pointer const_pointer;                \
7629720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block    typedef typename _Super::allocator_type allocator_type;
7639720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
7649720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
7659720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#define __IMPORT_ITERATORS(_Super)                                       \
7669720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block    typedef typename _Super::iterator iterator;                          \
7679720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block    typedef typename _Super::const_iterator const_iterator;
7689720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
7699720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#define __IMPORT_REVERSE_ITERATORS(_Super)                                   \
7709720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block    typedef typename _Super::const_reverse_iterator  const_reverse_iterator; \
7719720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block    typedef typename _Super::reverse_iterator reverse_iterator;
7729720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
7739720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#define  __IMPORT_SUPER_COPY_ASSIGNMENT(__derived_name, _Self, _SUPER)       \
7749720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block    __derived_name(const _Super& __x) : _SUPER(__x) {}                       \
7759720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block    _Self& operator=(const _Super& __x) {                                    \
7769720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block        *(_Super*)this = __x;                                                \
7779720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block        return *this;                                                        \
7789720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block    }                                                                        \
7799720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block    __derived_name(const _Self& __x) : _SUPER(__x) {}                        \
7809720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block    _Self& operator=(const _Self& __x) {                                     \
7819720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block        *(_Super*)this = __x;                                                \
7829720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block        return *this;                                                        \
7839720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block    }
7849720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
7859720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#define __IMPORT_WITH_ITERATORS(_Super) \
7869720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  __IMPORT_CONTAINER_TYPEDEFS(_Super) __IMPORT_ITERATORS(_Super)
7879720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
7889720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#define __IMPORT_WITH_REVERSE_ITERATORS(_Super) \
7899720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  __IMPORT_WITH_ITERATORS(_Super) __IMPORT_REVERSE_ITERATORS(_Super)
7909720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
7919720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#if defined (_STLP_TRIVIAL_CONSTRUCTOR_BUG)
7929720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define __TRIVIAL_CONSTRUCTOR(__type) __type() {}
7939720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#else
7949720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define __TRIVIAL_CONSTRUCTOR(__type)
7959720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif
7969720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
7979720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#if defined (_STLP_TRIVIAL_DESTRUCTOR_BUG)
7989720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define __TRIVIAL_DESTRUCTOR(__type) ~__type() {}
7999720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#else
8009720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define __TRIVIAL_DESTRUCTOR(__type)
8019720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif
8029720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
8039720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#define __TRIVIAL_STUFF(__type)  \
8049720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block  __TRIVIAL_CONSTRUCTOR(__type) __TRIVIAL_DESTRUCTOR(__type)
8059720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
806e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott#if defined (_STLP_STATIC_CONST_INIT_BUG)
807e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott#  define _STLP_STATIC_CONSTANT(__type, __assignment) enum { __assignment }
808e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott#else
809e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott#  define _STLP_STATIC_CONSTANT(__type, __assignment) static const __type __assignment
810e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott#endif
811e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott
8129720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#if defined (_STLP_HAS_NO_EXCEPTIONS)
8139720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define _STLP_NO_EXCEPTIONS
8149720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif
8159720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
8169720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#if !defined (_STLP_DONT_USE_EXCEPTIONS) && !defined (_STLP_NO_EXCEPTIONS) && !defined (_STLP_USE_EXCEPTIONS)
8179720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define _STLP_USE_EXCEPTIONS
8189720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif
8199720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
8209720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#if defined (_STLP_USE_EXCEPTIONS)
8219720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define _STLP_TRY try
8229720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define _STLP_CATCH_ALL catch(...)
8239720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  ifndef _STLP_THROW
8249720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#    define _STLP_THROW(x) throw x
8259720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  endif
8269720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define _STLP_RETHROW throw
8279720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
8289720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define _STLP_UNWIND(action) catch(...) { action; throw; }
8299720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
8309720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  ifdef _STLP_THROW_RETURN_BUG
8319720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#    define _STLP_RET_AFTER_THROW(data) return data;
8329720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  else
8339720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#    define _STLP_RET_AFTER_THROW(data)
8349720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  endif
8359720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
8369720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  if !defined (_STLP_THROWS)
837e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott#    define _STLP_THROWS(x) throw(x)
8389720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  endif
8399720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  if !defined (_STLP_NOTHROW)
840e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott#    define _STLP_NOTHROW throw()
8419720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  endif
8429720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#else
8439720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define _STLP_TRY
8449720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define _STLP_CATCH_ALL if (false)
8459720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  ifndef _STLP_THROW
8463a5d1fa525bd73df0c6df0bb66829f92af791064Mark Salyzyn#    define _STLP_THROW(x) abort()
8479720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  endif
8483a5d1fa525bd73df0c6df0bb66829f92af791064Mark Salyzyn#  define _STLP_RETHROW abort()
8499720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define _STLP_UNWIND(action)
8509720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define _STLP_THROWS(x)
8519720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define _STLP_NOTHROW
8529720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define _STLP_RET_AFTER_THROW(data)
8539720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif
8549720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
8559720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block/*
8569720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block * Here we check _STLP_NO_EXCEPTIONS which means that the compiler has no
8579720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block * exception support but not the _STLP_USE_EXCEPTIONS which simply means
8589720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block * that the user do not want to use them.
8599720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block */
8609720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#if !defined (_STLP_NO_EXCEPTIONS) && !defined (_STLP_NO_EXCEPTION_SPEC)
8619720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define _STLP_THROWS_INHERENTLY(x) throw x
8629720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define _STLP_NOTHROW_INHERENTLY throw()
8639720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#else
8649720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define _STLP_THROWS_INHERENTLY(x)
8659720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define _STLP_NOTHROW_INHERENTLY
8669720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif
8679720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
8689720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block/* STLport function not returning are functions that throw so we translate
8699720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block * the noreturn functions in throwing functions taking also into account
8709720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block * exception support activation.
8719720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block */
8729720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#if defined (_STLP_NORETURN_FUNCTION) && !defined (_STLP_NO_EXCEPTIONS) && \
8739720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block   !defined (_STLP_FUNCTION_THROWS)
8749720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define _STLP_FUNCTION_THROWS _STLP_NORETURN_FUNCTION
8759720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#else
8769720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define _STLP_FUNCTION_THROWS
8779720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif
8789720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
8799720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#if defined(_STLP_NO_BOOL)
8809720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  if (defined (__IBMCPP__) && (__IBMCPP__ < 400)) && ! defined (_AIX)
8819720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#    include <isynonym.hpp>
8829720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#    if defined (__OS400__)
8839720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blocktypedef int bool;
8849720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#    elif !( defined (__xlC__) || defined (_AIX))
8859720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blocktypedef Boolean bool;
8869720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#    endif
8879720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  else
8889720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#    if defined(_STLP_YVALS_H)
8899720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#      include <yvals.h>
8909720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#    else
8919720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#      if defined (_STLP_DONT_USE_BOOL_TYPEDEF)
8929720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#        define bool int
8939720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#      else
8949720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blocktypedef int bool;
8959720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#      endif
8969720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#      define true 1
8979720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#      define false 0
8989720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#    endif
8999720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  endif /* __IBMCPP__ */
9009720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#else
9019720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define _STLP_BOOL_KEYWORD 1
9029720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif /* _STLP_NO_BOOL */
9039720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
9049720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block/* uninitialized value filler */
9059720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#ifndef _STLP_SHRED_BYTE
9069720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block/* This value is designed to cause problems if an error occurs */
9079720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define _STLP_SHRED_BYTE 0xA3
9089720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif /* _STLP_SHRED_BYTE */
9099720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
9109720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block/* shared library tune-up */
9119720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#ifndef _STLP_IMPORT_DECLSPEC
9129720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define _STLP_IMPORT_DECLSPEC
9139720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif
9149720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
9159720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block/* a keyword used to instantiate export template */
9169720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#ifndef _STLP_EXPORT_TEMPLATE_KEYWORD
9179720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define _STLP_EXPORT_TEMPLATE_KEYWORD
9189720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif
9199720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#ifndef _STLP_IMPORT_TEMPLATE_KEYWORD
9209720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define _STLP_IMPORT_TEMPLATE_KEYWORD
9219720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif
9229720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
923e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott#if !defined (_STLP_NO_CONST_IN_PAIR)
924e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott#  define _STLP_CONST const
925e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott#else
926e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott#  define _STLP_CONST
927e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott#endif
928e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott
9299720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#ifdef _STLP_USE_NO_IOSTREAMS
9309720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block/*
9319720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block * If we do not use iostreams we do not use the export/import
9329720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block * techniques to avoid build of the STLport library.
9339720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block */
9349720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  undef _STLP_USE_DECLSPEC
9359720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block/* We also undef USE_DYNAMIC_LIB macro as this macro add some code
9369720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block * to use the dynamic (shared) STLport library for some platform/compiler
937e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott * configuration leading to problem when not linking to the STLport lib.
9389720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block */
9399720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  undef _STLP_USE_DYNAMIC_LIB
9409720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif
9419720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
9429720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#if  defined (_STLP_DLLEXPORT_NEEDS_PREDECLARATION) && defined (_STLP_USE_DECLSPEC)
9439720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  if ! defined (_STLP_USE_TEMPLATE_EXPORT)
9449720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block/* this setting turns on "extern template" extension use */
9459720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#    define _STLP_USE_TEMPLATE_EXPORT
9469720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  endif
9479720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  if defined (_STLP_DESIGNATED_DLL) && ! defined (_STLP_NO_FORCE_INSTANTIATE)
9489720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#    define _STLP_NO_FORCE_INSTANTIATE
9499720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  endif
9509720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif
9519720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
9529720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#if defined (_STLP_DESIGNATED_DLL) /* This is a lib which will contain STLport exports */
9539720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define  _STLP_EXPORT _STLP_EXPORT_TEMPLATE_KEYWORD
9549720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#else
9559720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define  _STLP_EXPORT _STLP_IMPORT_TEMPLATE_KEYWORD
9569720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif
9579720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
9589720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#ifndef _STLP_EXPORT_TEMPLATE
9599720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define  _STLP_EXPORT_TEMPLATE _STLP_EXPORT template
9609720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif
9619720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
9629720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#if defined (_STLP_USE_DECLSPEC) /* using export/import technique */
9639720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
9649720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  ifndef _STLP_EXPORT_DECLSPEC
9659720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#    define _STLP_EXPORT_DECLSPEC
9669720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  endif
9679720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  ifndef _STLP_IMPORT_DECLSPEC
9689720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#    define _STLP_IMPORT_DECLSPEC
9699720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  endif
9709720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  ifndef _STLP_CLASS_EXPORT_DECLSPEC
9719720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#    define _STLP_CLASS_EXPORT_DECLSPEC
9729720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  endif
9739720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  ifndef _STLP_CLASS_IMPORT_DECLSPEC
9749720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#    define _STLP_CLASS_IMPORT_DECLSPEC
9759720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  endif
9769720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  if defined (_STLP_DESIGNATED_DLL) /* This is a lib which will contain STLport exports */
9779720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#    define  _STLP_DECLSPEC        _STLP_EXPORT_DECLSPEC
9789720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#    define  _STLP_CLASS_DECLSPEC  _STLP_CLASS_EXPORT_DECLSPEC
9799720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  else
9809720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#    define  _STLP_DECLSPEC        _STLP_IMPORT_DECLSPEC   /* Other modules, importing STLport exports */
9819720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#    define  _STLP_CLASS_DECLSPEC  _STLP_CLASS_IMPORT_DECLSPEC
9829720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  endif
9839720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
9849720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#else /* Not using DLL export/import specifications */
9859720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
9869720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define _STLP_DECLSPEC
9879720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define _STLP_CLASS_DECLSPEC
9889720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
9899720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif
9909720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
9919720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#define _STLP_EXPORT_TEMPLATE_CLASS _STLP_EXPORT template class _STLP_CLASS_DECLSPEC
9929720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
993e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott#if defined (_STLP_NEED_ADDITIONAL_STATIC_DECLSPEC)
994e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott#  define _STLP_STATIC_DECLSPEC _STLP_DECLSPEC
9959720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#else
996e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott#  define _STLP_STATIC_DECLSPEC
9979720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif
9989720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
9999720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#if !defined (_STLP_CALL)
10009720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define _STLP_CALL
10019720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif
10029720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
10039720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#ifndef _STLP_USE_NO_IOSTREAMS
10049720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
10059720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  if defined (__DECCXX) && ! defined (__USE_STD_IOSTREAM)
10069720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#    define __USE_STD_IOSTREAM
10079720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  endif
10089720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
10099720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block/* We only need to expose details of streams implementation
10109720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block   if we use non-standard i/o or are building STLport*/
10119720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  if defined (__BUILDING_STLPORT) || defined (_STLP_NO_FORCE_INSTANTIATE) || !defined(_STLP_NO_CUSTOM_IO)
10129720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#    define _STLP_EXPOSE_STREAM_IMPLEMENTATION 1
10139720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  endif
10149720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
10159720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block/* We only need to expose details of global implementation if we are building STLport
10169720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block   or have not instantiated everything in the lib */
10179720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  if defined (__BUILDING_STLPORT) || defined (_STLP_NO_FORCE_INSTANTIATE)
10189720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#    undef  _STLP_EXPOSE_GLOBALS_IMPLEMENTATION
10199720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#    define _STLP_EXPOSE_GLOBALS_IMPLEMENTATION 1
10209720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  endif
10219720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
10229720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#else /* _STLP_USE_NO_IOSTREAMS */
10239720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block/* when we are not using SGI iostreams, we must expose globals, but not streams implementation */
10249720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define _STLP_EXPOSE_GLOBALS_IMPLEMENTATION
10259720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif /* _STLP_USE_NO_IOSTREAMS */
10269720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
10279720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#ifdef _STLP_PARTIAL_SPEC_NEEDS_TEMPLATE_ARGS
10289720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define _STLP_PSPEC2(t1,t2) < t1,t2 >
10299720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define _STLP_PSPEC3(t1,t2,t3) < t1,t2,t3 >
10309720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#else
10319720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define _STLP_PSPEC2(t1,t2)  /* nothing */
10329720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define _STLP_PSPEC3(t1,t2,t3)  /* nothing */
10339720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif
10349720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
10359720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block/* Activation of the partial template workaround:
10369720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block */
10379720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#if !defined(_STLP_DONT_USE_PARTIAL_SPEC_WRKD) &&\
10389720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block   (!defined(_STLP_CLASS_PARTIAL_SPECIALIZATION) || !defined(_STLP_FUNCTION_TMPL_PARTIAL_ORDER))
10399720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define _STLP_USE_PARTIAL_SPEC_WORKAROUND
10409720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif
10419720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
10429720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#ifdef _STLP_USE_SEPARATE_RELOPS_NAMESPACE
10439720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define _STLP_RELOPS_OPERATORS(_TMPL, _TP) \
10449720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block_TMPL inline bool _STLP_CALL operator!=(const _TP& __x, const _TP& __y) {return !(__x == __y);}\
10459720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block_TMPL inline bool _STLP_CALL operator>(const _TP& __x, const _TP& __y)  {return __y < __x;}\
10469720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block_TMPL inline bool _STLP_CALL operator<=(const _TP& __x, const _TP& __y) { return !(__y < __x);}\
10479720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block_TMPL inline bool _STLP_CALL operator>=(const _TP& __x, const _TP& __y) { return !(__x < __y);}
10489720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#else
10499720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  define _STLP_RELOPS_OPERATORS(_TMPL, _TP)
10509720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif
10519720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
10529720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#if defined ( _STLP_USE_ABBREVS )
10539720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#  include <stl/_abbrevs.h>
10549720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif
10559720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
1056e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott/* Some really useful macro */
10579720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#define _STLP_ARRAY_SIZE(A) sizeof(A) / sizeof(A[0])
10589720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#define _STLP_ARRAY_AND_SIZE(A) A, sizeof(A) / sizeof(A[0])
10599720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
1060e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott#if !defined (_STLP_MARK_PARAMETER_AS_UNUSED)
1061e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott#  define _STLP_MARK_PARAMETER_AS_UNUSED(X) (void*)X;
1062e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott#endif
1063e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott
1064e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott#if defined (_STLP_CHECK_RUNTIME_COMPATIBILITY)
1065e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott#  if defined (_STLP_USE_NO_IOSTREAMS)
1066e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott#    undef _STLP_CHECK_RUNTIME_COMPATIBILITY
1067e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott#  else
1068e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott/* The extern "C" simply makes the symbol simpler. */
1069e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott#if defined (__cplusplus)
1070e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scottextern "C"
1071e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott#endif
1072e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scottvoid _STLP_DECLSPEC _STLP_CALL _STLP_CHECK_RUNTIME_COMPATIBILITY();
1073e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott#  endif
1074e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott#endif
1075e46c9386c4f79aa40185f79a19fc5b2a7ef528b3Patrick Scott
10769720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block/* some cleanup */
10779720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#undef _STLP_DONT_USE_BOOL_TYPEDEF
10789720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#undef _STLP_YVALS_H
10799720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#undef _STLP_LOOP_INLINE_PROBLEMS
10809720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#undef _STLP_NEED_EXPLICIT
10819720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#undef _STLP_NEED_TYPENAME
10829720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#undef _STLP_NO_NEW_STYLE_CASTS
10839720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#undef __AUTO_CONFIGURED
10849720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block
10859720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif /* _STLP_FEATURES_H */
1086