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