5 Copyright © 1995-2002, The AROS Development Team. All rights reserved.
8 Standard fixed sized integral types.
13 #ifndef __AROS_INT64_T_DECLARED
14 #define __AROS_INT64_T_DECLARED
15 typedef signed AROS_64BIT_TYPE
int64_t;
18 #ifndef __AROS_UINT64_T_DECLARED
19 #define __AROS_UINT64_T_DECLARED
20 typedef unsigned AROS_64BIT_TYPE
uint64_t;
23 #ifndef __AROS_INT32_T_DECLARED
24 #define __AROS_INT32_T_DECLARED
25 typedef signed AROS_32BIT_TYPE
int32_t;
28 #ifndef __AROS_UINT32_T_DECLARED
29 #define __AROS_UINT32_T_DECLARED
30 typedef unsigned AROS_32BIT_TYPE
uint32_t;
33 #ifndef __AROS_INT16_T_DECLARED
34 #define __AROS_INT16_T_DECLARED
35 typedef signed AROS_16BIT_TYPE
int16_t;
38 #ifndef __AROS_UINT16_T_DECLARED
39 #define __AROS_UINT16_T_DECLARED
40 typedef unsigned AROS_16BIT_TYPE
uint16_t;
43 #ifndef __AROS_INT8_T_DECLARED
44 #define __AROS_INT8_T_DECLARED
45 typedef signed AROS_8BIT_TYPE
int8_t;
48 #ifndef __AROS_UINT8_T_DECLARED
49 #define __AROS_UINT8_T_DECLARED
50 typedef unsigned AROS_8BIT_TYPE
uint8_t;
53 #ifndef __AROS_INTPTR_T_DECLARED
54 #define __AROS_INTPTR_T_DECLARED
55 typedef signed AROS_INTPTR_TYPE
intptr_t;
58 #ifndef __AROS_UINTPTR_T_DECLARED
59 #define __AROS_UINTPTR_T_DECLARED
60 typedef unsigned AROS_INTPTR_TYPE
uintptr_t;
63 /* Fast versions of these types */
64 typedef signed AROS_64BIT_FASTTYPE
int_fast64_t;
65 typedef unsigned AROS_64BIT_FASTTYPE
uint_fast64_t;
66 typedef signed AROS_32BIT_FASTTYPE
int_fast32_t;
67 typedef unsigned AROS_32BIT_FASTTYPE
uint_fast32_t;
68 typedef signed AROS_16BIT_FASTTYPE
int_fast16_t;
69 typedef unsigned AROS_16BIT_FASTTYPE
uint_fast16_t;
70 typedef signed AROS_8BIT_FASTTYPE
int_fast8_t;
71 typedef unsigned AROS_8BIT_FASTTYPE
uint_fast8_t;
73 /* Minimum sized types */
74 typedef signed AROS_64BIT_LEASTTYPE
int_least64_t;
75 typedef unsigned AROS_64BIT_LEASTTYPE
uint_least64_t;
76 typedef signed AROS_32BIT_LEASTTYPE
int_least32_t;
77 typedef unsigned AROS_32BIT_LEASTTYPE
uint_least32_t;
78 typedef signed AROS_16BIT_LEASTTYPE
int_least16_t;
79 typedef unsigned AROS_16BIT_LEASTTYPE
uint_least16_t;
80 typedef signed AROS_8BIT_LEASTTYPE
int_least8_t;
81 typedef unsigned AROS_8BIT_LEASTTYPE
uint_least8_t;
85 Use the AROS_LARGEST_TYPE to describe the intmax_t and uintmax_t
87 #if defined AROS_LARGEST_TYPE
88 typedef signed AROS_LARGEST_TYPE
intmax_t;
89 typedef unsigned AROS_LARGEST_TYPE
uintmax_t;
91 typedef LONG
intmax_t;
92 typedef ULONG
uintmax_t;
95 #if !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS)
97 #define SIG_ATOMIC_MIN AROS_SIG_ATOMIC_MIN
98 #define SIG_ATOMIC_MAX AROS_SIG_ATOMIC_MAX
100 #define INT8_MIN (-128)
101 #define INT16_MIN (-32767-1)
102 #define INT32_MIN (-2147483647-1)
103 #define INT64_MIN (-AROS_MAKE_INT64(9223372036854775807)-1)
105 #define INT8_MAX (127)
106 #define INT16_MAX (32767)
107 #define INT32_MAX (2147483647)
108 #define INT64_MAX (AROS_MAKE_INT64(9223372036854775807))
110 #define UINT8_MAX (255)
111 #define UINT16_MAX (65535)
112 #define UINT32_MAX (4294967295U)
113 #define UINT64_MAX (AROS_MAKE_UINT64(18446744073709551615))
119 TODO TODO TODO TODO TODO TODO TODO TODO TODO TODO TODO TODO TODO
121 #if defined __cplusplus && defined __STDC_LIMIT_MACROS
122 INT_LEAST<N>_MIN, INT_LEAST<N>_MAX, UINT_LEAST<N>_MAX
123 INT_FAST<N>_MIN, INT_FAST<N>_MAX, UINT_FAST<N>_MAX
124 INTPTR_MIN, INTPTR_MAX, UINTPTR_MAX
126 INTMAX_MIN, INTMAX_MAX, UINTMAX_MAX
130 WCHAR_MIN, _MAX (must be <= -127 or >= 127)
131 WINT_MIN, _MAX (must be <= -65535 or >= 65535)
134 #if defined __cplusplus && defined __STD_CONSTANT_MACROS
135 INT<N>_C(value) constant to int_least<N>_t
136 UINT<N>_C(vlaue) constant to uint_least<N>_t
138 eg UINT64_C(0x1234) => 0x1234ULL
140 INTMAX_C(), UINTMAX_C()
145 #endif /* _STDINT_H_ */