STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
stdint.h
Go to the documentation of this file.
1 /* stdint.h standard header */
2 #pragma once
3 #ifndef _STDINT
4 #define _STDINT
5 #ifndef RC_INVOKED
6 #include <crtdefs.h>
7 
8 typedef signed char int8_t;
9 typedef short int16_t;
10 typedef int int32_t;
11 typedef long long int64_t;
12 typedef unsigned char uint8_t;
13 typedef unsigned short uint16_t;
14 typedef unsigned int uint32_t;
15 typedef unsigned long long uint64_t;
16 
17 typedef signed char int_least8_t;
18 typedef short int_least16_t;
19 typedef int int_least32_t;
20 typedef long long int_least64_t;
21 typedef unsigned char uint_least8_t;
22 typedef unsigned short uint_least16_t;
23 typedef unsigned int uint_least32_t;
24 typedef unsigned long long uint_least64_t;
25 
26 typedef signed char int_fast8_t;
27 typedef int int_fast16_t;
28 typedef int int_fast32_t;
29 typedef long long int_fast64_t;
30 typedef unsigned char uint_fast8_t;
31 typedef unsigned int uint_fast16_t;
32 typedef unsigned int uint_fast32_t;
33 typedef unsigned long long uint_fast64_t;
34 
35 #ifndef _INTPTR_T_DEFINED
36  #define _INTPTR_T_DEFINED
37  #ifdef _WIN64
38 typedef long long intptr_t;
39  #else /* _WIN64 */
40 typedef _W64 int intptr_t;
41  #endif /* _WIN64 */
42 #endif /* _INTPTR_T_DEFINED */
43 
44 #ifndef _UINTPTR_T_DEFINED
45  #define _UINTPTR_T_DEFINED
46  #ifdef _WIN64
47 typedef unsigned long long uintptr_t;
48  #else /* _WIN64 */
49 typedef _W64 unsigned int uintptr_t;
50  #endif /* _WIN64 */
51 #endif /* _UINTPTR_T_DEFINED */
52 
53 typedef long long intmax_t;
54 typedef unsigned long long uintmax_t;
55 
56 /* These macros must exactly match those in the Windows SDK's intsafe.h */
57 #define INT8_MIN (-127i8 - 1)
58 #define INT16_MIN (-32767i16 - 1)
59 #define INT32_MIN (-2147483647i32 - 1)
60 #define INT64_MIN (-9223372036854775807i64 - 1)
61 #define INT8_MAX 127i8
62 #define INT16_MAX 32767i16
63 #define INT32_MAX 2147483647i32
64 #define INT64_MAX 9223372036854775807i64
65 #define UINT8_MAX 0xffui8
66 #define UINT16_MAX 0xffffui16
67 #define UINT32_MAX 0xffffffffui32
68 #define UINT64_MAX 0xffffffffffffffffui64
69 
70 #define INT_LEAST8_MIN INT8_MIN
71 #define INT_LEAST16_MIN INT16_MIN
72 #define INT_LEAST32_MIN INT32_MIN
73 #define INT_LEAST64_MIN INT64_MIN
74 #define INT_LEAST8_MAX INT8_MAX
75 #define INT_LEAST16_MAX INT16_MAX
76 #define INT_LEAST32_MAX INT32_MAX
77 #define INT_LEAST64_MAX INT64_MAX
78 #define UINT_LEAST8_MAX UINT8_MAX
79 #define UINT_LEAST16_MAX UINT16_MAX
80 #define UINT_LEAST32_MAX UINT32_MAX
81 #define UINT_LEAST64_MAX UINT64_MAX
82 
83 #define INT_FAST8_MIN INT8_MIN
84 #define INT_FAST16_MIN INT32_MIN
85 #define INT_FAST32_MIN INT32_MIN
86 #define INT_FAST64_MIN INT64_MIN
87 #define INT_FAST8_MAX INT8_MAX
88 #define INT_FAST16_MAX INT32_MAX
89 #define INT_FAST32_MAX INT32_MAX
90 #define INT_FAST64_MAX INT64_MAX
91 #define UINT_FAST8_MAX UINT8_MAX
92 #define UINT_FAST16_MAX UINT32_MAX
93 #define UINT_FAST32_MAX UINT32_MAX
94 #define UINT_FAST64_MAX UINT64_MAX
95 
96 #ifdef _WIN64
97  #define INTPTR_MIN INT64_MIN
98  #define INTPTR_MAX INT64_MAX
99  #define UINTPTR_MAX UINT64_MAX
100 #else /* _WIN64 */
101  #define INTPTR_MIN INT32_MIN
102  #define INTPTR_MAX INT32_MAX
103  #define UINTPTR_MAX UINT32_MAX
104 #endif /* _WIN64 */
105 
106 #define INTMAX_MIN INT64_MIN
107 #define INTMAX_MAX INT64_MAX
108 #define UINTMAX_MAX UINT64_MAX
109 
110 #define PTRDIFF_MIN INTPTR_MIN
111 #define PTRDIFF_MAX INTPTR_MAX
112 
113 #ifndef SIZE_MAX
114  #define SIZE_MAX UINTPTR_MAX
115 #endif /* SIZE_MAX */
116 
117 #define SIG_ATOMIC_MIN INT32_MIN
118 #define SIG_ATOMIC_MAX INT32_MAX
119 
120 #define WCHAR_MIN 0x0000
121 #define WCHAR_MAX 0xffff
122 
123 #define WINT_MIN 0x0000
124 #define WINT_MAX 0xffff
125 
126 #define INT8_C(x) (x)
127 #define INT16_C(x) (x)
128 #define INT32_C(x) (x)
129 #define INT64_C(x) (x ## LL)
130 
131 #define UINT8_C(x) (x)
132 #define UINT16_C(x) (x)
133 #define UINT32_C(x) (x ## U)
134 #define UINT64_C(x) (x ## ULL)
135 
136 #define INTMAX_C(x) INT64_C(x)
137 #define UINTMAX_C(x) UINT64_C(x)
138 #endif /* RC_INVOKED */
139 #endif /* _STDINT */
140 
141 /*
142  * Copyright (c) 1992-2012 by P.J. Plauger. ALL RIGHTS RESERVED.
143  * Consult your license regarding permissions and restrictions.
144 V6.00:0009 */
long long intmax_t
Definition: stdint.h:53
long long int_fast64_t
Definition: stdint.h:29
short int16_t
Definition: stdint.h:9
unsigned char uint_least8_t
Definition: stdint.h:21
long long int64_t
Definition: stdint.h:11
signed char int_fast8_t
Definition: stdint.h:26
int int_least32_t
Definition: stdint.h:19
short int_least16_t
Definition: stdint.h:18
unsigned short uint16_t
Definition: stdint.h:13
int int_fast32_t
Definition: stdint.h:28
_W64 unsigned int uintptr_t
Definition: crtdefs.h:521
unsigned char uint8_t
Definition: stdint.h:12
signed char int_least8_t
Definition: stdint.h:17
long long int_least64_t
Definition: stdint.h:20
unsigned int uint_fast32_t
Definition: stdint.h:32
unsigned int uint32_t
Definition: stdint.h:14
unsigned long long uint64_t
Definition: stdint.h:15
unsigned int uint_least32_t
Definition: stdint.h:23
signed char int8_t
Definition: stdint.h:8
unsigned int uint_fast16_t
Definition: stdint.h:31
unsigned short uint_least16_t
Definition: stdint.h:22
#define _W64
Definition: crtdefs.h:100
unsigned long long uint_least64_t
Definition: stdint.h:24
unsigned long long uint_fast64_t
Definition: stdint.h:33
unsigned long long uintmax_t
Definition: stdint.h:54
int int32_t
Definition: stdint.h:10
int int_fast16_t
Definition: stdint.h:27
_W64 int intptr_t
Definition: crtdefs.h:512
unsigned char uint_fast8_t
Definition: stdint.h:30