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
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00043
00044 #ifndef _MSC_VER // [
00045 #error "Use this header only with Microsoft Visual C++ compilers!"
00046 #endif // _MSC_VER ]
00047
00048 #ifndef _MSC_STDINT_H_ // [
00049 #define _MSC_STDINT_H_
00050
00051 #if _MSC_VER > 1000
00052 #pragma once
00053 #endif
00054
00055 #include <limits.h>
00056
00057
00058
00059
00060
00061 #ifdef __cplusplus
00062 extern "C"
00063 {
00064 #endif
00065 # include <wchar.h>
00066 #ifdef __cplusplus
00067 }
00068 #endif
00069
00070
00071 #ifndef _W64
00072 # if !defined(__midl) && (defined(_X86_) || defined(_M_IX86)) && _MSC_VER >= 1300
00073 # define _W64 __w64
00074 # else
00075 # define _W64
00076 # endif
00077 #endif
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087 #if (_MSC_VER < 1300)
00088 typedef signed char int8_t;
00089 typedef signed short int16_t;
00090 typedef signed int int32_t;
00091 typedef unsigned char uint8_t;
00092 typedef unsigned short uint16_t;
00093 typedef unsigned int uint32_t;
00094 #else
00095 typedef signed __int8 int8_t;
00096 typedef signed __int16 int16_t;
00097 typedef signed __int32 int32_t;
00098 typedef unsigned __int8 uint8_t;
00099 typedef unsigned __int16 uint16_t;
00100 typedef unsigned __int32 uint32_t;
00101 #endif
00102 typedef signed __int64 int64_t;
00103 typedef unsigned __int64 uint64_t;
00104
00105 #define HAVE_INT8_T
00106
00107
00108 typedef int8_t int_least8_t;
00109 typedef int16_t int_least16_t;
00110 typedef int32_t int_least32_t;
00111 typedef int64_t int_least64_t;
00112 typedef uint8_t uint_least8_t;
00113 typedef uint16_t uint_least16_t;
00114 typedef uint32_t uint_least32_t;
00115 typedef uint64_t uint_least64_t;
00116
00117
00118 typedef int8_t int_fast8_t;
00119 typedef int16_t int_fast16_t;
00120 typedef int32_t int_fast32_t;
00121 typedef int64_t int_fast64_t;
00122 typedef uint8_t uint_fast8_t;
00123 typedef uint16_t uint_fast16_t;
00124 typedef uint32_t uint_fast32_t;
00125 typedef uint64_t uint_fast64_t;
00126
00127
00128 #ifdef _WIN64 // [
00129 typedef signed __int64 intptr_t;
00130 typedef unsigned __int64 uintptr_t;
00131 #else // _WIN64 ][
00132 typedef _W64 signed int intptr_t;
00133 typedef _W64 unsigned int uintptr_t;
00134 #endif // _WIN64 ]
00135
00136
00137 typedef int64_t intmax_t;
00138 typedef uint64_t uintmax_t;
00139
00140
00141
00142
00143 #if !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS) // [ See footnote 220 at page 257 and footnote 221 at page 259
00144
00145
00146 #define INT8_MIN ((int8_t)_I8_MIN)
00147 #define INT8_MAX _I8_MAX
00148 #define INT16_MIN ((int16_t)_I16_MIN)
00149 #define INT16_MAX _I16_MAX
00150 #define INT32_MIN ((int32_t)_I32_MIN)
00151 #define INT32_MAX _I32_MAX
00152 #define INT64_MIN ((int64_t)_I64_MIN)
00153 #define INT64_MAX _I64_MAX
00154 #define UINT8_MAX _UI8_MAX
00155 #define UINT16_MAX _UI16_MAX
00156 #define UINT32_MAX _UI32_MAX
00157 #define UINT64_MAX _UI64_MAX
00158
00159
00160 #define INT_LEAST8_MIN INT8_MIN
00161 #define INT_LEAST8_MAX INT8_MAX
00162 #define INT_LEAST16_MIN INT16_MIN
00163 #define INT_LEAST16_MAX INT16_MAX
00164 #define INT_LEAST32_MIN INT32_MIN
00165 #define INT_LEAST32_MAX INT32_MAX
00166 #define INT_LEAST64_MIN INT64_MIN
00167 #define INT_LEAST64_MAX INT64_MAX
00168 #define UINT_LEAST8_MAX UINT8_MAX
00169 #define UINT_LEAST16_MAX UINT16_MAX
00170 #define UINT_LEAST32_MAX UINT32_MAX
00171 #define UINT_LEAST64_MAX UINT64_MAX
00172
00173
00174 #define INT_FAST8_MIN INT8_MIN
00175 #define INT_FAST8_MAX INT8_MAX
00176 #define INT_FAST16_MIN INT16_MIN
00177 #define INT_FAST16_MAX INT16_MAX
00178 #define INT_FAST32_MIN INT32_MIN
00179 #define INT_FAST32_MAX INT32_MAX
00180 #define INT_FAST64_MIN INT64_MIN
00181 #define INT_FAST64_MAX INT64_MAX
00182 #define UINT_FAST8_MAX UINT8_MAX
00183 #define UINT_FAST16_MAX UINT16_MAX
00184 #define UINT_FAST32_MAX UINT32_MAX
00185 #define UINT_FAST64_MAX UINT64_MAX
00186
00187
00188 #ifdef _WIN64 // [
00189 # define INTPTR_MIN INT64_MIN
00190 # define INTPTR_MAX INT64_MAX
00191 # define UINTPTR_MAX UINT64_MAX
00192 #else // _WIN64 ][
00193 # define INTPTR_MIN INT32_MIN
00194 # define INTPTR_MAX INT32_MAX
00195 # define UINTPTR_MAX UINT32_MAX
00196 #endif // _WIN64 ]
00197
00198
00199 #define INTMAX_MIN INT64_MIN
00200 #define INTMAX_MAX INT64_MAX
00201 #define UINTMAX_MAX UINT64_MAX
00202
00203
00204
00205 #ifdef _WIN64 // [
00206 # define PTRDIFF_MIN _I64_MIN
00207 # define PTRDIFF_MAX _I64_MAX
00208 #else // _WIN64 ][
00209 # define PTRDIFF_MIN _I32_MIN
00210 # define PTRDIFF_MAX _I32_MAX
00211 #endif // _WIN64 ]
00212
00213 #define SIG_ATOMIC_MIN INT_MIN
00214 #define SIG_ATOMIC_MAX INT_MAX
00215
00216 #ifndef SIZE_MAX // [
00217 # ifdef _WIN64 // [
00218 # define SIZE_MAX _UI64_MAX
00219 # else // _WIN64 ][
00220 # define SIZE_MAX _UI32_MAX
00221 # endif // _WIN64 ]
00222 #endif // SIZE_MAX ]
00223
00224
00225 #ifndef WCHAR_MIN // [
00226 # define WCHAR_MIN 0
00227 #endif // WCHAR_MIN ]
00228 #ifndef WCHAR_MAX // [
00229 # define WCHAR_MAX _UI16_MAX
00230 #endif // WCHAR_MAX ]
00231
00232 #define WINT_MIN 0
00233 #define WINT_MAX _UI16_MAX
00234
00235 #endif // __STDC_LIMIT_MACROS ]
00236
00237
00238
00239
00240 #if !defined(__cplusplus) || defined(__STDC_CONSTANT_MACROS) // [ See footnote 224 at page 260
00241
00242
00243
00244 #define INT8_C(val) val##i8
00245 #define INT16_C(val) val##i16
00246 #define INT32_C(val) val##i32
00247 #define INT64_C(val) val##i64
00248
00249 #define UINT8_C(val) val##ui8
00250 #define UINT16_C(val) val##ui16
00251 #define UINT32_C(val) val##ui32
00252 #define UINT64_C(val) val##ui64
00253
00254
00255
00256
00257
00258 #endif // __STDC_CONSTANT_MACROS ]
00259
00260
00261 #endif // _MSC_STDINT_H_ ]