2 * This file defines site configuration.
6 * _STLP_NO_THREADS: if defined, STLport don't use any
7 * multithreading support. Synonym is _NOTHREADS
11 #define _STLP_NO_THREADS
14 /* _PTHREADS: if defined, use POSIX threads for multithreading support. */
19 /* compatibility section
22 #if (defined (_STLP_NOTHREADS) || defined (_STLP_NO_THREADS) || defined (NOTHREADS))
23 # if !defined (_NOTHREADS)
26 # if !defined (_STLP_NO_THREADS)
27 # define _STLP_NO_THREADS
31 #if !defined(_STLP_USE_DYNAMIC_LIB) && !defined(_STLP_USE_STATIC_LIB)
33 * Turn _STLP_USE_DYNAMIC_LIB to enforce use of .dll version of STLport library.
34 * NOTE: please do that only if you know what you are doing!
35 * Changing default will require you to change makefiles in "build" accordingly
36 * and to rebuild STLPort library!
37 * On UNIX, this has no effect, see build/lib/README for make tags.
38 * See STLport configuration file (build/lib/configure.bat) for help in building
39 * the require library versions.
42 #define _STLP_USE_DYNAMIC_LIB
45 * Turn _STLP_USE_STATIC_LIB to enforce use of static version of STLport library.
46 * NOTE: please do that only if you know what you are doing!
47 * Changing default will require you to change makefile in "build" accordingly
48 * and to rebuild STLPort library!
49 * On UNIX, this has no effect, see build/lib/README for make tags.
50 * See STLport configuration file (build/lib/configure.bat) for help in building
51 * the require library versions.
54 #define _STLP_USE_STATIC_LIB
59 * Edit relative path below (or put full path) to get native
60 * compiler vendor's headers included. Default is "../include"
61 * for _STLP_NATIVE_INCLUDE_PATH, default for other macros is
62 * _STLP_NATIVE_INCLUDE_PATH.
63 * Hint: never install STLport in the directory that ends with "include"
66 #undef _STLP_NATIVE_INCLUDE_PATH
67 #define _STLP_NATIVE_INCLUDE_PATH ../include
69 /* same for C library headers like <cstring> */
71 #undef _STLP_NATIVE_CPP_C_INCLUDE_PATH
72 #define _STLP_NATIVE_CPP_C_INCLUDE_PATH _STLP_NATIVE_INCLUDE_PATH
74 /* same for C headers like <string.h> */
76 #undef _STLP_NATIVE_C_INCLUDE_PATH
77 #define _STLP_NATIVE_C_INCLUDE_PATH _STLP_NATIVE_INCLUDE_PATH
79 /* Some compilers locate basic C++ runtime support headers (<new>, <typeinfo>, <exception>) in separate directory */
81 #undef _STLP_NATIVE_CPP_RUNTIME_INCLUDE_PATH
82 #define _STLP_NATIVE_CPP_RUNTIME_INCLUDE_PATH _STLP_NATIVE_INCLUDE_PATH
86 * If namespases available, STLport use own namespace (and masquerade
87 * it as std). Disable own namespace may cause undefined behaviour.
90 #define _STLP_NO_OWN_NAMESPACE 1
94 * Uncomment _STLP_LEAKS_PEDANTIC to force deallocation of ALL allocated
95 * memory chunks. Normally not required. But if you worry about quazi-leaks
96 * (may be reported by some leaks detection tools), use
97 * _STLP_LEAKS_PEDANTIC. It should be used with _STLP_USE_NEWALLOC or
98 * _STLP_USE_MALLOC (see below), the default node_alloc allocator also clean
99 * its internal memory pool but only if STLport is used as a dynamic library
100 * under Win32 (using MSVC like compilers).
103 #define _STLP_LEAKS_PEDANTIC 1
107 * Uncomment _STLP_USE_NEWALLOC to force allocator<T> to use plain "new"
108 * instead of STLport optimized node allocator engine.
111 #define _STLP_USE_NEWALLOC 1
115 * Uncomment _STLP_USE_MALLOC to force allocator<T> to use plain "malloc"
116 * instead of STLport optimized node allocator engine.
118 * This is default allocator for glibc 2.3.x and later, if not mentioned other
121 #define _STLP_USE_MALLOC 1
125 * Uncomment _STLP_USE_PERTHREAD_ALLOC to force allocator<T> to use
126 * a specific implementation targetting the massively multi-threaded
127 * environment. The implementation is based on the POSIX pthread
131 #define _STLP_USE_PERTHREAD_ALLOC 1
135 * Uncomment _STLP_USE_NODE_ALLOC if you want to force allocator<T> to use
136 * "node_alloc" allocator (this is default allocator for STLport, if not
137 * used other above, except glibc 2.3.x and later, where default is
138 * "malloc", due to better results)
141 #define _STLP_USE_NODE_ALLOC 1
145 * Set _STLP_DEBUG_ALLOC to use allocators that perform memory debugging,
146 * such as padding/checking for memory consistency
149 #define _STLP_DEBUG_ALLOC 1
153 * For compiler not supporting partial template specialization or ordering of
154 * template functions STLport implement a workaround based on inheritance
155 * detection. This inheritance can introduce trouble in client code when
156 * a user class derived a STL container (which is not advised as STL containers
157 * do not have virtual destructors). To disable this workaround turn this macro on:
160 #define _STLP_DONT_USE_PARTIAL_SPEC_WRKD 1
164 * Uncomment this to force all debug diagnostic to be directed through a
165 * user-defined global function:
166 * void __stl_debug_message(const char * format_str, ...)
167 * instead of predefined STLport routine.
168 * This allows you to take control of debug message output.
169 * Default routine calls fprintf(stderr,...)
170 * Note : If you set this macro, you must supply __stl_debug_message
171 * function definition somewhere.
174 #define _STLP_DEBUG_MESSAGE 1
178 * Uncomment this to force all failed assertions to be executed through
179 * user-defined global function:
180 * void __stl_debug_terminate(void). This allows
181 * you to take control of assertion behaviour for debugging purposes.
182 * Default routine calls _STLP_ABORT().
183 * Note : If you set this macro, you must supply __stl_debug_terminate
184 * function definition somewhere.
187 #define _STLP_DEBUG_TERMINATE 1
191 * Uncomment that to disable exception handling code
194 #define _STLP_DONT_USE_EXCEPTIONS 1
198 * _STLP_NO_NAMESPACES: if defined, don't put the library in namespace
199 * stlport:: or std::, even if the compiler supports namespaces
202 #define _STLP_NO_NAMESPACES 1
205 /*==========================================================
206 * Compatibility section
207 *==========================================================*/
210 * Use abbreviated class names for linker benefit (don't affect interface).
211 * This option is obsolete, but should work in this release.
215 #define _STLP_USE_ABBREVS
219 * This definition precludes STLport reverse_iterator to be compatible with
220 * other parts of MSVC library. (With partial specialization, it just
222 * Use it _ONLY_ if you use SGI-style reverse_iterator<> template explicitly
225 #define _STLP_NO_MSVC50_COMPATIBILITY 1
229 * Use obsolete overloaded template functions iterator_category(), value_type(), distance_type()
230 * for querying iterator properties. Please note those names are non-standard and are not guaranteed
231 * to be used by every implementation. However, this setting is on by default when partial specialization
232 * is not implemented in the compiler and cannot be simulated (only if _STLP_NO_ANACHRONISMS is not set).
233 * Use of those interfaces for user-defined iterators is strongly discouraged:
234 * please use public inheritance from iterator<> template to achieve desired effect.
235 * Second form is to disable old-style queries in any case.
238 #define _STLP_USE_OLD_HP_ITERATOR_QUERIES
239 #define _STLP_NO_OLD_HP_ITERATOR_QUERIES
244 * On systems with support of large files (_LARGEFILE_SOURCE,
245 * _LARGEFILE64_SOURCE defined) we will use 64-bit file offset, even if
246 * __USE_FILE_OFFSET64 or _FILE_OFFSET_BITS not defined or _FILE_OFFSET_BITS
247 * less than 64. In the last case sizeof(std::streamoff) may not be equal to
248 * sizeof(off_t); if you want to force equal size of off_t and streamoff,
249 * uncomment macro below. But pay attention, this has influence on libstlport
250 * and in future usage it may cause conflict with defined _FILE_OFFSET_BITS macro.
254 #define _STLP_USE_DEFAULT_FILE_OFFSET
258 * _STLP_USE_STDIO_IO, _STLP_USE_UNIX_IO: force selection of stdio calls
259 * (fopen/flose/fread/fwrite) under fstream buffers or unistd calls
260 * (open/close/read/write + mmap). On systems that have both (i.e. most Unixes)
261 * _STLP_USE_UNIX_IO is used.
263 * There is a third variant for Windows: _STLP_USE_WIN32_IO, that based
264 * on Windows calls (CreateFile/CloseHandle/ReadFile/WriteFile + CreateFileMapping,
267 * Uncomment only one define here!
270 #define _STLP_USE_UNIX_IO
272 #define _STLP_USE_STDIO_IO
274 #define _STLP_USE_WIN32_IO
277 /*==========================================================================*/
279 /* This section contains swithes which should be off by default,
280 * but so few compilers would have it undefined, so that we set them here,
281 * with the option to be turned off later in compiler-specific file
284 #define _STLP_NO_UNCAUGHT_EXCEPT_SUPPORT
285 #define _STLP_NO_UNEXPECTED_EXCEPT_SUPPORT
287 /*==========================================================================*/
289 #if defined(__sun) && defined(__GNUC__)
290 /* __SunOS_5_x is not defined in headers, and there is no way to derive it from headers only;
291 * nevertheless this macro defined automagically by SunPro compilers family;
293 * gcc know nothing about it, but defining it with -D on compiler command line
294 * is a bad idea from one side, and this info still useful when we want to use
295 * (or don't use) some Solaris version-specific features from other side.
296 * Of course, the best way is to define it in spec file, but this is beyond our scope.
298 * Uncomment ONE of the following, depends on what Solaris version you use.
302 #define __SunOS_5_5_1
322 /* With following patches Solaris 8 and 9 will have *l and *f (long double and float)
323 * variants of math functions:
324 * SunOS 5.8 patch 111721-04 (May/08/2003)
325 * <http://sunsolve.sun.com/search/document.do?assetkey=1-21-111721-04-1>
326 * SunOS 5.9 patch 111722-04 (May/08/2003)
327 * <http://sunsolve.sun.com/search/document.do?assetkey=1-21-111722-04-1>
328 * Solaris 10 has this functions from box.
331 #define _STLP_SOLARIS_MATH_PATCH