| OLD | NEW |
| 1 /* | 1 /* |
| 2 ****************************************************************************** | 2 ****************************************************************************** |
| 3 * | 3 * |
| 4 * Copyright (C) 1997-2010, International Business Machines | 4 * Copyright (C) 1997-2010, International Business Machines |
| 5 * Corporation and others. All Rights Reserved. | 5 * Corporation and others. All Rights Reserved. |
| 6 * | 6 * |
| 7 ****************************************************************************** | 7 ****************************************************************************** |
| 8 * | 8 * |
| 9 * Note: autoconf creates platform.h from platform.h.in at configure time. | 9 * Note: autoconf creates platform.h from platform.h.in at configure time. |
| 10 * | 10 * |
| 11 ****************************************************************************** | 11 ****************************************************************************** |
| 12 * | 12 * |
| 13 * FILE NAME : platform.h | 13 * FILE NAME : platform.h |
| 14 * | 14 * |
| 15 * Date Name Description | 15 * Date Name Description |
| 16 * 05/13/98 nos Creation (content moved here from ptypes.h). | 16 * 05/13/98 nos Creation (content moved here from ptypes.h). |
| 17 * 03/02/99 stephen Added AS400 support. | 17 * 03/02/99 stephen Added AS400 support. |
| 18 * 03/30/99 stephen Added Linux support. | 18 * 03/30/99 stephen Added Linux support. |
| 19 * 04/13/99 stephen Reworked for autoconf. | 19 * 04/13/99 stephen Reworked for autoconf. |
| 20 ****************************************************************************** | 20 ****************************************************************************** |
| 21 */ | 21 */ |
| 22 | 22 |
| 23 #ifndef _PLATFORM_H | 23 #ifndef _PLATFORM_H |
| 24 #define _PLATFORM_H | 24 #define _PLATFORM_H |
| 25 | 25 |
| 26 /** | 26 /** |
| 27 * \file | 27 * \file |
| 28 * \brief Basic types for the platform | 28 * \brief Basic types for the platform |
| 29 */ | 29 */ |
| 30 | 30 |
| 31 /* This file should be included before uvernum.h. */ | 31 /* This file should be included before uvernum.h. */ |
| 32 #if defined(UVERNUM_H) | 32 #if defined(UVERNUM_H) |
| 33 # error Do not include unicode/uvernum.h before #including unicode/platform.h.
Instead of unicode/uvernum.h, #include unicode/uversion.h | 33 # error Do not include unicode/uvernum.h before #including unicode/platform.h.
Instead of unicode/uvernum.h, #include unicode/uversion.h |
| 34 #endif | 34 #endif |
| 35 | 35 |
| 36 /** | 36 /** |
| 37 * Determine wheter to enable auto cleanup of libraries. | 37 * Determine wheter to enable auto cleanup of libraries. |
| 38 * @internal | 38 * @internal |
| 39 */ | 39 */ |
| 40 #ifndef UCLN_NO_AUTO_CLEANUP | 40 #ifndef UCLN_NO_AUTO_CLEANUP |
| 41 #define UCLN_NO_AUTO_CLEANUP 1 | 41 #define UCLN_NO_AUTO_CLEANUP 1 |
| 42 #endif | 42 #endif |
| 43 | 43 |
| 44 /* Need platform.h when using CYGWINMSVC to get definitions above. Ignore everyt
hing else. */ | 44 /* Need platform.h when using CYGWINMSVC to get definitions above. Ignore everyt
hing else. */ |
| 45 #ifndef CYGWINMSVC | 45 #ifndef CYGWINMSVC |
| 46 | 46 |
| 47 /** Define the platform we're on. */ | 47 /** Define the platform we're on. */ |
| 48 #ifndef U_LINUX | 48 #ifndef U_QNX |
| 49 #define U_LINUX | 49 #define U_QNX |
| 50 #endif | 50 #endif |
| 51 | 51 |
| 52 /** | 52 /** |
| 53 * \def U_HAVE_DIRENT_H | 53 * \def U_HAVE_DIRENT_H |
| 54 * Define whether dirent.h is available | 54 * Define whether dirent.h is available |
| 55 * @internal | 55 * @internal |
| 56 */ | 56 */ |
| 57 #ifndef U_HAVE_DIRENT_H | 57 #ifndef U_HAVE_DIRENT_H |
| 58 #define U_HAVE_DIRENT_H 1 | 58 #define U_HAVE_DIRENT_H 1 |
| 59 #endif | 59 #endif |
| 60 | 60 |
| 61 /** Define whether inttypes.h is available */ | 61 /** Define whether inttypes.h is available */ |
| 62 #ifndef U_HAVE_INTTYPES_H | 62 #ifndef U_HAVE_INTTYPES_H |
| 63 #define U_HAVE_INTTYPES_H 1 | 63 #define U_HAVE_INTTYPES_H 1 |
| 64 #endif | 64 #endif |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 /* Determines the endianness of the platform | 140 /* Determines the endianness of the platform |
| 141 It's done this way in case multiple architectures are being built at once. | 141 It's done this way in case multiple architectures are being built at once. |
| 142 For example, Darwin supports fat binaries, which can be both PPC and x86 base
d. */ | 142 For example, Darwin supports fat binaries, which can be both PPC and x86 base
d. */ |
| 143 #if defined(BYTE_ORDER) && defined(BIG_ENDIAN) | 143 #if defined(BYTE_ORDER) && defined(BIG_ENDIAN) |
| 144 #define U_IS_BIG_ENDIAN (BYTE_ORDER == BIG_ENDIAN) | 144 #define U_IS_BIG_ENDIAN (BYTE_ORDER == BIG_ENDIAN) |
| 145 #else | 145 #else |
| 146 #define U_IS_BIG_ENDIAN 0 | 146 #define U_IS_BIG_ENDIAN 0 |
| 147 #endif | 147 #endif |
| 148 | 148 |
| 149 /* 1 or 0 to enable or disable threads. If undefined, default is: enable thread
s. */ | 149 /* 1 or 0 to enable or disable threads. If undefined, default is: enable thread
s. */ |
| 150 #ifndef ICU_USE_THREADS | 150 #ifndef ICU_USE_THREADS |
| 151 #define ICU_USE_THREADS 1 | 151 #define ICU_USE_THREADS 1 |
| 152 #endif | 152 #endif |
| 153 | 153 |
| 154 /* On strong memory model CPUs (e.g. x86 CPUs), we use a safe & quick double che
ck lock. */ | 154 /* On strong memory model CPUs (e.g. x86 CPUs), we use a safe & quick double che
ck lock. */ |
| 155 #if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)) | 155 #if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)) |
| 156 #define UMTX_STRONG_MEMORY_MODEL 1 | 156 #define UMTX_STRONG_MEMORY_MODEL 1 |
| 157 #endif | 157 #endif |
| 158 | 158 |
| 159 #ifndef U_DEBUG | 159 #ifndef U_DEBUG |
| 160 #define U_DEBUG 0 | 160 #define U_DEBUG 0 |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 265 #endif | 265 #endif |
| 266 #endif | 266 #endif |
| 267 | 267 |
| 268 /** @} */ | 268 /** @} */ |
| 269 | 269 |
| 270 /*===========================================================================*/ | 270 /*===========================================================================*/ |
| 271 /** @{ Information about POSIX support
*/ | 271 /** @{ Information about POSIX support
*/ |
| 272 /*===========================================================================*/ | 272 /*===========================================================================*/ |
| 273 | 273 |
| 274 #ifndef U_HAVE_NL_LANGINFO_CODESET | 274 #ifndef U_HAVE_NL_LANGINFO_CODESET |
| 275 #define U_HAVE_NL_LANGINFO_CODESET 0 | 275 #define U_HAVE_NL_LANGINFO_CODESET 0 |
| 276 #endif | 276 #endif |
| 277 | 277 |
| 278 #ifndef U_NL_LANGINFO_CODESET | 278 #ifndef U_NL_LANGINFO_CODESET |
| 279 #define U_NL_LANGINFO_CODESET CODESET | 279 #define U_NL_LANGINFO_CODESET CODESET |
| 280 #endif | 280 #endif |
| 281 | 281 |
| 282 #if 1 | 282 #if 1 |
| 283 #define U_TZSET tzset | 283 #define U_TZSET tzset |
| 284 #endif | 284 #endif |
| 285 #if 1 | 285 #if 1 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 296 | 296 |
| 297 /*===========================================================================*/ | 297 /*===========================================================================*/ |
| 298 /** @{ Symbol import-export control
*/ | 298 /** @{ Symbol import-export control
*/ |
| 299 /*===========================================================================*/ | 299 /*===========================================================================*/ |
| 300 | 300 |
| 301 #ifdef U_STATIC_IMPLEMENTATION | 301 #ifdef U_STATIC_IMPLEMENTATION |
| 302 #define U_EXPORT | 302 #define U_EXPORT |
| 303 #elif 1 | 303 #elif 1 |
| 304 #define U_EXPORT __attribute__((visibility("default"))) | 304 #define U_EXPORT __attribute__((visibility("default"))) |
| 305 #elif (defined(__SUNPRO_CC) && __SUNPRO_CC >= 0x550) \ | 305 #elif (defined(__SUNPRO_CC) && __SUNPRO_CC >= 0x550) \ |
| 306 || (defined(__SUNPRO_C) && __SUNPRO_C >= 0x550) | 306 || (defined(__SUNPRO_C) && __SUNPRO_C >= 0x550) |
| 307 #define U_EXPORT __global | 307 #define U_EXPORT __global |
| 308 /*#elif defined(__HP_aCC) || defined(__HP_cc) | 308 /*#elif defined(__HP_aCC) || defined(__HP_cc) |
| 309 #define U_EXPORT __declspec(dllexport)*/ | 309 #define U_EXPORT __declspec(dllexport)*/ |
| 310 #else | 310 #else |
| 311 #define U_EXPORT | 311 #define U_EXPORT |
| 312 #endif | 312 #endif |
| 313 | 313 |
| 314 /* U_CALLCONV is releated to U_EXPORT2 */ | 314 /* U_CALLCONV is releated to U_EXPORT2 */ |
| 315 #define U_EXPORT2 | 315 #define U_EXPORT2 |
| 316 | 316 |
| 317 /* cygwin needs to export/import data */ | 317 /* cygwin needs to export/import data */ |
| 318 #if defined(U_CYGWIN) && !defined(__GNUC__) | 318 #if defined(U_CYGWIN) && !defined(__GNUC__) |
| 319 #define U_IMPORT __declspec(dllimport) | 319 #define U_IMPORT __declspec(dllimport) |
| 320 #else | 320 #else |
| 321 #define U_IMPORT | 321 #define U_IMPORT |
| 322 #endif | 322 #endif |
| 323 | 323 |
| 324 /* @} */ | 324 /* @} */ |
| 325 | 325 |
| 326 /*===========================================================================*/ | 326 /*===========================================================================*/ |
| 327 /** @{ Code alignment and C function inlining
*/ | 327 /** @{ Code alignment and C function inlining
*/ |
| 328 /*===========================================================================*/ | 328 /*===========================================================================*/ |
| 329 | 329 |
| 330 #ifndef U_INLINE | 330 #ifndef U_INLINE |
| 331 # ifdef __cplusplus | 331 # ifdef __cplusplus |
| 332 # define U_INLINE inline | 332 # define U_INLINE inline |
| 333 # else | 333 # else |
| 334 # define U_INLINE inline | 334 # define U_INLINE __inline__ |
| 335 # endif | 335 # endif |
| 336 #endif | 336 #endif |
| 337 | 337 |
| 338 #ifndef U_ALIGN_CODE | 338 #ifndef U_ALIGN_CODE |
| 339 #define U_ALIGN_CODE(n) | 339 #define U_ALIGN_CODE(n) |
| 340 #endif | 340 #endif |
| 341 | 341 |
| 342 /** @} */ | 342 /** @} */ |
| 343 | 343 |
| 344 /*===========================================================================*/ | 344 /*===========================================================================*/ |
| 345 /** @{ GCC built in functions for atomic memory operations
*/ | 345 /** @{ GCC built in functions for atomic memory operations
*/ |
| 346 /*===========================================================================*/ | 346 /*===========================================================================*/ |
| 347 | 347 |
| 348 /** | 348 /** |
| 349 * \def U_HAVE_GCC_ATOMICS | 349 * \def U_HAVE_GCC_ATOMICS |
| (...skipping 22 matching lines...) Expand all Loading... |
| 372 #endif /* CYGWINMSVC */ | 372 #endif /* CYGWINMSVC */ |
| 373 | 373 |
| 374 /*===========================================================================*/ | 374 /*===========================================================================*/ |
| 375 /* Custom icu entry point renaming
*/ | 375 /* Custom icu entry point renaming
*/ |
| 376 /*===========================================================================*/ | 376 /*===========================================================================*/ |
| 377 | 377 |
| 378 /** | 378 /** |
| 379 * Define the library suffix with C syntax. | 379 * Define the library suffix with C syntax. |
| 380 * @internal | 380 * @internal |
| 381 */ | 381 */ |
| 382 # define U_LIB_SUFFIX_C_NAME | 382 # define U_LIB_SUFFIX_C_NAME |
| 383 /** | 383 /** |
| 384 * Define the library suffix as a string with C syntax | 384 * Define the library suffix as a string with C syntax |
| 385 * @internal | 385 * @internal |
| 386 */ | 386 */ |
| 387 # define U_LIB_SUFFIX_C_NAME_STRING "" | 387 # define U_LIB_SUFFIX_C_NAME_STRING "" |
| 388 /** | 388 /** |
| 389 * 1 if a custom library suffix is set | 389 * 1 if a custom library suffix is set |
| 390 * @internal | 390 * @internal |
| 391 */ | 391 */ |
| 392 # define U_HAVE_LIB_SUFFIX 0 | 392 # define U_HAVE_LIB_SUFFIX 0 |
| 393 | 393 |
| 394 #if U_HAVE_LIB_SUFFIX | 394 #if U_HAVE_LIB_SUFFIX |
| 395 # ifndef U_ICU_ENTRY_POINT_RENAME | 395 # ifndef U_ICU_ENTRY_POINT_RENAME |
| 396 /* Renaming pattern: u_strcpy_41_suffix */ | 396 /* Renaming pattern: u_strcpy_41_suffix */ |
| 397 # define U_ICU_ENTRY_POINT_RENAME(x) x ## _ ## 46 ## | 397 # define U_ICU_ENTRY_POINT_RENAME(x) x ## _ ## 46 ## |
| 398 # define U_DEF_ICUDATA_ENTRY_POINT(major, minor) icudt####major##minor##_dat | 398 # define U_DEF_ICUDATA_ENTRY_POINT(major, minor) icudt####major##minor##_dat |
| 399 | 399 |
| 400 # endif | 400 # endif |
| 401 #endif | 401 #endif |
| 402 | 402 |
| 403 #endif | 403 #endif |
| OLD | NEW |