00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef _STDINT_H
00022 #define _STDINT_H
00023 #include <stddef.h>
00024
00025
00026 typedef signed char int8_t;
00027 typedef unsigned char uint8_t;
00028 typedef signed short int16_t;
00029 typedef unsigned short uint16_t;
00030 typedef signed long int32_t;
00031 typedef unsigned long uint32_t;
00032 typedef signed long long int64_t;
00033 typedef unsigned long long uint64_t;
00034
00035
00036 typedef signed char int_least8_t;
00037 typedef unsigned char uint_least8_t;
00038 typedef signed short int_least16_t;
00039 typedef unsigned short uint_least16_t;
00040 typedef signed long int_least32_t;
00041 typedef unsigned long uint_least32_t;
00042 typedef signed long long int_least64_t;
00043 typedef unsigned long long uint_least64_t;
00044
00045
00046
00047
00048
00049 typedef signed char int_fast8_t;
00050 typedef unsigned char uint_fast8_t;
00051 typedef signed short int_fast16_t;
00052 typedef unsigned short uint_fast16_t;
00053 typedef signed long int_fast32_t;
00054 typedef unsigned long uint_fast32_t;
00055 typedef signed long long int_fast64_t;
00056 typedef unsigned long long uint_fast64_t;
00057
00058
00059
00060
00061
00062
00063
00064 typedef signed long long intmax_t;
00065 typedef unsigned long long uintmax_t;
00066
00067
00068 #if !defined ( __cplusplus) || defined (__STDC_LIMIT_MACROS)
00069
00070
00071 #define INT8_MIN (-128)
00072 #define INT16_MIN (-32768)
00073 #define INT32_MIN (-2147483647 - 1)
00074 #define INT64_MIN (-9223372036854775807LL - 1)
00075
00076 #define INT8_MAX 127
00077 #define INT16_MAX 32767
00078 #define INT32_MAX 2147483647
00079 #define INT64_MAX 9223372036854775807LL
00080
00081 #define UINT8_MAX 0xff
00082 #define UINT16_MAX 0xffff
00083 #define UINT32_MAX 0xffffffff
00084 #define UINT64_MAX 0xffffffffffffffffULL
00085
00086
00087 #define INT_LEAST8_MIN INT8_MIN
00088 #define INT_LEAST16_MIN INT16_MIN
00089 #define INT_LEAST32_MIN INT32_MIN
00090 #define INT_LEAST64_MIN INT64_MIN
00091
00092 #define INT_LEAST8_MAX INT8_MAX
00093 #define INT_LEAST16_MAX INT16_MAX
00094 #define INT_LEAST32_MAX INT32_MAX
00095 #define INT_LEAST64_MAX INT64_MAX
00096
00097 #define UINT_LEAST8_MAX UINT8_MAX
00098 #define UINT_LEAST16_MAX UINT16_MAX
00099 #define UINT_LEAST32_MAX UINT32_MAX
00100 #define UINT_LEAST64_MAX UINT64_MAX
00101
00102
00103 #define INT_FAST8_MIN INT8_MIN
00104 #define INT_FAST16_MIN INT16_MIN
00105 #define INT_FAST32_MIN INT32_MIN
00106 #define INT_FAST64_MIN INT64_MIN
00107
00108 #define INT_FAST8_MAX INT8_MAX
00109 #define INT_FAST16_MAX INT16_MAX
00110 #define INT_FAST32_MAX INT32_MAX
00111 #define INT_FAST64_MAX INT64_MAX
00112
00113 #define UINT_FAST8_MAX UINT8_MAX
00114 #define UINT_FAST16_MAX UINT16_MAX
00115 #define UINT_FAST32_MAX UINT32_MAX
00116 #define UINT_FAST64_MAX UINT64_MAX
00117
00118
00119
00120 #define INTPTR_MIN INT32_MIN
00121 #define INTPTR_MAX INT32_MAX
00122 #define UINTPTR_MAX UINT32_MAX
00123
00124
00125 #define INTMAX_MIN INT64_MIN
00126 #define INTMAX_MAX INT64_MAX
00127 #define UINTMAX_MAX UINT64_MAX
00128
00129
00130 #define PTRDIFF_MAX ((ptrdiff_t)-1)
00131 #define PTRDIFF_MIN (-PTRDIFF_MAX)
00132
00133 #define SIZE_MAX ((size_t)-1)
00134
00135
00136
00137
00138
00139
00140
00141
00142 #endif
00143
00144
00145
00146 #if !defined ( __cplusplus) || defined (__STDC_CONSTANT_MACROS)
00147
00148
00149 #define INT8_C(val) ((int8_t) + (val))
00150 #define UINT8_C(val) ((uint8_t) + (val##U))
00151 #define INT16_C(val) ((int16_t) + (val))
00152 #define UINT16_C(val) ((uint16_t) + (val##U))
00153
00154 #define INT32_C(val) (val##L)
00155 #define UINT32_C(val) (val##UL)
00156 #define INT64_C(val) (val##LL)
00157 #define UINT64_C(val) (val##ULL)
00158
00159
00160 #define INTMAX_C(val) INT64_C(val)
00161 #define UINTMAX_C(val) UINT64_C(val)
00162
00163 #endif
00164
00165 #endif
00166