| OLD | NEW |
| (Empty) |
| 1 /* | |
| 2 ****************************************************************************** | |
| 3 * | |
| 4 * Copyright (C) 1997-2010, International Business Machines | |
| 5 * Corporation and others. All Rights Reserved. | |
| 6 * | |
| 7 ****************************************************************************** | |
| 8 * | |
| 9 * FILE NAME : ptypes.h | |
| 10 * | |
| 11 * Date Name Description | |
| 12 * 05/13/98 nos Creation (content moved here from ptypes.h). | |
| 13 * 03/02/99 stephen Added AS400 support. | |
| 14 * 03/30/99 stephen Added Linux support. | |
| 15 * 04/13/99 stephen Reworked for autoconf. | |
| 16 * 09/18/08 srl Moved basic types back to ptypes.h from platform.h | |
| 17 ****************************************************************************** | |
| 18 */ | |
| 19 | |
| 20 #ifndef _PTYPES_H | |
| 21 #define _PTYPES_H | |
| 22 | |
| 23 #include <sys/types.h> | |
| 24 | |
| 25 #if defined(__APPLE__) | |
| 26 # include "unicode/pmac.h" | |
| 27 #elif defined(ANDROID) | |
| 28 # include "unicode/pandroid.h" | |
| 29 #elif defined(__linux__) | |
| 30 # include "unicode/plinux.h" | |
| 31 #elif defined(__FreeBSD__) | |
| 32 # include "unicode/pfreebsd.h" | |
| 33 #elif defined(__OpenBSD__) | |
| 34 # include "unicode/popenbsd.h" | |
| 35 #else | |
| 36 # include "unicode/platform.h" | |
| 37 #endif | |
| 38 | |
| 39 /*===========================================================================*/ | |
| 40 /* Generic data types */ | |
| 41 /*===========================================================================*/ | |
| 42 | |
| 43 /* If your platform does not have the <inttypes.h> header, you may | |
| 44 need to edit the typedefs below. */ | |
| 45 #if U_HAVE_INTTYPES_H | |
| 46 | |
| 47 /* autoconf 2.13 sometimes can't properly find the data types in <inttypes.h> */ | |
| 48 /* os/390 needs <inttypes.h>, but it doesn't have int8_t, and it sometimes */ | |
| 49 /* doesn't have uint8_t depending on the OS version. */ | |
| 50 /* So we have this work around. */ | |
| 51 #ifdef OS390 | |
| 52 /* The features header is needed to get (u)int64_t sometimes. */ | |
| 53 #include <features.h> | |
| 54 #if ! U_HAVE_INT8_T | |
| 55 typedef signed char int8_t; | |
| 56 #endif | |
| 57 #if !defined(__uint8_t) | |
| 58 #define __uint8_t 1 | |
| 59 typedef unsigned char uint8_t; | |
| 60 #endif | |
| 61 #endif /* OS390 */ | |
| 62 | |
| 63 #include <inttypes.h> | |
| 64 | |
| 65 #else /* U_HAVE_INTTYPES_H */ | |
| 66 | |
| 67 #if ! U_HAVE_INT8_T | |
| 68 typedef signed char int8_t; | |
| 69 #endif | |
| 70 | |
| 71 #if ! U_HAVE_UINT8_T | |
| 72 typedef unsigned char uint8_t; | |
| 73 #endif | |
| 74 | |
| 75 #if ! U_HAVE_INT16_T | |
| 76 typedef signed short int16_t; | |
| 77 #endif | |
| 78 | |
| 79 #if ! U_HAVE_UINT16_T | |
| 80 typedef unsigned short uint16_t; | |
| 81 #endif | |
| 82 | |
| 83 #if ! U_HAVE_INT32_T | |
| 84 typedef signed int int32_t; | |
| 85 #endif | |
| 86 | |
| 87 #if ! U_HAVE_UINT32_T | |
| 88 typedef unsigned int uint32_t; | |
| 89 #endif | |
| 90 | |
| 91 #if ! U_HAVE_INT64_T | |
| 92 typedef signed long long int64_t; | |
| 93 /* else we may not have a 64-bit type */ | |
| 94 #endif | |
| 95 | |
| 96 #if ! U_HAVE_UINT64_T | |
| 97 typedef unsigned long long uint64_t; | |
| 98 /* else we may not have a 64-bit type */ | |
| 99 #endif | |
| 100 | |
| 101 #endif /* U_HAVE_INTTYPES_H */ | |
| 102 | |
| 103 #endif /* _PTYPES_H */ | |
| OLD | NEW |