00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef __UMACHINE_H__
00024 #define __UMACHINE_H__
00025
00038
00039
00040
00041
00042
00043 #if defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64)
00044 # include "unicode/pwin32.h"
00045 #elif defined(__OS2__)
00046 # include "unicode/pos2.h"
00047 #elif defined(__OS400__)
00048 # include "unicode/pos400.h"
00049 #elif defined(__MWERKS__)
00050 # include "unicode/pmacos.h"
00051 #else
00052 # include "unicode/platform.h"
00053 #endif
00054
00055
00056
00057
00058
00059
00060 #ifdef __cplusplus
00061 # ifndef XP_CPLUSPLUS
00062 # define XP_CPLUSPLUS
00063 # endif
00064 #else
00065 # undef XP_CPLUSPLUS
00066 #endif
00067
00068
00069
00070
00071
00072
00073
00074 #ifdef XP_CPLUSPLUS
00075 # define U_CFUNC extern "C"
00076 # define U_CDECL_BEGIN extern "C" {
00077 # define U_CDECL_END }
00078 #else
00079 # define U_CFUNC extern
00080 # define U_CDECL_BEGIN
00081 # define U_CDECL_END
00082 #endif
00083 #define U_CAPI U_CFUNC U_EXPORT
00084
00085
00086
00087
00088
00089 #ifndef INT8_MIN
00090 # define INT8_MIN ((int8_t)(-128))
00091 #endif
00092 #ifndef INT16_MIN
00093 # define INT16_MIN ((int16_t)(-32767-1))
00094 #endif
00095 #ifndef INT32_MIN
00096 # define INT32_MIN ((int32_t)(-2147483647-1))
00097 #endif
00098
00099 #ifndef INT8_MAX
00100 # define INT8_MAX ((int8_t)(127))
00101 #endif
00102 #ifndef INT16_MAX
00103 # define INT16_MAX ((int16_t)(32767))
00104 #endif
00105 #ifndef INT32_MAX
00106 # define INT32_MAX ((int32_t)(2147483647))
00107 #endif
00108
00109 #ifndef UINT8_MAX
00110 # define UINT8_MAX ((uint8_t)(255U))
00111 #endif
00112 #ifndef UINT16_MAX
00113 # define UINT16_MAX ((uint16_t)(65535U))
00114 #endif
00115 #ifndef UINT32_MAX
00116 # define UINT32_MAX ((uint32_t)(4294967295U))
00117 #endif
00118
00119 #if defined(__64BIT__) || defined(_LONG_LONG) || defined(_LP64) || defined(WIN64) || defined(_WIN64)
00120 # ifndef INT64_MIN
00121 # define INT64_MIN ((int64_t)(-9223372036854775807-1))
00122 # endif
00123 # ifndef INT64_MAX
00124 # define INT64_MAX ((int64_t)(9223372036854775807))
00125 # endif
00126 # ifndef UINT64_MAX
00127 # define UINT64_MAX ((uint64_t)(18446744073709551615))
00128 # endif
00129 # ifndef INTMAX_MIN
00130 # define INTMAX_MIN INT64_MIN
00131 # endif
00132 # ifndef INTMAX_MAX
00133 # define INTMAX_MAX INT64_MAX
00134 # endif
00135 # ifndef UINTMAX_MAX
00136 # define UINTMAX_MAX UINT64_MAX
00137 # endif
00138 #else
00139 # ifndef INTMAX_MIN
00140 # define INTMAX_MIN INT32_MIN
00141 # endif
00142 # ifndef INTMAX_MAX
00143 # define INTMAX_MAX INT32_MAX
00144 # endif
00145 # ifndef UINTMAX_MAX
00146 # define UINTMAX_MAX UINT32_MAX
00147 # endif
00148 #endif
00149
00150
00151
00152
00153
00154 #if !HAVE_BOOL_T
00155 typedef int8_t bool_t;
00156 #endif
00157
00158 typedef int8_t UBool;
00159
00160 #ifndef TRUE
00161 # define TRUE 1
00162 #endif
00163 #ifndef FALSE
00164 # define FALSE 0
00165 #endif
00166
00167 #endif