ReactOS 0.4.15-dev-7924-g5949c20
user_config.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 1999
3 * Boris Fomitchev
4 *
5 * This material is provided "as is", with absolutely no warranty expressed
6 * or implied. Any use is at your own risk.
7 *
8 * Permission to use or copy this software for any purpose is hereby granted
9 * without fee, provided the above notices are retained on all copies.
10 * Permission to modify the code and to distribute modified code is granted,
11 * provided the above notices are retained, and a notice that the code was
12 * modified is included with the above copyright notice.
13 */
14
15/*
16 * Purpose of this file :
17 *
18 * To hold user-definable portion of STLport settings which may be overridden
19 * on per-project basis.
20 * Please note that if you use STLport iostreams (compiled library) then you have
21 * to use consistent settings when you compile STLport library and your project.
22 * Those settings are defined in host.h and have to be the same for a given
23 * STLport installation.
24 */
25
26
27/*==========================================================
28 * User-settable macros that control compilation:
29 * Features selection
30 *==========================================================*/
31
32/*
33 * Use this switch for embedded systems where no iostreams are available
34 * at all. STLport own iostreams will also get disabled automatically then.
35 * You can either use STLport iostreams, or no iostreams.
36 * If you want iostreams, you have to compile library in ../build/lib
37 * and supply resulting library at link time.
38 */
39/*
40#define _STLP_NO_IOSTREAMS 1
41*/
42
43/*
44 * Set _STLP_DEBUG to turn the "Debug Mode" on.
45 * That gets you checked iterators/ranges in the manner
46 * of "Safe STL". Very useful for debugging. Thread-safe.
47 * Please do not forget to link proper STLport library flavor
48 * (e.g libstlportstlg.so or libstlportstlg.a) when you set this flag
49 * in STLport iostreams mode, namespace customization guaranty that you
50 * link to the right library.
51 */
52/*
53#define _STLP_DEBUG 1
54*/
55/*
56 * You can also choose the debug level:
57 * STLport debug level: Default value
58 * Check only what the STLport implementation consider as invalid.
59 * It also change the iterator invalidation schema.
60 * Standard debug level: Check for all operations the standard consider as "undefined behavior"
61 * even if STlport implement it correctly. It also invalidates iterators
62 * more often.
63 */
64/*
65#define _STLP_DEBUG_LEVEL _STLP_STLPORT_DBG_LEVEL
66#define _STLP_DEBUG_LEVEL _STLP_STANDARD_DBG_LEVEL
67*/
68/* When an inconsistency is detected by the 'safe STL' the program will abort.
69 * If you prefer an exception define the following macro. The thrown exception
70 * will be the Standard runtime_error exception.
71 */
72/*
73#define _STLP_DEBUG_MODE_THROWS
74 */
75
76/*
77 * _STLP_NO_CUSTOM_IO : define this if you do not instantiate basic_xxx iostream
78 * classes with custom types (which is most likely the case). Custom means types
79 * other than char, wchar_t, char_traits<> and allocator<> like
80 * basic_ostream<my_char_type, my_traits<my_char_type> > or
81 * basic_string<char, char_traits<char>, my_allocator >
82 * When this option is on, most non-inline template functions definitions for iostreams
83 * are not seen by the client which saves a lot of compile time for most compilers,
84 * also object and executable size for some.
85 * Default is off, just not to break compilation for those who do use those types.
86 * That also guarantees that you still use optimized standard i/o when you compile
87 * your program without optimization. Option does not affect STLport library build; you
88 * may use the same binary library with and without this option, on per-project basis.
89 */
90/*
91#define _STLP_NO_CUSTOM_IO
92*/
93
94/*
95 * _STLP_NO_RELOPS_NAMESPACE: if defined, don't put the relational
96 * operator templates (>, <=, >=, !=) in namespace std::rel_ops, even
97 * if the compiler supports namespaces.
98 * Note : if the compiler do not support namespaces, those operators are not be provided by default,
99 * to simulate hiding them into rel_ops. This was proved to resolve many compiler bugs with ambiguity.
100 */
101/*
102#define _STLP_NO_RELOPS_NAMESPACE 1
103*/
104
105/*
106 * If STLport use its own namespace, see _STLP_NO_OWN_NAMESPACE in host.h, it will try
107 * by default to rename std:: for the user to stlport::. If you do not want this feature,
108 * please define the following switch and then use stlport::
109 */
110/*
111#define _STLP_DONT_REDEFINE_STD 1
112*/
113
114/*
115 * _STLP_WHOLE_NATIVE_STD : only meaningful if STLport uses its own namespace.
116 * Normally, STLport only imports necessary components from native std:: namespace.
117 * You might want everything from std:: being available in std:: namespace when you
118 * include corresponding STLport header (like STLport <map> provides std::map as well, etc.),
119 * if you are going to use both stlport:: and std:: components in your code.
120 * Otherwise this option is not recommended as it increases the size of your object files
121 * and slows down compilation.
122 * Beware, if you do not use STLport iostream (_STLP_NO_IOSTREAMS above), ask STLport to
123 * not rename std:: in stlport:: and try to have access to whole native Standard stuff then
124 * STLport will only throw exceptions from the std namespace and not from stlport.
125 * For instance a problem in stlport::vector::at will throw a std::out_of_range exception
126 * and not a stlport::out_of_range.
127 * Notice that STLport exceptions inherits from std::exception.
128 */
129/*
130#define _STLP_WHOLE_NATIVE_STD
131*/
132
133/*
134 * Use this option to catch uninitialized members in your classes.
135 * When it is set, construct() and destroy() fill the class storage
136 * with _STLP_SHRED_BYTE (see below).
137 * Note : _STLP_DEBUG and _STLP_DEBUG_ALLOC don't set this option automatically.
138 */
139/*
140#define _STLP_DEBUG_UNINITIALIZED 1
141#define _STLP_DEBUG_ALLOC 1
142*/
143
144/*
145 * Uncomment and provide a definition for the byte with which raw memory
146 * will be filled if _STLP_DEBUG_ALLOC or _STLP_DEBUG_UNINITIALIZED is defined.
147 * Choose a value which is likely to cause a noticeable problem if dereferenced
148 * or otherwise abused. A good value may already be defined for your platform.
149 */
150/*
151#define _STLP_SHRED_BYTE 0xA3
152*/
153
154/*
155 * This option is for gcc users only and only affects systems where native linker
156 * does not let gcc to implement automatic instantiation of static template data members/
157 * It is being put in this file as there is no way to check if we are using GNU ld automatically,
158 * so it becomes user's responsibility.
159 */
160#ifdef __MINGW32__
161# define _STLP_GCC_USES_GNU_LD
162#endif
163
164/*==========================================================
165 * Compatibility section
166 *==========================================================*/
167
168/*
169 * Define this macro to disable anachronistic constructs (like the ones used in HP STL and
170 * not included in final standard, etc.
171 */
172/*
173#define _STLP_NO_ANACHRONISMS 1
174*/
175
176/*
177 * Define this macro to disable STLport extensions (for example, to make sure your code will
178 * compile with some other implementation )
179 */
180/*
181#define _STLP_NO_EXTENSIONS 1
182*/
183
184/*
185 * You should define this macro if compiling with MFC - STLport <stl/config/_windows.h>
186 * then include <afx.h> instead of <windows.h> to get synchronisation primitives
187 */
188/*
189#define _STLP_USE_MFC 1
190*/
191
192/*
193 * boris : this setting is here as we cannot detect precense of new Platform SDK automatically
194 * If you are using new PSDK with VC++ 6.0 or lower,
195 * please define this to get correct prototypes for InterlockedXXX functions
196 */
197#define _STLP_NEW_PLATFORM_SDK 1
198
199/*
200 * For the same reason as the one above we are not able to detect easily use
201 * of the compiler coming with the Platform SDK instead of the one coming with
202 * a Microsoft Visual Studio release. This change native C/C++ library location
203 * and implementation, please define this to get correct STLport configuration.
204 */
205#define _STLP_USING_PLATFORM_SDK_COMPILER 1
206
207/*
208 * Some compilers support the automatic linking feature.
209 * Uncomment the following if you prefer to specify the STLport library
210 * to link with yourself.
211 * For the moment, this feature is only supported and implemented within STLport
212 * by the Microsoft compilers.
213 */
214#define _STLP_DONT_USE_AUTO_LINK 1
215
216/*
217 * If you customize the STLport generated library names don't forget to give
218 * the motif you used during configuration here if you still want the auto link
219 * to work. (Do not remove double quotes in the macro value)
220 */
221/*
222#define _STLP_LIB_NAME_MOTIF "???"
223 */
224
225/*
226 * Uncomment to get feedback at compilation time about result of build environment
227 * introspection.
228 */
229/*
230#define _STLP_VERBOSE 1
231*/
232
233/*
234 * Use minimum set of default arguments on template classes that have more
235 * than one - for example map<>, set<>.
236 * This has effect only if _STLP_LIMITED_DEFAULT_TEMPLATES is on.
237 * If _STLP_MINIMUM_DEFAULT_TEMPLATE_PARAMS is set, you'll be able to compile
238 * set<T> with those compilers, but you'll have to use __set__<T, less<T>>
239 *
240 * Affects : map<>, multimap<>, set<>, multiset<>, hash_*<>,
241 * queue<>, priority_queue<>, stack<>, istream_iterator<>
242 */
243/*
244#define _STLP_MINIMUM_DEFAULT_TEMPLATE_PARAMS 1
245*/
246
247/*
248 * The agregation of strings using the + operator is an expensive operation
249 * as it requires construction of temporary objects that need memory allocation
250 * and deallocation. The problem can be even more important if you are adding
251 * several strings together in a single expression. To avoid this problem STLport
252 * implement expression template. With this technique addition of 2 strings is not
253 * a string anymore but a temporary object having a reference to each of the
254 * original strings involved in the expression. This object carry information
255 * directly to the destination string to set its size correctly and only make
256 * a single call to the allocator. This technique also works for the addition of
257 * N elements where elements are basic_string, C string or a single character.
258 * The drawback can be longer compilation time and bigger executable size.
259 * Another problem is that some compilers (gcc) fail to use string proxy object
260 * if do with class derived from string (see unit tests for details).
261 * STLport rebuild: Yes
262 */
263/*
264#define _STLP_USE_TEMPLATE_EXPRESSION 1
265*/
266
267
268/*
269 * By default the STLport basic_string implementation use a little static buffer
270 * (of 16 chars when writing this doc) to avoid systematically memory allocation
271 * in case of little basic_string. The drawback of such a method is bigger
272 * basic_string size and some performance penalty for method like swap. If you
273 * prefer systematical dynamic allocation turn on this macro.
274 * STLport rebuild: Yes
275 */
276/*
277#define _STLP_DONT_USE_SHORT_STRING_OPTIM 1
278*/
279
280/*
281 * To reduce the famous code bloat trouble due to the use of templates STLport grant
282 * a specialization of some containers for pointer types. So all instanciations
283 * of those containers with a pointer type will use the same implementation based on
284 * a container of void*. This feature has shown very good result on object files size
285 * but after link phase and optimization you will only experiment benefit if you use
286 * many container with pointer types.
287 * There are however a number of limitation to use this option:
288 * - with compilers not supporting partial template specialization feature, you won't
289 * be able to access some nested container types like iterator as long as the
290 * definition of the type used to instanciate the container will be incomplete
291 * (see IncompleteClass definition in test/unit/vector_test.cpp).
292 * - you won't be able to use complex Standard allocator implementations which are
293 * allocators having pointer nested type not being a real C pointer.
294 */
295/*
296#define _STLP_USE_PTR_SPECIALIZATIONS 1
297*/
298
299/*
300 * To achieve many different optimizations within the template implementations STLport
301 * uses some type traits technique. With this macro you can ask STLport to use the famous
302 * boost type traits rather than the internal one. The advantages are more compiler
303 * integration and a better support. If you only define this macro once the STLport has been
304 * built you just have to add the boost install path within your include path. If you want
305 * to use this feature at STLport built time you will have to define the
306 * STLP_BUILD_BOOST_PATH enrironment variable with the value of the boost library path.
307 */
308
309/*
310#define _STLP_USE_BOOST_SUPPORT 1
311*/
312
313
314/*==========================================================*/
315
316/*
317 Local Variables:
318 mode: C++
319 End:
320*/