|
||||
Warning, file /include/unicode/ptypes.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001 // © 2016 and later: Unicode, Inc. and others. 0002 // License & terms of use: http://www.unicode.org/copyright.html 0003 /* 0004 ****************************************************************************** 0005 * 0006 * Copyright (C) 1997-2012, International Business Machines 0007 * Corporation and others. All Rights Reserved. 0008 * 0009 ****************************************************************************** 0010 * 0011 * FILE NAME : ptypes.h 0012 * 0013 * Date Name Description 0014 * 05/13/98 nos Creation (content moved here from ptypes.h). 0015 * 03/02/99 stephen Added AS400 support. 0016 * 03/30/99 stephen Added Linux support. 0017 * 04/13/99 stephen Reworked for autoconf. 0018 * 09/18/08 srl Moved basic types back to ptypes.h from platform.h 0019 ****************************************************************************** 0020 */ 0021 0022 /** 0023 * \file 0024 * \brief C API: Definitions of integer types of various widths 0025 */ 0026 0027 #ifndef _PTYPES_H 0028 #define _PTYPES_H 0029 0030 /** 0031 * \def __STDC_LIMIT_MACROS 0032 * According to the Linux stdint.h, the ISO C99 standard specifies that in C++ implementations 0033 * macros like INT32_MIN and UINTPTR_MAX should only be defined if explicitly requested. 0034 * We need to define __STDC_LIMIT_MACROS before including stdint.h in C++ code 0035 * that uses such limit macros. 0036 * @internal 0037 */ 0038 #ifndef __STDC_LIMIT_MACROS 0039 #define __STDC_LIMIT_MACROS 0040 #endif 0041 0042 /* NULL, size_t, wchar_t */ 0043 #include <stddef.h> 0044 0045 /* 0046 * If all compilers provided all of the C99 headers and types, 0047 * we would just unconditionally #include <stdint.h> here 0048 * and not need any of the stuff after including platform.h. 0049 */ 0050 0051 /* Find out if we have stdint.h etc. */ 0052 #include "unicode/platform.h" 0053 0054 /*===========================================================================*/ 0055 /* Generic data types */ 0056 /*===========================================================================*/ 0057 0058 /* If your platform does not have the <stdint.h> header, you may 0059 need to edit the typedefs in the #else section below. 0060 Use #if...#else...#endif with predefined compiler macros if possible. */ 0061 #if U_HAVE_STDINT_H 0062 0063 /* 0064 * We mostly need <stdint.h> (which defines the standard integer types) but not <inttypes.h>. 0065 * <inttypes.h> includes <stdint.h> and adds the printf/scanf helpers PRId32, SCNx16 etc. 0066 * which we almost never use, plus stuff like imaxabs() which we never use. 0067 */ 0068 #include <stdint.h> 0069 0070 #if U_PLATFORM == U_PF_OS390 0071 /* The features header is needed to get (u)int64_t sometimes. */ 0072 #include <features.h> 0073 /* z/OS has <stdint.h>, but some versions are missing uint8_t (APAR PK62248). */ 0074 #if !defined(__uint8_t) 0075 #define __uint8_t 1 0076 typedef unsigned char uint8_t; 0077 #endif 0078 #endif /* U_PLATFORM == U_PF_OS390 */ 0079 0080 #elif U_HAVE_INTTYPES_H 0081 0082 # include <inttypes.h> 0083 0084 #else /* neither U_HAVE_STDINT_H nor U_HAVE_INTTYPES_H */ 0085 0086 /// \cond 0087 #if ! U_HAVE_INT8_T 0088 typedef signed char int8_t; 0089 #endif 0090 0091 #if ! U_HAVE_UINT8_T 0092 typedef unsigned char uint8_t; 0093 #endif 0094 0095 #if ! U_HAVE_INT16_T 0096 typedef signed short int16_t; 0097 #endif 0098 0099 #if ! U_HAVE_UINT16_T 0100 typedef unsigned short uint16_t; 0101 #endif 0102 0103 #if ! U_HAVE_INT32_T 0104 typedef signed int int32_t; 0105 #endif 0106 0107 #if ! U_HAVE_UINT32_T 0108 typedef unsigned int uint32_t; 0109 #endif 0110 0111 #if ! U_HAVE_INT64_T 0112 #ifdef _MSC_VER 0113 typedef signed __int64 int64_t; 0114 #else 0115 typedef signed long long int64_t; 0116 #endif 0117 #endif 0118 0119 #if ! U_HAVE_UINT64_T 0120 #ifdef _MSC_VER 0121 typedef unsigned __int64 uint64_t; 0122 #else 0123 typedef unsigned long long uint64_t; 0124 #endif 0125 #endif 0126 /// \endcond 0127 0128 #endif /* U_HAVE_STDINT_H / U_HAVE_INTTYPES_H */ 0129 0130 #endif /* _PTYPES_H */
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |