00001 /* 00002 ******************************************************************************* 00003 * 00004 * Copyright (C) 1997-1999, International Business Machines 00005 * Corporation and others. All Rights Reserved. 00006 * 00007 ******************************************************************************* 00008 * 00009 * FILE NAME : platform.h 00010 * 00011 * Date Name Description 00012 * 05/13/98 nos Creation (content moved here from ptypes.h). 00013 * 03/02/99 stephen Added AS400 support. 00014 * 03/30/99 stephen Added Linux support. 00015 * 04/13/99 stephen Reworked for autoconf. 00016 ******************************************************************************* 00017 */ 00018 00019 /* Define the platform we're on. */ 00020 #ifndef WIN32 00021 #define WIN32 00022 #endif 00023 00024 /* Define whether inttypes.h is available */ 00025 #define HAVE_INTTYPES_H 0 00026 00027 /* 00028 * Define what support for C++ streams is available. 00029 * If U_IOSTREAM_SOURCE is set to 199711, then <iostream> is available 00030 * (1997711 is the date the ISO/IEC C++ FDIS was published), and then 00031 * one should qualify streams using the std namespace in ICU header 00032 * files. 00033 * If U_IOSTREAM_SOURCE is set to 198506, then <iostream.h> is 00034 * available instead (198506 is the date when Stroustrup published 00035 * "An Extensible I/O Facility for C++" at the summer USENIX conference). 00036 * If U_IOSTREAM_SOURCE is 0, then C++ streams are not available and 00037 * support for them will be silently suppressed in ICU. 00038 * 00039 */ 00040 00041 #define U_IOSTREAM_SOURCE 198506 /* Wish we could use 199711 but that breaks while compiling chariter.cpp */ 00042 00043 /* Determines whether specific types are available */ 00044 #define HAVE_INT8_T 0 00045 #define HAVE_UINT8_T 0 00046 #define HAVE_INT16_T 0 00047 #define HAVE_UINT16_T 0 00048 #define HAVE_INT32_T 0 00049 #define HAVE_UINT32_T 0 00050 #define HAVE_BOOL_T 0 00051 00052 /* Determines the endianness of the platform */ 00053 #define U_IS_BIG_ENDIAN 0 00054 00055 /*===========================================================================*/ 00056 /* Generic data types */ 00057 /*===========================================================================*/ 00058 00059 /* If your platform does not have the <inttypes.h> header, you may 00060 need to edit the typedefs below. */ 00061 #if HAVE_INTTYPES_H 00062 #include <inttypes.h> 00063 #else 00064 00065 #if ! HAVE_INT8_T 00066 typedef signed char int8_t; 00067 #endif 00068 00069 #if ! HAVE_UINT8_T 00070 typedef unsigned char uint8_t; 00071 #endif 00072 00073 #if ! HAVE_INT16_T 00074 typedef signed short int16_t; 00075 #endif 00076 00077 #if ! HAVE_UINT16_T 00078 typedef unsigned short uint16_t; 00079 #endif 00080 00081 #if ! HAVE_INT32_T 00082 # if defined(_LP64) 00083 typedef signed int int32_t; 00084 # else 00085 typedef signed long int32_t; 00086 # endif 00087 #endif 00088 00089 #if ! HAVE_UINT32_T 00090 # if defined(_LP64) 00091 typedef unsigned int uint32_t; 00092 # else 00093 typedef unsigned long uint32_t; 00094 # endif 00095 #endif 00096 00097 #endif 00098 00099 #include <limits.h> 00100 #if defined(_LP64) 00101 # define T_INT32_MAX (INT_MAX) 00102 # define T_INT32_MIN (INT_MIN) 00103 #else 00104 # define T_INT32_MAX (LONG_MAX) 00105 # define T_INT32_MIN (LONG_MIN) 00106 #endif 00107 00108 00109 /*===========================================================================*/ 00110 /* Character data types */ 00111 /*===========================================================================*/ 00112 00113 #define U_SIZEOF_WCHAR_T 2 00114 00115 /*===========================================================================*/ 00116 /* Symbol import-export control */ 00117 /*===========================================================================*/ 00118 00119 #define U_EXPORT __declspec(dllexport) 00120 #define U_EXPORT2 00121 #define U_IMPORT __declspec(dllimport)