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