sl@0: /* sl@0: ****************************************************************************** sl@0: * sl@0: * Copyright (C) 1997-2005, International Business Machines sl@0: * Corporation and others. All Rights Reserved. sl@0: * sl@0: ****************************************************************************** sl@0: * sl@0: * FILE NAME : platform.h sl@0: * sl@0: * Date Name Description sl@0: * 05/13/98 nos Creation (content moved here from ptypes.h). sl@0: * 03/02/99 stephen Added AS400 support. sl@0: * 03/30/99 stephen Added Linux support. sl@0: * 04/13/99 stephen Reworked for autoconf. sl@0: ****************************************************************************** sl@0: */ sl@0: sl@0: /** sl@0: * \file sl@0: * \brief Basic types for the platform sl@0: */ sl@0: sl@0: /* Define the platform we're on. */ sl@0: #ifndef @platform@ sl@0: #define @platform@ sl@0: #endif sl@0: sl@0: /* Define whether inttypes.h is available */ sl@0: #ifndef U_HAVE_INTTYPES_H sl@0: #define U_HAVE_INTTYPES_H @U_HAVE_INTTYPES_H@ sl@0: #endif sl@0: sl@0: /* sl@0: * Define what support for C++ streams is available. sl@0: * If U_IOSTREAM_SOURCE is set to 199711, then is available sl@0: * (1997711 is the date the ISO/IEC C++ FDIS was published), and then sl@0: * one should qualify streams using the std namespace in ICU header sl@0: * files. sl@0: * If U_IOSTREAM_SOURCE is set to 198506, then is sl@0: * available instead (198506 is the date when Stroustrup published sl@0: * "An Extensible I/O Facility for C++" at the summer USENIX conference). sl@0: * If U_IOSTREAM_SOURCE is 0, then C++ streams are not available and sl@0: * support for them will be silently suppressed in ICU. sl@0: * sl@0: */ sl@0: sl@0: #ifndef U_IOSTREAM_SOURCE sl@0: #define U_IOSTREAM_SOURCE @U_IOSTREAM_SOURCE@ sl@0: #endif sl@0: sl@0: /* Determines whether specific types are available */ sl@0: #ifndef U_HAVE_INT8_T sl@0: #define U_HAVE_INT8_T @HAVE_INT8_T@ sl@0: #endif sl@0: sl@0: #ifndef U_HAVE_UINT8_T sl@0: #define U_HAVE_UINT8_T @HAVE_UINT8_T@ sl@0: #endif sl@0: sl@0: #ifndef U_HAVE_INT16_T sl@0: #define U_HAVE_INT16_T @HAVE_INT16_T@ sl@0: #endif sl@0: sl@0: #ifndef U_HAVE_UINT16_T sl@0: #define U_HAVE_UINT16_T @HAVE_UINT16_T@ sl@0: #endif sl@0: sl@0: #ifndef U_HAVE_INT32_T sl@0: #define U_HAVE_INT32_T @HAVE_INT32_T@ sl@0: #endif sl@0: sl@0: #ifndef U_HAVE_UINT32_T sl@0: #define U_HAVE_UINT32_T @HAVE_UINT32_T@ sl@0: #endif sl@0: sl@0: #ifndef U_HAVE_INT64_T sl@0: #define U_HAVE_INT64_T @HAVE_INT64_T@ sl@0: #endif sl@0: sl@0: #ifndef U_HAVE_UINT64_T sl@0: #define U_HAVE_UINT64_T @HAVE_UINT64_T@ sl@0: #endif sl@0: sl@0: /*===========================================================================*/ sl@0: /* Generic data types */ sl@0: /*===========================================================================*/ sl@0: sl@0: #include sl@0: sl@0: /* If your platform does not have the header, you may sl@0: need to edit the typedefs below. */ sl@0: #if U_HAVE_INTTYPES_H sl@0: sl@0: /* autoconf 2.13 sometimes can't properly find the data types in */ sl@0: /* os/390 needs , but it doesn't have int8_t, and it sometimes */ sl@0: /* doesn't have uint8_t depending on the OS version. */ sl@0: /* So we have this work around. */ sl@0: #ifdef OS390 sl@0: /* The features header is needed to get (u)int64_t sometimes. */ sl@0: #include sl@0: #if ! U_HAVE_INT8_T sl@0: typedef signed char int8_t; sl@0: #endif sl@0: #if !defined(__uint8_t) sl@0: #define __uint8_t 1 sl@0: typedef unsigned char uint8_t; sl@0: #endif sl@0: #endif /* OS390 */ sl@0: sl@0: #include sl@0: sl@0: #else /* U_HAVE_INTTYPES_H */ sl@0: sl@0: #if ! U_HAVE_INT8_T sl@0: typedef signed char int8_t; sl@0: #endif sl@0: sl@0: #if ! U_HAVE_UINT8_T sl@0: typedef unsigned char uint8_t; sl@0: #endif sl@0: sl@0: #if ! U_HAVE_INT16_T sl@0: typedef signed short int16_t; sl@0: #endif sl@0: sl@0: #if ! U_HAVE_UINT16_T sl@0: typedef unsigned short uint16_t; sl@0: #endif sl@0: sl@0: #if ! U_HAVE_INT32_T sl@0: typedef signed int int32_t; sl@0: #endif sl@0: sl@0: #if ! U_HAVE_UINT32_T sl@0: typedef unsigned int uint32_t; sl@0: #endif sl@0: sl@0: #if ! U_HAVE_INT64_T sl@0: typedef signed long long int64_t; sl@0: /* else we may not have a 64-bit type */ sl@0: #endif sl@0: sl@0: #if ! U_HAVE_UINT64_T sl@0: typedef unsigned long long uint64_t; sl@0: /* else we may not have a 64-bit type */ sl@0: #endif sl@0: sl@0: #endif sl@0: sl@0: /*===========================================================================*/ sl@0: /* Compiler and environment features */ sl@0: /*===========================================================================*/ sl@0: sl@0: /* Define whether namespace is supported */ sl@0: #ifndef U_HAVE_NAMESPACE sl@0: #define U_HAVE_NAMESPACE @U_HAVE_NAMESPACE@ sl@0: #endif sl@0: sl@0: /* Determines the endianness of the platform sl@0: It's done this way in case multiple architectures are being built at once. sl@0: For example, Darwin supports fat binaries, which can be both PPC and x86 based. */ sl@0: #if defined(BYTE_ORDER) && defined(BIG_ENDIAN) sl@0: #define U_IS_BIG_ENDIAN (BYTE_ORDER == BIG_ENDIAN) sl@0: #else sl@0: #define U_IS_BIG_ENDIAN @U_IS_BIG_ENDIAN@ sl@0: #endif sl@0: sl@0: /* 1 or 0 to enable or disable threads. If undefined, default is: enable threads. */ sl@0: #define ICU_USE_THREADS @ICU_USE_THREADS@ sl@0: sl@0: #ifndef U_DEBUG sl@0: #define U_DEBUG @ENABLE_DEBUG@ sl@0: #endif sl@0: sl@0: #ifndef U_RELEASE sl@0: #define U_RELEASE @ENABLE_RELEASE@ sl@0: #endif sl@0: sl@0: /* Determine whether to disable renaming or not. This overrides the sl@0: setting in umachine.h which is for all platforms. */ sl@0: #ifndef U_DISABLE_RENAMING sl@0: #define U_DISABLE_RENAMING @U_DISABLE_RENAMING@ sl@0: #endif sl@0: sl@0: /* Determine whether to override new and delete. */ sl@0: #ifndef U_OVERRIDE_CXX_ALLOCATION sl@0: #define U_OVERRIDE_CXX_ALLOCATION @U_OVERRIDE_CXX_ALLOCATION@ sl@0: #endif sl@0: /* Determine whether to override placement new and delete for STL. */ sl@0: #ifndef U_HAVE_PLACEMENT_NEW sl@0: #define U_HAVE_PLACEMENT_NEW @U_HAVE_PLACEMENT_NEW@ sl@0: #endif sl@0: sl@0: /* Determine whether to enable tracing. */ sl@0: #ifndef U_ENABLE_TRACING sl@0: #define U_ENABLE_TRACING @U_ENABLE_TRACING@ sl@0: #endif sl@0: sl@0: /* Do we allow ICU users to use the draft APIs by default? */ sl@0: #ifndef U_DEFAULT_SHOW_DRAFT sl@0: #define U_DEFAULT_SHOW_DRAFT @U_DEFAULT_SHOW_DRAFT@ sl@0: #endif sl@0: sl@0: /* Define the library suffix in a C syntax. */ sl@0: #define U_HAVE_LIB_SUFFIX @U_HAVE_LIB_SUFFIX@ sl@0: #define U_LIB_SUFFIX_C_NAME @ICULIBSUFFIXCNAME@ sl@0: #define U_LIB_SUFFIX_C_NAME_STRING "@ICULIBSUFFIXCNAME@" sl@0: sl@0: /*===========================================================================*/ sl@0: /* Character data types */ sl@0: /*===========================================================================*/ sl@0: sl@0: #if ((defined(OS390) && (!defined(__CHARSET_LIB) || !__CHARSET_LIB))) || defined(OS400) sl@0: # define U_CHARSET_FAMILY 1 sl@0: #endif sl@0: sl@0: /*===========================================================================*/ sl@0: /* Information about wchar support */ sl@0: /*===========================================================================*/ sl@0: sl@0: #define U_HAVE_WCHAR_H @U_HAVE_WCHAR_H@ sl@0: #define U_SIZEOF_WCHAR_T @U_SIZEOF_WCHAR_T@ sl@0: sl@0: #define U_HAVE_WCSCPY @U_HAVE_WCSCPY@ sl@0: sl@0: /*===========================================================================*/ sl@0: /* Information about POSIX support */ sl@0: /*===========================================================================*/ sl@0: sl@0: #define U_HAVE_NL_LANGINFO @U_HAVE_NL_LANGINFO@ sl@0: #define U_HAVE_NL_LANGINFO_CODESET @U_HAVE_NL_LANGINFO_CODESET@ sl@0: #define U_NL_LANGINFO_CODESET @U_NL_LANGINFO_CODESET@ sl@0: sl@0: #if @U_HAVE_TZSET@ sl@0: #define U_TZSET @U_TZSET@ sl@0: #endif sl@0: #if @U_HAVE_TIMEZONE@ sl@0: #define U_TIMEZONE @U_TIMEZONE@ sl@0: #endif sl@0: #if @U_HAVE_TZNAME@ sl@0: #define U_TZNAME @U_TZNAME@ sl@0: #endif sl@0: sl@0: #define U_HAVE_MMAP @HAVE_MMAP@ sl@0: #define U_HAVE_POPEN @U_HAVE_POPEN@ sl@0: sl@0: /*===========================================================================*/ sl@0: /* Symbol import-export control */ sl@0: /*===========================================================================*/ sl@0: sl@0: #define U_EXPORT sl@0: /* U_CALLCONV is releated to U_EXPORT2 */ sl@0: #define U_EXPORT2 sl@0: sl@0: /* cygwin needs to export/import data */ sl@0: #ifdef U_CYGWIN sl@0: #define U_IMPORT __declspec(dllimport) sl@0: #else sl@0: #define U_IMPORT sl@0: #endif sl@0: sl@0: /*===========================================================================*/ sl@0: /* Code alignment and C function inlining */ sl@0: /*===========================================================================*/ sl@0: sl@0: #ifndef U_INLINE sl@0: # ifdef __cplusplus sl@0: # define U_INLINE inline sl@0: # else sl@0: # define U_INLINE @U_INLINE@ sl@0: # endif sl@0: #endif sl@0: sl@0: #define U_ALIGN_CODE(n) sl@0: sl@0: /*===========================================================================*/ sl@0: /* Programs used by ICU code */ sl@0: /*===========================================================================*/ sl@0: sl@0: #define U_MAKE "@U_MAKE@"