ICU 4.8.1.1
4.8.1.1
|
00001 /* 00002 ****************************************************************************** 00003 * 00004 * Copyright (C) 1997-2010, International Business Machines 00005 * Corporation and others. All Rights Reserved. 00006 * 00007 ****************************************************************************** 00008 * 00009 * FILE NAME : ptypes.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 * 09/18/08 srl Moved basic types back to ptypes.h from platform.h 00017 ****************************************************************************** 00018 */ 00019 00020 #ifndef _PTYPES_H 00021 #define _PTYPES_H 00022 00023 #include <sys/types.h> 00024 00025 #include "unicode/platform.h" 00026 00027 /*===========================================================================*/ 00028 /* Generic data types */ 00029 /*===========================================================================*/ 00030 00031 /* If your platform does not have the <inttypes.h> header, you may 00032 need to edit the typedefs below. */ 00033 #if U_HAVE_INTTYPES_H 00034 00035 /* autoconf 2.13 sometimes can't properly find the data types in <inttypes.h> */ 00036 /* os/390 needs <inttypes.h>, but it doesn't have int8_t, and it sometimes */ 00037 /* doesn't have uint8_t depending on the OS version. */ 00038 /* So we have this work around. */ 00039 #ifdef OS390 00040 /* The features header is needed to get (u)int64_t sometimes. */ 00041 #include <features.h> 00042 #if ! U_HAVE_INT8_T 00043 typedef signed char int8_t; 00044 #endif 00045 #if !defined(__uint8_t) 00046 #define __uint8_t 1 00047 typedef unsigned char uint8_t; 00048 #endif 00049 #endif /* OS390 */ 00050 00051 #include <inttypes.h> 00052 00053 #else /* U_HAVE_INTTYPES_H */ 00054 00055 #if ! U_HAVE_INT8_T 00056 typedef signed char int8_t; 00057 #endif 00058 00059 #if ! U_HAVE_UINT8_T 00060 typedef unsigned char uint8_t; 00061 #endif 00062 00063 #if ! U_HAVE_INT16_T 00064 typedef signed short int16_t; 00065 #endif 00066 00067 #if ! U_HAVE_UINT16_T 00068 typedef unsigned short uint16_t; 00069 #endif 00070 00071 #if ! U_HAVE_INT32_T 00072 typedef signed int int32_t; 00073 #endif 00074 00075 #if ! U_HAVE_UINT32_T 00076 typedef unsigned int uint32_t; 00077 #endif 00078 00079 #if ! U_HAVE_INT64_T 00080 typedef signed long long int64_t; 00081 /* else we may not have a 64-bit type */ 00082 #endif 00083 00084 #if ! U_HAVE_UINT64_T 00085 typedef unsigned long long uint64_t; 00086 /* else we may not have a 64-bit type */ 00087 #endif 00088 00089 #endif /* U_HAVE_INTTYPES_H */ 00090 00091 #endif /* _PTYPES_H */ 00092