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