]> git.buserror.net Git - polintos/scott/priv.git/blob - include/c++/stl/stl/config/user_config.h
Add STLport 5.1.4
[polintos/scott/priv.git] / include / c++ / stl / stl / config / user_config.h
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 _STLP_USE_OWN_NAMESPACE is in effect, STLport by default will try
107  * 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 in _STLP_USE_OWN_NAMESPACE mode.
116  * Normally, STLport only imports necessary components from native std:: namespace -
117  * those not yet provided by STLport (<iostream>, <complex>, etc.)
118  * and their dependencies (<string>, <stdexcept>).
119  * You might want everything from std:: being available in std:: namespace when you
120  * include corresponding STLport header (like STLport <map> provides std::map as well, etc.),
121  * if you are going to use both stlport:: and std:: components in your code.
122  * Otherwise this option is not recommended as it increases the size of your object files
123  * and slows down compilation.
124  */
125 /*
126 #define _STLP_WHOLE_NATIVE_STD
127 */
128
129 /*
130  * Use this option to catch uninitialized members in your classes.
131  * When it is set, construct() and destroy() fill the class storage
132  * with _STLP_SHRED_BYTE (see below).
133  * Note : _STLP_DEBUG and _STLP_DEBUG_ALLOC don't set this option automatically.
134  */
135 /*
136 #define _STLP_DEBUG_UNINITIALIZED 1
137 #define _STLP_DEBUG_ALLOC 1
138 */
139
140 /*
141  * Uncomment and provide a definition for the byte with which raw memory
142  * will be filled if _STLP_DEBUG_ALLOC or _STLP_DEBUG_UNINITIALIZED is defined.
143  * Choose a value which is likely to cause a noticeable problem if dereferenced
144  * or otherwise abused. A good value may already be defined for your platform.
145  */
146 /*
147 #define _STLP_SHRED_BYTE 0xA3
148 */
149
150 /*
151  *  This option is for gcc users only and only affects systems where native linker
152  *  does not let gcc to implement automatic instantiation of static template data members/
153  *  It is being put in this file as there is no way to check if we are using GNU ld automatically,
154  *  so it becomes user's responsibility.
155  */
156 /*
157 #define _STLP_GCC_USES_GNU_LD
158 */
159
160 /*==========================================================
161  * Compatibility section
162  *==========================================================*/
163
164 /*
165  *  Define this macro to disable anachronistic constructs (like the ones used in HP STL and
166  *  not included in final standard, etc.
167  */
168 /*
169 #define _STLP_NO_ANACHRONISMS 1
170 */
171
172 /*
173  *  Define this macro to disable STLport extensions (for example, to make sure your code will
174  *  compile with some other implementation )
175  */
176 /*
177 #define _STLP_NO_EXTENSIONS 1
178 */
179
180 /*
181  * You should define this macro if compiling with MFC - STLport <stl/config/_windows.h>
182  * then include <afx.h> instead of <windows.h> to get synchronisation primitives
183  */
184 /*
185 #define _STLP_USE_MFC 1
186 */
187
188 /*
189  * boris : this setting is here as we cannot detect precense of new Platform SDK automatically
190  * If you are using new PSDK with VC++ 6.0 or lower,
191  * please define this to get correct prototypes for InterlockedXXX functions
192  */
193 /*
194 #define _STLP_NEW_PLATFORM_SDK 1
195 */
196
197 /*
198  * For the same reason as the one above we are not able to detect easily use
199  * of the compiler coming with the Platform SDK instead of the one coming with
200  * a Microsoft Visual Studio release. This change native C/C++ library location
201  * and implementation, please define this to get correct STLport configuration.
202  */
203 /*
204 #define _STLP_USING_PLATFORM_SDK_COMPILER 1
205 */
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 /*
215 #define _STLP_DONT_USE_AUTO_LINK 1
216 */
217
218 /*
219  * If you customize the STLport generated library names don't forget to give
220  * the motif you used during configuration here if you still want the auto link
221  * to work. (Do not remove double quotes in the macro value)
222  */
223 /*
224 #define _STLP_LIB_NAME_MOTIF "???"
225  */
226
227 /*
228  * When using automatic linking (see above), output a message that tells the
229  * user which lib is getting linked via 'pragma message(..)'.
230  * This setting has no effect if automatic linking is not active.
231  */
232 /*
233 #define _STLP_VERBOSE_AUTO_LINK 1
234 */
235
236 /*
237  * Use minimum set of default arguments on template classes that have more
238  * than one - for example map<>, set<>.
239  * This has effect only if _STLP_LIMITED_DEFAULT_TEMPLATES is on.
240  * If _STLP_MINIMUM_DEFAULT_TEMPLATE_PARAMS is set, you'll be able to compile
241  * set<T> with those compilers, but you'll have to use __set__<T, less<T>>
242  *
243  * Affects : map<>, multimap<>, set<>, multiset<>, hash_*<>,
244  * queue<>, priority_queue<>, stack<>, istream_iterator<>
245  */
246 /*
247 #define _STLP_MINIMUM_DEFAULT_TEMPLATE_PARAMS 1
248 */
249
250 /*
251  * The agregation of strings using the + operator is an expensive operation
252  * as it requires construction of temporary objects that need memory allocation
253  * and deallocation. The problem can be even more important if you are adding
254  * several strings together in a single expression. To avoid this problem STLport
255  * implement expression template. With this technique addition of 2 strings is not
256  * a string anymore but a temporary object having a reference to each of the
257  * original strings involved in the expression. This object carry information
258  * directly to the destination string to set its size correctly and only make
259  * a single call to the allocator. This technique also works for the addition of
260  * N elements where elements are basic_string, C string or a single character.
261  * The drawback can be longer compilation time and bigger executable size.
262  * STLport rebuild: Yes
263  */
264 /*
265 #define _STLP_USE_TEMPLATE_EXPRESSION 1
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 show 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  */
288 /*
289 #define _STLP_USE_PTR_SPECIALIZATIONS 1
290 */
291
292 /*
293  * To achieve many different optimizations within the template implementations STLport
294  * uses some type traits technique. With this macro you can ask STLport to use the famous
295  * boost type traits rather than the internal one. The advantages are more compiler
296  * integration and a better support. If you only define this macro once the STLport has been
297  * built you just have to add the boost install path within your include path. If you want
298  * to use this feature at STLport built time you will have to define the
299  * STLP_BUILD_BOOST_PATH enrironment variable with the value of the boost library path.
300  */
301 /*
302 #define _STLP_USE_BOOST_SUPPORT 1
303 */
304
305 /*==========================================================*/
306
307 /*
308   Local Variables:
309   mode: C++
310   End:
311 */