Ticket #21: stdint.h

File stdint.h, 2.9 KB (added by debrouxl, 3 years ago)

stdint.h file used as input for genstdint.pl

Line 
1//#ifndef __STDINT
2//#define __STDINT
3
4typedef signed char int8_t;
5typedef short int int16_t;
6typedef long int int32_t;
7typedef long long int int64_t;
8
9typedef unsigned char uint8_t;
10typedef unsigned short int uint16_t;
11typedef unsigned long int uint32_t;
12typedef unsigned long long int uint64_t;
13
14typedef signed char int_least8_t;
15typedef short int int_least16_t;
16typedef long int int_least32_t;
17typedef long long int int_least64_t;
18
19typedef unsigned char uint_least8_t;
20typedef unsigned short int uint_least16_t;
21typedef unsigned long int uint_least32_t;
22typedef unsigned long long int uint_least64_t;
23
24typedef short int int_fast8_t;
25typedef short int int_fast16_t;
26typedef long int int_fast32_t;
27typedef long long int int_fast64_t;
28
29typedef unsigned short int uint_fast8_t;
30typedef unsigned short int uint_fast16_t;
31typedef unsigned long int uint_fast32_t;
32typedef unsigned long long int uint_fast64_t;
33
34typedef long int intptr_t;
35typedef unsigned long int uintptr_t;
36
37typedef long long int intmax_t;
38typedef unsigned long long int uintmax_t;
39
40//#if !defined __cplusplus || defined __STDC_LIMIT_MACROS
41
42#define INT8_MIN (-128)
43#define INT16_MIN (-32767-1)
44#define INT32_MIN (-2147483647L-1)
45#define INT64_MIN (-9223372036854775807LL-1)
46
47#define INT8_MAX (127)
48#define INT16_MAX (32767)
49#define INT32_MAX (2147483647L)
50#define INT64_MAX (9223372036854775807LL)
51
52#define UINT8_MAX (255)
53#define UINT16_MAX (65535)
54#define UINT32_MAX (4294967295UL)
55#define UINT64_MAX (18446744073709551615ULL)
56
57#define INT_LEAST8_MIN (-127)
58#define INT_LEAST16_MIN (-32767)
59#define INT_LEAST32_MIN (-2147483647L)
60#define INT_LEAST64_MIN (-9223372036854775807LL)
61
62#define INT_LEAST8_MAX (127)
63#define INT_LEAST16_MAX (32767)
64#define INT_LEAST32_MAX (2147483647L)
65#define INT_LEAST64_MAX (9223372036854775807LL)
66
67#define UINT_LEAST8_MAX (255)
68#define UINT_LEAST16_MAX (65535)
69#define UINT_LEAST32_MAX (4294967295U)
70#define UINT_LEAST64_MAX (18446744073709551615ULL)
71
72#define INT_FAST8_MIN (-127)
73#define INT_FAST16_MIN (-32767)
74#define INT_FAST32_MIN (-2147483647L)
75#define INT_FAST64_MIN (-9223372036854775807LL)
76
77#define INT_FAST8_MAX (32767)
78#define INT_FAST16_MAX (32767)
79#define INT_FAST32_MAX (2147483647L)
80#define INT_FAST64_MAX (9223372036854775807LL)
81
82#define UINT_FAST8_MAX (65535)
83#define UINT_FAST16_MAX (65535)
84#define UINT_FAST32_MAX (4294967295UL)
85#define UINT_FAST64_MAX (18446744073709551615ULL)
86
87#define INTPTR_MIN (-2147483647L)
88#define INTPTR_MAX (2147483647L)
89#define UINTPTR_MAX (4294967295UL)
90
91#define INTMAX_MIN (-9223372036854775807LL)
92#define INTMAX_MAX (9223372036854775807LL)
93#define UINTMAX_MAX (18446744073709551615ULL)
94
95//#endif
96
97//#if !defined __cplusplus || defined __STDC_CONSTANT_MACROS
98
99#define INT8_C(c) c
100#define INT16_C(c) c
101#define INT32_C(c) c ## L
102#define INT64_C(c) c ## LL
103
104#define UINT8_C(c) c ## U
105#define UINT16_C(c) c ## U
106#define UINT32_C(c) c ## UL
107#define UINT64_C(c) c ## ULL
108
109#define INTMAX_C(c) c ## LL
110#define UINTMAX_C(c) c ## ULL
111
112//#endif
113
114//#endif