ICU 4.8.1.1  4.8.1.1
platform.h
Go to the documentation of this file.
00001 /*
00002 ******************************************************************************
00003 *
00004 *   Copyright (C) 1997-2011, International Business Machines
00005 *   Corporation and others.  All Rights Reserved.
00006 *
00007 ******************************************************************************
00008 *
00009 * Note: autoconf creates platform.h from platform.h.in at configure time.
00010 *
00011 ******************************************************************************
00012 *
00013 *  FILE NAME : platform.h
00014 *
00015 *   Date        Name        Description
00016 *   05/13/98    nos         Creation (content moved here from ptypes.h).
00017 *   03/02/99    stephen     Added AS400 support.
00018 *   03/30/99    stephen     Added Linux support.
00019 *   04/13/99    stephen     Reworked for autoconf.
00020 ******************************************************************************
00021 */
00022 
00023 #ifndef _PLATFORM_H
00024 #define _PLATFORM_H
00025 
00031 /* This file should be included before uvernum.h. */
00032 #if defined(UVERNUM_H)
00033 # error Do not include unicode/uvernum.h before #including unicode/platform.h.  Instead of unicode/uvernum.h, #include unicode/uversion.h
00034 #endif
00035 
00040 #ifndef UCLN_NO_AUTO_CLEANUP
00041 #define UCLN_NO_AUTO_CLEANUP 1
00042 #endif
00043 
00044 #if 0
00045 #define CYGWINMSVC
00046 #endif
00047 
00048 /* Need platform.h when using CYGWINMSVC to get definitions above. Ignore everything else. */
00049 #ifndef CYGWINMSVC
00050 
00052 #ifndef U_LINUX
00053 #define U_LINUX
00054 #endif
00055 
00061 #ifndef U_HAVE_DIRENT_H
00062 #define U_HAVE_DIRENT_H 1
00063 #endif
00064 
00066 #ifndef U_HAVE_INTTYPES_H
00067 #define U_HAVE_INTTYPES_H 1
00068 #endif
00069 
00084 #ifndef U_IOSTREAM_SOURCE
00085 #define U_IOSTREAM_SOURCE 199711
00086 #endif
00087 
00096 #ifndef U_HAVE_STD_STRING
00097 #define U_HAVE_STD_STRING 1
00098 #endif
00099 
00101 #ifndef U_HAVE_INT8_T
00102 #define U_HAVE_INT8_T 1
00103 #endif
00104 
00105 #ifndef U_HAVE_UINT8_T
00106 #define U_HAVE_UINT8_T 1
00107 #endif
00108 
00109 #ifndef U_HAVE_INT16_T
00110 #define U_HAVE_INT16_T 1
00111 #endif
00112 
00113 #ifndef U_HAVE_UINT16_T
00114 #define U_HAVE_UINT16_T 1
00115 #endif
00116 
00117 #ifndef U_HAVE_INT32_T
00118 #define U_HAVE_INT32_T 1
00119 #endif
00120 
00121 #ifndef U_HAVE_UINT32_T
00122 #define U_HAVE_UINT32_T 1
00123 #endif
00124 
00125 #ifndef U_HAVE_INT64_T
00126 #define U_HAVE_INT64_T 1
00127 #endif
00128 
00129 #ifndef U_HAVE_UINT64_T
00130 #define U_HAVE_UINT64_T 1
00131 #endif
00132 
00135 /*===========================================================================*/
00137 /*===========================================================================*/
00138 
00139 /* Define whether namespace is supported */
00140 #ifndef U_HAVE_NAMESPACE
00141 #define U_HAVE_NAMESPACE 1
00142 #endif
00143 
00144 /* Determines the endianness of the platform
00145    It's done this way in case multiple architectures are being built at once.
00146    For example, Darwin supports fat binaries, which can be both PPC and x86 based. */
00147 #if defined(BYTE_ORDER) && defined(BIG_ENDIAN)
00148 #define U_IS_BIG_ENDIAN (BYTE_ORDER == BIG_ENDIAN)
00149 #else
00150 #define U_IS_BIG_ENDIAN 0
00151 #endif
00152 
00153 /* 1 or 0 to enable or disable threads.  If undefined, default is: enable threads. */
00154 #ifndef ICU_USE_THREADS 
00155 #define ICU_USE_THREADS 1
00156 #endif
00157 
00158 #ifndef U_DEBUG
00159 #define U_DEBUG 0
00160 #endif
00161 
00162 #ifndef U_RELEASE
00163 #define U_RELEASE 1
00164 #endif
00165 
00166 /* Determine whether to disable renaming or not. This overrides the
00167    setting in umachine.h which is for all platforms. */
00168 #ifndef U_DISABLE_RENAMING
00169 #define U_DISABLE_RENAMING 0
00170 #endif
00171 
00172 /* Determine whether to override new and delete. */
00173 #ifndef U_OVERRIDE_CXX_ALLOCATION
00174 #define U_OVERRIDE_CXX_ALLOCATION 1
00175 #endif
00176 /* Determine whether to override placement new and delete for STL. */
00177 #ifndef U_HAVE_PLACEMENT_NEW
00178 #define U_HAVE_PLACEMENT_NEW 1
00179 #endif
00180 
00181 /* Determine whether to enable tracing. */
00182 #ifndef U_ENABLE_TRACING
00183 #define U_ENABLE_TRACING 0
00184 #endif
00185 
00190 #ifndef U_ENABLE_DYLOAD
00191 #define U_ENABLE_DYLOAD 1
00192 #endif
00193 
00198 #ifndef U_CHECK_DYLOAD
00199 #define U_CHECK_DYLOAD 1
00200 #endif
00201 
00202 
00204 #ifndef U_DEFAULT_SHOW_DRAFT
00205 #define U_DEFAULT_SHOW_DRAFT 1
00206 #endif
00207 
00210 /*===========================================================================*/
00212 /*===========================================================================*/
00213 
00214 #if ((defined(OS390) && (!defined(__CHARSET_LIB) || !__CHARSET_LIB))) || defined(OS400)
00215 #   define U_CHARSET_FAMILY 1
00216 #endif
00217 
00220 /*===========================================================================*/
00222 /*===========================================================================*/
00223 
00224 #ifndef U_HAVE_WCHAR_H
00225 #define U_HAVE_WCHAR_H      1
00226 #endif
00227 
00228 #ifndef U_SIZEOF_WCHAR_T
00229 #define U_SIZEOF_WCHAR_T    4
00230 #endif
00231 
00232 #ifndef U_HAVE_WCSCPY
00233 #define U_HAVE_WCSCPY       1
00234 #endif
00235 
00248 #ifndef U_GNUC_UTF16_STRING
00249 #define U_GNUC_UTF16_STRING 0
00250 #endif
00251 #if 1 || defined(U_CHECK_UTF16_STRING)
00252 #if (defined(__xlC__) && defined(__IBM_UTF_LITERAL) && U_SIZEOF_WCHAR_T != 2) \
00253     || (defined(__HP_aCC) && __HP_aCC >= 035000) \
00254     || (defined(__HP_cc) && __HP_cc >= 111106) \
00255     || U_GNUC_UTF16_STRING
00256 #define U_DECLARE_UTF16(string) u ## string
00257 #elif (defined(__SUNPRO_CC) && __SUNPRO_CC >= 0x550)
00258 /* || (defined(__SUNPRO_C) && __SUNPRO_C >= 0x580) */
00259 /* Sun's C compiler has issues with this notation, and it's unreliable. */
00260 #define U_DECLARE_UTF16(string) U ## string
00261 #elif U_SIZEOF_WCHAR_T == 2 \
00262     && (U_CHARSET_FAMILY == 0 || ((defined(OS390) || defined(OS400)) && defined(__UCS2__)))
00263 #define U_DECLARE_UTF16(string) L ## string
00264 #endif
00265 #endif
00266 
00269 /*===========================================================================*/
00271 /*===========================================================================*/
00272 
00273 #ifndef U_HAVE_NL_LANGINFO_CODESET
00274 #define U_HAVE_NL_LANGINFO_CODESET  1
00275 #endif
00276 
00277 #ifndef U_NL_LANGINFO_CODESET
00278 #define U_NL_LANGINFO_CODESET       CODESET
00279 #endif
00280 
00281 #if 1
00282 #define U_TZSET         tzset
00283 #endif
00284 #if 1
00285 #define U_TIMEZONE      __timezone
00286 #endif
00287 #if 1
00288 #define U_TZNAME        tzname
00289 #endif
00290 
00291 #define U_HAVE_MMAP     1
00292 #define U_HAVE_POPEN    1
00293 
00296 /*===========================================================================*/
00298 /*===========================================================================*/
00299 
00300 #ifdef U_STATIC_IMPLEMENTATION
00301 #define U_EXPORT
00302 #elif 1
00303 #define U_EXPORT __attribute__((visibility("default")))
00304 #elif (defined(__SUNPRO_CC) && __SUNPRO_CC >= 0x550) \
00305    || (defined(__SUNPRO_C) && __SUNPRO_C >= 0x550) 
00306 #define U_EXPORT __global
00307 /*#elif defined(__HP_aCC) || defined(__HP_cc)
00308 #define U_EXPORT __declspec(dllexport)*/
00309 #else
00310 #define U_EXPORT
00311 #endif
00312 
00313 /* U_CALLCONV is releated to U_EXPORT2 */
00314 #define U_EXPORT2
00315 
00316 /* cygwin needs to export/import data */
00317 #if defined(U_CYGWIN) && !defined(__GNUC__)
00318 #define U_IMPORT __declspec(dllimport)
00319 #else
00320 #define U_IMPORT 
00321 #endif
00322 
00323 /* @} */
00324 
00325 /*===========================================================================*/
00327 /*===========================================================================*/
00328 
00329 #ifndef U_INLINE
00330 #   ifdef __cplusplus
00331 #       define U_INLINE inline
00332 #   else
00333 #       define U_INLINE __inline__
00334 #   endif
00335 #endif
00336 
00337 #ifndef U_ALIGN_CODE
00338 #define U_ALIGN_CODE(n) 
00339 #endif
00340 
00343 /*===========================================================================*/
00345 /*===========================================================================*/
00346 
00351 #ifndef U_HAVE_GCC_ATOMICS
00352 #define U_HAVE_GCC_ATOMICS 1
00353 #endif
00354 
00357 /*===========================================================================*/
00359 /*===========================================================================*/
00360 
00365 #ifndef U_MAKE
00366 #define U_MAKE  "make"
00367 #endif
00368 
00371 #endif /* CYGWINMSVC */
00372 
00373 /*===========================================================================*/
00374 /* Custom icu entry point renaming                                                  */
00375 /*===========================================================================*/
00376 
00381 # define U_LIB_SUFFIX_C_NAME 
00382 
00386 # define U_LIB_SUFFIX_C_NAME_STRING ""
00387 
00391 # define U_HAVE_LIB_SUFFIX 0
00392 
00393 #if U_HAVE_LIB_SUFFIX
00394 # ifndef U_ICU_ENTRY_POINT_RENAME
00395 /* Renaming pattern:    u_strcpy_41_suffix */
00396 #  define U_ICU_ENTRY_POINT_RENAME(x)    x ## _ ## 48 ## 
00397 #  define U_DEF_ICUDATA_ENTRY_POINT(major, minor) icudt####major##minor##_dat
00398 
00399 # endif
00400 #endif
00401 
00402 #endif
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Defines