]> git.lyx.org Git - lyx.git/blob - boost/boost/config/stdlib/stlport.hpp
update boost
[lyx.git] / boost / boost / config / stdlib / stlport.hpp
1 //  (C) Copyright Boost.org 2001. Permission to copy, use, modify, sell and
2 //  distribute this software is granted provided this copyright notice appears
3 //  in all copies. This software is provided "as is" without express or implied
4 //  warranty, and with no claim as to its suitability for any purpose.
5
6 //  See http://www.boost.org for most recent version.
7
8 //  STLPort standard library config:
9
10 #if !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION)
11 #  include <utility>
12 #  if !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION)
13 #      error "This is not STLPort!"
14 #  endif
15 #endif
16
17 //
18 // __STL_STATIC_CONST_INIT_BUG implies BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
19 // for versions prior to 4.1(beta)
20 //
21 #if (defined(__STL_STATIC_CONST_INIT_BUG) || defined(_STLP_STATIC_CONST_INIT_BUG)) && (__SGI_STL_PORT <= 0x400)
22 #  define BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
23 #endif
24
25 //
26 // If STLport thinks that there is no partial specialisation, then there is no
27 // std::iterator traits:
28 //
29 #if !(defined(_STLP_CLASS_PARTIAL_SPECIALIZATION) || defined(__STL_CLASS_PARTIAL_SPECIALIZATION))
30 #  define BOOST_NO_STD_ITERATOR_TRAITS
31 #endif
32
33 //
34 // No new style iostreams on GCC without STLport's iostreams enabled:
35 //
36 #if (defined(__GNUC__) && (__GNUC__ < 3)) && !(defined(__SGI_STL_OWN_IOSTREAMS) || defined(_STLP_OWN_IOSTREAMS))
37 #  define BOOST_NO_STRINGSTREAM
38 #endif
39
40 //
41 // No new iostreams implies no std::locale, and no std::stringstream:
42 //
43 #if defined(__STL_NO_IOSTREAMS) || defined(__STL_NO_NEW_IOSTREAMS) || defined(_STLP_NO_IOSTREAMS) || defined(_STLP_NO_NEW_IOSTREAMS)
44 #  define BOOST_NO_STD_LOCALE
45 #  define BOOST_NO_STRINGSTREAM
46 #endif
47
48 //
49 // If the streams are not native, and we have a "using ::x" compiler bug
50 // then the io stream facets are not available in namespace std::
51 //
52 #if !defined(_STLP_OWN_IOSTREAMS) && defined(_STLP_USE_NAMESPACES) && defined(BOOST_NO_USING_TEMPLATE) && !defined(__BORLANDC__)
53 #  define BOOST_NO_STD_LOCALE
54 #endif
55 #if !defined(__SGI_STL_OWN_IOSTREAMS) && defined(__STL_USE_NAMESPACES) && defined(BOOST_NO_USING_TEMPLATE) && !defined(__BORLANDC__)
56 #  define BOOST_NO_STD_LOCALE
57 #endif
58
59 //
60 // Without member template support enabled, their are no template
61 // iterate constructors, and no std::allocator:
62 //
63 #if !(defined(__STL_MEMBER_TEMPLATES) || defined(_STLP_MEMBER_TEMPLATES))
64 #  define BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS
65 #  define BOOST_NO_STD_ALLOCATOR
66 #endif
67
68 #if !defined(_STLP_MEMBER_TEMPLATE_CLASSES)
69 #  define BOOST_NO_STD_ALLOCATOR
70 #endif
71
72 //
73 // We always have SGI style hash_set, hash_map, and slist:
74 //
75 #define BOOST_HAS_HASH
76 #define BOOST_HAS_SLIST
77
78 //
79 // STLport does a good job of importing names into namespace std::,
80 // but doesn't always get them all, define BOOST_NO_STDC_NAMESPACE, since our
81 // workaround does not conflict with STLports:
82 //
83 //
84 // Harold Howe says:
85 // Borland switched to STLport in BCB6. Defining BOOST_NO_STDC_NAMESPACE with
86 // BCB6 does cause problems. If we detect C++ Builder, then don't define 
87 // BOOST_NO_STDC_NAMESPACE
88 //
89 #if !defined(__BORLANDC__)
90 //
91 // If STLport is using it's own namespace, and the real names are in
92 // the global namespace, then we duplicate STLport's using declarations
93 // (by defining BOOST_NO_STDC_NAMESPACE), we do this because STLport doesn't
94 // necessarily import all the names we need into namespace std::
95 // 
96 #  if (defined(__STL_IMPORT_VENDOR_CSTD) \
97          || defined(__STL_USE_OWN_NAMESPACE) \
98          || defined(_STLP_IMPORT_VENDOR_CSTD) \
99          || defined(_STLP_USE_OWN_NAMESPACE)) \
100       && (defined(__STL_VENDOR_GLOBAL_CSTD) || defined (_STLP_VENDOR_GLOBAL_CSTD))
101 #     define BOOST_NO_STDC_NAMESPACE
102 #  endif
103 #elif __BORLANDC__ < 0x560
104 // STLport doesn't import std::abs correctly:
105 #include <stdlib.h>
106 namespace std { using ::abs; }
107 // and strcmp/strcpy don't get imported either ('cos they are macros)
108 #include <string.h>
109 #ifdef strcpy
110 #  undef strcpy
111 #endif
112 #ifdef strcmp
113 #  undef strcmp
114 #endif
115 #ifdef _STLP_VENDOR_CSTD
116 namespace std{ using _STLP_VENDOR_CSTD::strcmp; using _STLP_VENDOR_CSTD::strcpy; }
117 #endif
118 #endif
119
120 //
121 // std::use_facet may be non-standard, uses a class instead:
122 //
123 #if defined(__STL_NO_EXPLICIT_FUNCTION_TMPL_ARGS) || defined(_STLP_NO_EXPLICIT_FUNCTION_TMPL_ARGS)
124 #  define BOOST_NO_STD_USE_FACET
125 #  define BOOST_HAS_STLP_USE_FACET
126 #endif
127
128 //
129 // If STLport thinks there are no wide functions, <cwchar> etc. is not working; but
130 // only if BOOST_NO_STDC_NAMESPACE is not defined (if it is then we do the import 
131 // into std:: ourselves).
132 //
133 #if defined(_STLP_NO_NATIVE_WIDE_FUNCTIONS) && !defined(BOOST_NO_STDC_NAMESPACE)
134 #  define BOOST_NO_CWCHAR
135 #  define BOOST_NO_CWTYPE
136 #endif
137
138 //
139 // Borland ships a version of STLport with C++ Builder 6 that lacks
140 // hashtables and the like:
141 //
142 #if defined(__BORLANDC__) && (__BORLANDC__ == 0x560)
143 #  undef BOOST_HAS_HASH
144 #endif
145
146
147 #define BOOST_STDLIB "STLPort standard library version " BOOST_STRINGIZE(__SGI_STL_PORT)
148
149
150
151
152
153
154