Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
michael@0 | 1 | /* |
michael@0 | 2 | ********************************************************************** |
michael@0 | 3 | * Copyright (C) 2002-2013, International Business Machines |
michael@0 | 4 | * Corporation and others. All Rights Reserved. |
michael@0 | 5 | ********************************************************************** |
michael@0 | 6 | * file name: uconfig.h |
michael@0 | 7 | * encoding: US-ASCII |
michael@0 | 8 | * tab size: 8 (not used) |
michael@0 | 9 | * indentation:4 |
michael@0 | 10 | * |
michael@0 | 11 | * created on: 2002sep19 |
michael@0 | 12 | * created by: Markus W. Scherer |
michael@0 | 13 | */ |
michael@0 | 14 | |
michael@0 | 15 | #ifndef __UCONFIG_H__ |
michael@0 | 16 | #define __UCONFIG_H__ |
michael@0 | 17 | |
michael@0 | 18 | |
michael@0 | 19 | /*! |
michael@0 | 20 | * \file |
michael@0 | 21 | * \brief User-configurable settings |
michael@0 | 22 | * |
michael@0 | 23 | * Miscellaneous switches: |
michael@0 | 24 | * |
michael@0 | 25 | * A number of macros affect a variety of minor aspects of ICU. |
michael@0 | 26 | * Most of them used to be defined elsewhere (e.g., in utypes.h or platform.h) |
michael@0 | 27 | * and moved here to make them easier to find. |
michael@0 | 28 | * |
michael@0 | 29 | * Switches for excluding parts of ICU library code modules: |
michael@0 | 30 | * |
michael@0 | 31 | * Changing these macros allows building partial, smaller libraries for special purposes. |
michael@0 | 32 | * By default, all modules are built. |
michael@0 | 33 | * The switches are fairly coarse, controlling large modules. |
michael@0 | 34 | * Basic services cannot be turned off. |
michael@0 | 35 | * |
michael@0 | 36 | * Building with any of these options does not guarantee that the |
michael@0 | 37 | * ICU build process will completely work. It is recommended that |
michael@0 | 38 | * the ICU libraries and data be built using the normal build. |
michael@0 | 39 | * At that time you should remove the data used by those services. |
michael@0 | 40 | * After building the ICU data library, you should rebuild the ICU |
michael@0 | 41 | * libraries with these switches customized to your needs. |
michael@0 | 42 | * |
michael@0 | 43 | * @stable ICU 2.4 |
michael@0 | 44 | */ |
michael@0 | 45 | |
michael@0 | 46 | /** |
michael@0 | 47 | * If this switch is defined, ICU will attempt to load a header file named "uconfig_local.h" |
michael@0 | 48 | * prior to determining default settings for uconfig variables. |
michael@0 | 49 | * |
michael@0 | 50 | * @internal ICU 4.0 |
michael@0 | 51 | */ |
michael@0 | 52 | #if defined(UCONFIG_USE_LOCAL) |
michael@0 | 53 | #include "uconfig_local.h" |
michael@0 | 54 | #endif |
michael@0 | 55 | |
michael@0 | 56 | /** |
michael@0 | 57 | * \def U_DEBUG |
michael@0 | 58 | * Determines whether to include debugging code. |
michael@0 | 59 | * Automatically set on Windows, but most compilers do not have |
michael@0 | 60 | * related predefined macros. |
michael@0 | 61 | * @internal |
michael@0 | 62 | */ |
michael@0 | 63 | #ifdef U_DEBUG |
michael@0 | 64 | /* Use the predefined value. */ |
michael@0 | 65 | #elif defined(_DEBUG) |
michael@0 | 66 | /* |
michael@0 | 67 | * _DEBUG is defined by Visual Studio debug compilation. |
michael@0 | 68 | * Do *not* test for its NDEBUG macro: It is an orthogonal macro |
michael@0 | 69 | * which disables assert(). |
michael@0 | 70 | */ |
michael@0 | 71 | # define U_DEBUG 1 |
michael@0 | 72 | # else |
michael@0 | 73 | # define U_DEBUG 0 |
michael@0 | 74 | #endif |
michael@0 | 75 | |
michael@0 | 76 | /** |
michael@0 | 77 | * Determines wheter to enable auto cleanup of libraries. |
michael@0 | 78 | * @internal |
michael@0 | 79 | */ |
michael@0 | 80 | #ifndef UCLN_NO_AUTO_CLEANUP |
michael@0 | 81 | #define UCLN_NO_AUTO_CLEANUP 1 |
michael@0 | 82 | #endif |
michael@0 | 83 | |
michael@0 | 84 | /** |
michael@0 | 85 | * \def U_DISABLE_RENAMING |
michael@0 | 86 | * Determines whether to disable renaming or not. |
michael@0 | 87 | * @internal |
michael@0 | 88 | */ |
michael@0 | 89 | #ifndef U_DISABLE_RENAMING |
michael@0 | 90 | #define U_DISABLE_RENAMING 0 |
michael@0 | 91 | #endif |
michael@0 | 92 | |
michael@0 | 93 | /** |
michael@0 | 94 | * \def U_NO_DEFAULT_INCLUDE_UTF_HEADERS |
michael@0 | 95 | * Determines whether utypes.h includes utf.h, utf8.h, utf16.h and utf_old.h. |
michael@0 | 96 | * utypes.h includes those headers if this macro is defined to 0. |
michael@0 | 97 | * Otherwise, each those headers must be included explicitly when using one of their macros. |
michael@0 | 98 | * Defaults to 0 for backward compatibility, except inside ICU. |
michael@0 | 99 | * @stable ICU 49 |
michael@0 | 100 | */ |
michael@0 | 101 | #ifdef U_NO_DEFAULT_INCLUDE_UTF_HEADERS |
michael@0 | 102 | /* Use the predefined value. */ |
michael@0 | 103 | #elif defined(U_COMBINED_IMPLEMENTATION) || defined(U_COMMON_IMPLEMENTATION) || defined(U_I18N_IMPLEMENTATION) || \ |
michael@0 | 104 | defined(U_IO_IMPLEMENTATION) || defined(U_LAYOUT_IMPLEMENTATION) || defined(U_LAYOUTEX_IMPLEMENTATION) || \ |
michael@0 | 105 | defined(U_TOOLUTIL_IMPLEMENTATION) |
michael@0 | 106 | # define U_NO_DEFAULT_INCLUDE_UTF_HEADERS 1 |
michael@0 | 107 | #else |
michael@0 | 108 | # define U_NO_DEFAULT_INCLUDE_UTF_HEADERS 0 |
michael@0 | 109 | #endif |
michael@0 | 110 | |
michael@0 | 111 | /** |
michael@0 | 112 | * \def U_OVERRIDE_CXX_ALLOCATION |
michael@0 | 113 | * Determines whether to override new and delete. |
michael@0 | 114 | * ICU is normally built such that all of its C++ classes, via their UMemory base, |
michael@0 | 115 | * override operators new and delete to use its internal, customizable, |
michael@0 | 116 | * non-exception-throwing memory allocation functions. (Default value 1 for this macro.) |
michael@0 | 117 | * |
michael@0 | 118 | * This is especially important when the application and its libraries use multiple heaps. |
michael@0 | 119 | * For example, on Windows, this allows the ICU DLL to be used by |
michael@0 | 120 | * applications that statically link the C Runtime library. |
michael@0 | 121 | * |
michael@0 | 122 | * @stable ICU 2.2 |
michael@0 | 123 | */ |
michael@0 | 124 | #ifndef U_OVERRIDE_CXX_ALLOCATION |
michael@0 | 125 | #define U_OVERRIDE_CXX_ALLOCATION 1 |
michael@0 | 126 | #endif |
michael@0 | 127 | |
michael@0 | 128 | /** |
michael@0 | 129 | * \def U_ENABLE_TRACING |
michael@0 | 130 | * Determines whether to enable tracing. |
michael@0 | 131 | * @internal |
michael@0 | 132 | */ |
michael@0 | 133 | #ifndef U_ENABLE_TRACING |
michael@0 | 134 | #define U_ENABLE_TRACING 0 |
michael@0 | 135 | #endif |
michael@0 | 136 | |
michael@0 | 137 | /** |
michael@0 | 138 | * \def U_ENABLE_DYLOAD |
michael@0 | 139 | * Whether to enable Dynamic loading in ICU. |
michael@0 | 140 | * @internal |
michael@0 | 141 | */ |
michael@0 | 142 | #ifndef U_ENABLE_DYLOAD |
michael@0 | 143 | #define U_ENABLE_DYLOAD 1 |
michael@0 | 144 | #endif |
michael@0 | 145 | |
michael@0 | 146 | /** |
michael@0 | 147 | * \def U_CHECK_DYLOAD |
michael@0 | 148 | * Whether to test Dynamic loading as an OS capability. |
michael@0 | 149 | * @internal |
michael@0 | 150 | */ |
michael@0 | 151 | #ifndef U_CHECK_DYLOAD |
michael@0 | 152 | #define U_CHECK_DYLOAD 1 |
michael@0 | 153 | #endif |
michael@0 | 154 | |
michael@0 | 155 | |
michael@0 | 156 | /** |
michael@0 | 157 | * \def U_DEFAULT_SHOW_DRAFT |
michael@0 | 158 | * Do we allow ICU users to use the draft APIs by default? |
michael@0 | 159 | * @internal |
michael@0 | 160 | */ |
michael@0 | 161 | #ifndef U_DEFAULT_SHOW_DRAFT |
michael@0 | 162 | #define U_DEFAULT_SHOW_DRAFT 1 |
michael@0 | 163 | #endif |
michael@0 | 164 | |
michael@0 | 165 | /*===========================================================================*/ |
michael@0 | 166 | /* Custom icu entry point renaming */ |
michael@0 | 167 | /*===========================================================================*/ |
michael@0 | 168 | |
michael@0 | 169 | /** |
michael@0 | 170 | * \def U_HAVE_LIB_SUFFIX |
michael@0 | 171 | * 1 if a custom library suffix is set. |
michael@0 | 172 | * @internal |
michael@0 | 173 | */ |
michael@0 | 174 | #ifdef U_HAVE_LIB_SUFFIX |
michael@0 | 175 | /* Use the predefined value. */ |
michael@0 | 176 | #elif defined(U_LIB_SUFFIX_C_NAME) |
michael@0 | 177 | # define U_HAVE_LIB_SUFFIX 1 |
michael@0 | 178 | #endif |
michael@0 | 179 | |
michael@0 | 180 | /** |
michael@0 | 181 | * \def U_LIB_SUFFIX_C_NAME_STRING |
michael@0 | 182 | * Defines the library suffix as a string with C syntax. |
michael@0 | 183 | * @internal |
michael@0 | 184 | */ |
michael@0 | 185 | #ifdef U_LIB_SUFFIX_C_NAME_STRING |
michael@0 | 186 | /* Use the predefined value. */ |
michael@0 | 187 | #elif defined(U_LIB_SUFFIX_C_NAME) |
michael@0 | 188 | # define U_LIB_SUFFIX_C_NAME_STRING #U_LIB_SUFFIX_C_NAME |
michael@0 | 189 | #else |
michael@0 | 190 | # define U_LIB_SUFFIX_C_NAME_STRING "" |
michael@0 | 191 | #endif |
michael@0 | 192 | |
michael@0 | 193 | /* common/i18n library switches --------------------------------------------- */ |
michael@0 | 194 | |
michael@0 | 195 | /** |
michael@0 | 196 | * \def UCONFIG_ONLY_COLLATION |
michael@0 | 197 | * This switch turns off modules that are not needed for collation. |
michael@0 | 198 | * |
michael@0 | 199 | * It does not turn off legacy conversion because that is necessary |
michael@0 | 200 | * for ICU to work on EBCDIC platforms (for the default converter). |
michael@0 | 201 | * If you want "only collation" and do not build for EBCDIC, |
michael@0 | 202 | * then you can define UCONFIG_NO_LEGACY_CONVERSION 1 as well. |
michael@0 | 203 | * |
michael@0 | 204 | * @stable ICU 2.4 |
michael@0 | 205 | */ |
michael@0 | 206 | #ifndef UCONFIG_ONLY_COLLATION |
michael@0 | 207 | # define UCONFIG_ONLY_COLLATION 0 |
michael@0 | 208 | #endif |
michael@0 | 209 | |
michael@0 | 210 | #if UCONFIG_ONLY_COLLATION |
michael@0 | 211 | /* common library */ |
michael@0 | 212 | # define UCONFIG_NO_BREAK_ITERATION 1 |
michael@0 | 213 | # define UCONFIG_NO_IDNA 1 |
michael@0 | 214 | |
michael@0 | 215 | /* i18n library */ |
michael@0 | 216 | # if UCONFIG_NO_COLLATION |
michael@0 | 217 | # error Contradictory collation switches in uconfig.h. |
michael@0 | 218 | # endif |
michael@0 | 219 | # define UCONFIG_NO_FORMATTING 1 |
michael@0 | 220 | # define UCONFIG_NO_TRANSLITERATION 1 |
michael@0 | 221 | # define UCONFIG_NO_REGULAR_EXPRESSIONS 1 |
michael@0 | 222 | #endif |
michael@0 | 223 | |
michael@0 | 224 | /* common library switches -------------------------------------------------- */ |
michael@0 | 225 | |
michael@0 | 226 | /** |
michael@0 | 227 | * \def UCONFIG_NO_FILE_IO |
michael@0 | 228 | * This switch turns off all file access in the common library |
michael@0 | 229 | * where file access is only used for data loading. |
michael@0 | 230 | * ICU data must then be provided in the form of a data DLL (or with an |
michael@0 | 231 | * equivalent way to link to the data residing in an executable, |
michael@0 | 232 | * as in building a combined library with both the common library's code and |
michael@0 | 233 | * the data), or via udata_setCommonData(). |
michael@0 | 234 | * Application data must be provided via udata_setAppData() or by using |
michael@0 | 235 | * "open" functions that take pointers to data, for example ucol_openBinary(). |
michael@0 | 236 | * |
michael@0 | 237 | * File access is not used at all in the i18n library. |
michael@0 | 238 | * |
michael@0 | 239 | * File access cannot be turned off for the icuio library or for the ICU |
michael@0 | 240 | * test suites and ICU tools. |
michael@0 | 241 | * |
michael@0 | 242 | * @stable ICU 3.6 |
michael@0 | 243 | */ |
michael@0 | 244 | #ifndef UCONFIG_NO_FILE_IO |
michael@0 | 245 | # define UCONFIG_NO_FILE_IO 0 |
michael@0 | 246 | #endif |
michael@0 | 247 | |
michael@0 | 248 | /** |
michael@0 | 249 | * \def UCONFIG_NO_CONVERSION |
michael@0 | 250 | * ICU will not completely build with this switch turned on. |
michael@0 | 251 | * This switch turns off all converters. |
michael@0 | 252 | * |
michael@0 | 253 | * You may want to use this together with U_CHARSET_IS_UTF8 defined to 1 |
michael@0 | 254 | * in utypes.h if char* strings in your environment are always in UTF-8. |
michael@0 | 255 | * |
michael@0 | 256 | * @stable ICU 3.2 |
michael@0 | 257 | * @see U_CHARSET_IS_UTF8 |
michael@0 | 258 | */ |
michael@0 | 259 | #ifndef UCONFIG_NO_CONVERSION |
michael@0 | 260 | # define UCONFIG_NO_CONVERSION 0 |
michael@0 | 261 | #endif |
michael@0 | 262 | |
michael@0 | 263 | #if UCONFIG_NO_CONVERSION |
michael@0 | 264 | # define UCONFIG_NO_LEGACY_CONVERSION 1 |
michael@0 | 265 | #endif |
michael@0 | 266 | |
michael@0 | 267 | /** |
michael@0 | 268 | * \def UCONFIG_NO_LEGACY_CONVERSION |
michael@0 | 269 | * This switch turns off all converters except for |
michael@0 | 270 | * - Unicode charsets (UTF-7/8/16/32, CESU-8, SCSU, BOCU-1) |
michael@0 | 271 | * - US-ASCII |
michael@0 | 272 | * - ISO-8859-1 |
michael@0 | 273 | * |
michael@0 | 274 | * Turning off legacy conversion is not possible on EBCDIC platforms |
michael@0 | 275 | * because they need ibm-37 or ibm-1047 default converters. |
michael@0 | 276 | * |
michael@0 | 277 | * @stable ICU 2.4 |
michael@0 | 278 | */ |
michael@0 | 279 | #ifndef UCONFIG_NO_LEGACY_CONVERSION |
michael@0 | 280 | # define UCONFIG_NO_LEGACY_CONVERSION 0 |
michael@0 | 281 | #endif |
michael@0 | 282 | |
michael@0 | 283 | /** |
michael@0 | 284 | * \def UCONFIG_NO_NORMALIZATION |
michael@0 | 285 | * This switch turns off normalization. |
michael@0 | 286 | * It implies turning off several other services as well, for example |
michael@0 | 287 | * collation and IDNA. |
michael@0 | 288 | * |
michael@0 | 289 | * @stable ICU 2.6 |
michael@0 | 290 | */ |
michael@0 | 291 | #ifndef UCONFIG_NO_NORMALIZATION |
michael@0 | 292 | # define UCONFIG_NO_NORMALIZATION 0 |
michael@0 | 293 | #elif UCONFIG_NO_NORMALIZATION |
michael@0 | 294 | /* common library */ |
michael@0 | 295 | /* ICU 50 CJK dictionary BreakIterator uses normalization */ |
michael@0 | 296 | # define UCONFIG_NO_BREAK_ITERATION 1 |
michael@0 | 297 | /* IDNA (UTS #46) is implemented via normalization */ |
michael@0 | 298 | # define UCONFIG_NO_IDNA 1 |
michael@0 | 299 | |
michael@0 | 300 | /* i18n library */ |
michael@0 | 301 | # if UCONFIG_ONLY_COLLATION |
michael@0 | 302 | # error Contradictory collation switches in uconfig.h. |
michael@0 | 303 | # endif |
michael@0 | 304 | # define UCONFIG_NO_COLLATION 1 |
michael@0 | 305 | # define UCONFIG_NO_TRANSLITERATION 1 |
michael@0 | 306 | #endif |
michael@0 | 307 | |
michael@0 | 308 | /** |
michael@0 | 309 | * \def UCONFIG_NO_BREAK_ITERATION |
michael@0 | 310 | * This switch turns off break iteration. |
michael@0 | 311 | * |
michael@0 | 312 | * @stable ICU 2.4 |
michael@0 | 313 | */ |
michael@0 | 314 | #ifndef UCONFIG_NO_BREAK_ITERATION |
michael@0 | 315 | # define UCONFIG_NO_BREAK_ITERATION 0 |
michael@0 | 316 | #endif |
michael@0 | 317 | |
michael@0 | 318 | /** |
michael@0 | 319 | * \def UCONFIG_NO_IDNA |
michael@0 | 320 | * This switch turns off IDNA. |
michael@0 | 321 | * |
michael@0 | 322 | * @stable ICU 2.6 |
michael@0 | 323 | */ |
michael@0 | 324 | #ifndef UCONFIG_NO_IDNA |
michael@0 | 325 | # define UCONFIG_NO_IDNA 0 |
michael@0 | 326 | #endif |
michael@0 | 327 | |
michael@0 | 328 | /** |
michael@0 | 329 | * \def UCONFIG_MSGPAT_DEFAULT_APOSTROPHE_MODE |
michael@0 | 330 | * Determines the default UMessagePatternApostropheMode. |
michael@0 | 331 | * See the documentation for that enum. |
michael@0 | 332 | * |
michael@0 | 333 | * @stable ICU 4.8 |
michael@0 | 334 | */ |
michael@0 | 335 | #ifndef UCONFIG_MSGPAT_DEFAULT_APOSTROPHE_MODE |
michael@0 | 336 | # define UCONFIG_MSGPAT_DEFAULT_APOSTROPHE_MODE UMSGPAT_APOS_DOUBLE_OPTIONAL |
michael@0 | 337 | #endif |
michael@0 | 338 | |
michael@0 | 339 | /* i18n library switches ---------------------------------------------------- */ |
michael@0 | 340 | |
michael@0 | 341 | /** |
michael@0 | 342 | * \def UCONFIG_NO_COLLATION |
michael@0 | 343 | * This switch turns off collation and collation-based string search. |
michael@0 | 344 | * |
michael@0 | 345 | * @stable ICU 2.4 |
michael@0 | 346 | */ |
michael@0 | 347 | #ifndef UCONFIG_NO_COLLATION |
michael@0 | 348 | # define UCONFIG_NO_COLLATION 0 |
michael@0 | 349 | #endif |
michael@0 | 350 | |
michael@0 | 351 | /** |
michael@0 | 352 | * \def UCONFIG_NO_FORMATTING |
michael@0 | 353 | * This switch turns off formatting and calendar/timezone services. |
michael@0 | 354 | * |
michael@0 | 355 | * @stable ICU 2.4 |
michael@0 | 356 | */ |
michael@0 | 357 | #ifndef UCONFIG_NO_FORMATTING |
michael@0 | 358 | # define UCONFIG_NO_FORMATTING 0 |
michael@0 | 359 | #endif |
michael@0 | 360 | |
michael@0 | 361 | /** |
michael@0 | 362 | * \def UCONFIG_NO_TRANSLITERATION |
michael@0 | 363 | * This switch turns off transliteration. |
michael@0 | 364 | * |
michael@0 | 365 | * @stable ICU 2.4 |
michael@0 | 366 | */ |
michael@0 | 367 | #ifndef UCONFIG_NO_TRANSLITERATION |
michael@0 | 368 | # define UCONFIG_NO_TRANSLITERATION 0 |
michael@0 | 369 | #endif |
michael@0 | 370 | |
michael@0 | 371 | /** |
michael@0 | 372 | * \def UCONFIG_NO_REGULAR_EXPRESSIONS |
michael@0 | 373 | * This switch turns off regular expressions. |
michael@0 | 374 | * |
michael@0 | 375 | * @stable ICU 2.4 |
michael@0 | 376 | */ |
michael@0 | 377 | #ifndef UCONFIG_NO_REGULAR_EXPRESSIONS |
michael@0 | 378 | # define UCONFIG_NO_REGULAR_EXPRESSIONS 0 |
michael@0 | 379 | #endif |
michael@0 | 380 | |
michael@0 | 381 | /** |
michael@0 | 382 | * \def UCONFIG_NO_SERVICE |
michael@0 | 383 | * This switch turns off service registration. |
michael@0 | 384 | * |
michael@0 | 385 | * @stable ICU 3.2 |
michael@0 | 386 | */ |
michael@0 | 387 | #ifndef UCONFIG_NO_SERVICE |
michael@0 | 388 | # define UCONFIG_NO_SERVICE 0 |
michael@0 | 389 | #endif |
michael@0 | 390 | |
michael@0 | 391 | /** |
michael@0 | 392 | * \def UCONFIG_HAVE_PARSEALLINPUT |
michael@0 | 393 | * This switch turns on the "parse all input" attribute. Binary incompatible. |
michael@0 | 394 | * |
michael@0 | 395 | * @internal |
michael@0 | 396 | */ |
michael@0 | 397 | #ifndef UCONFIG_HAVE_PARSEALLINPUT |
michael@0 | 398 | # define UCONFIG_HAVE_PARSEALLINPUT 1 |
michael@0 | 399 | #endif |
michael@0 | 400 | |
michael@0 | 401 | |
michael@0 | 402 | /** |
michael@0 | 403 | * \def UCONFIG_FORMAT_FASTPATHS_49 |
michael@0 | 404 | * This switch turns on other formatting fastpaths. Binary incompatible in object DecimalFormat and DecimalFormatSymbols |
michael@0 | 405 | * |
michael@0 | 406 | * @internal |
michael@0 | 407 | */ |
michael@0 | 408 | #ifndef UCONFIG_FORMAT_FASTPATHS_49 |
michael@0 | 409 | # define UCONFIG_FORMAT_FASTPATHS_49 1 |
michael@0 | 410 | #endif |
michael@0 | 411 | |
michael@0 | 412 | #endif |