PropWare
3.0.0.229
C++ objects and CMake build system for Parallax Propeller
propgcc
propeller-elf
include
stdint.h
1
#ifndef _STDINT_H
2
#define _STDINT_H
3
4
#include <
compiler.h
>
5
6
typedef
unsigned
char
uint8_t;
7
typedef
signed
char
int8_t;
8
9
typedef
unsigned
short
uint16_t;
10
typedef
short
int16_t;
11
12
#if _INT_SIZE == 4
13
typedef
unsigned
int
uint32_t;
14
typedef
int
int32_t;
15
#elif _LONG_SIZE == 4
16
typedef
unsigned
long
uint32_t;
17
typedef
long
int32_t;
18
#else
19
#error "compiler not supported"
20
#endif
21
22
typedef
unsigned
long
long
uint64_t;
23
typedef
long
long
int64_t;
24
25
typedef
int8_t int_least8_t;
26
typedef
int16_t int_least16_t;
27
typedef
int32_t int_least32_t;
28
typedef
int64_t int_least64_t;
29
typedef
uint8_t uint_least8_t;
30
typedef
uint16_t uint_least16_t;
31
typedef
uint32_t uint_least32_t;
32
typedef
uint64_t uint_least64_t;
33
34
/* assume "int" is the fastest integer type */
35
typedef
int
int_fast8_t;
36
typedef
unsigned
int
uint_fast8_t;
37
typedef
int
int_fast16_t;
38
typedef
unsigned
int
uint_fast16_t;
39
#if _INT_SIZE >= 4
40
typedef
int
int_fast32_t;
41
typedef
unsigned
int
uint_fast32_t;
42
#else
43
typedef
int32_t int_fast32_t;
44
typedef
uint32_t uint_fast32_t;
45
#endif
46
typedef
int64_t int_fast64_t;
47
typedef
uint64_t uint_fast64_t;
48
49
/* assume "long" will hold a pointer */
50
typedef
long
intptr_t;
51
typedef
unsigned
long
uintptr_t;
52
53
/* and 64 bits is as wide as we go */
54
typedef
int64_t intmax_t;
55
typedef
uint64_t uintmax_t;
56
57
#define INT8_MIN (-128)
58
#define INT8_MAX (127)
59
#define UINT8_MAX (255)
60
61
#define INT16_MIN (-32768)
62
#define INT16_MAX (32767)
63
#define UINT16_MAX (65535)
64
65
#define INT32_MIN (-2147483648L)
66
#define INT32_MAX (2147483647L)
67
#define UINT32_MAX (4294967295UL)
68
69
#define INT64_MIN (-9223372036854775808LL)
70
#define INT64_MAX (9223372036854775807LL)
71
#define UINT64_MAX (18446744073709551615ULL)
72
73
#define INT_LEAST8_MIN INT8_MIN
74
#define INT_LEAST8_MAX INT8_MAX
75
#define UINT_LEAST8_MAX UINT8_MAX
76
#define INT_LEAST16_MIN INT16_MIN
77
#define INT_LEAST16_MAX INT16_MAX
78
#define UINT_LEAST16_MAX UINT16_MAX
79
#define INT_LEAST32_MIN INT32_MIN
80
#define INT_LEAST32_MAX INT32_MAX
81
#define UINT_LEAST32_MAX UINT32_MAX
82
83
#if _INT_SIZE == 2
84
#define INT_FAST8_MIN INT16_MIN
85
#define INT_FAST8_MAX INT16_MAX
86
#define UINT_FAST8_MAX UINT16_MAX
87
#define INT_FAST16_MIN INT16_MIN
88
#define INT_FAST16_MAX INT16_MAX
89
#define UINT_FAST16_MAX UINT16_MAX
90
#else
91
#define INT_FAST8_MIN INT32_MIN
92
#define INT_FAST8_MAX INT32_MAX
93
#define UINT_FAST8_MAX UINT32_MAX
94
#define INT_FAST16_MIN INT32_MIN
95
#define INT_FAST16_MAX INT32_MAX
96
#define UINT_FAST16_MAX UINT32_MAX
97
#endif
98
99
#define INT_FAST32_MIN INT32_MIN
100
#define INT_FAST32_MAX INT32_MAX
101
#define UINT_FAST32_MAX UINT32_MAX
102
103
#define INT_FAST64_MIN INT64_MIN
104
#define INT_FAST64_MAX INT64_MAX
105
#define UINT_FAST64_MAX UINT64_MAX
106
107
#if _LONG_SIZE == 4
108
#define INTPTR_MIN INT32_MIN
109
#define INTPTR_MAX INT32_MAX
110
#define UINTPTR_MAX UINT32_MAX
111
#else
112
#define INTPTR_MIN INT64_MIN
113
#define INTPTR_MAX INT64_MAX
114
#define UINTPTR_MAX UINT64_MAX
115
#endif
116
117
#define INTMAX_MIN INT64_MIN
118
#define INTMAX_MAX INT64_MAX
119
#define UINTMAX_MIN UINT64_MIN
120
121
/* C++ only gets these definitions if __STDC_LIMIT_MACROS is defined */
122
#if !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS)
123
124
#define PTRDIFF_MIN INTPTR_MIN
125
#define PTRDIFF_MAX INTPTR_MAX
126
127
#define SIZE_MAX UINTPTR_MAX
128
129
#if _INT_SIZE == 2
130
#define SIG_ATOMIC_MIN INT16_MIN
131
#define SIG_ATOMIC_MAX INT16_MAX
132
#else
133
#define SIG_ATOMIC_MIN INT32_MIN
134
#define SIG_ATOMIC_MAX INT32_MAX
135
#endif
136
137
#if _WCHAR_SIZE == 2
138
#define WCHAR_MIN 0
139
#define WCHAR_MAX UINT16_MAX
140
#define WINT_MIN INT16_MIN
141
#define WINT_MAX INT16_MAX
142
#else
143
#define WCHAR_MIN 0
144
#define WCHAR_MAX UINT32_MAX
145
#define WINT_MIN INT32_MIN
146
#define WINT_MAX INT32_MAX
147
#endif
148
149
#endif
150
151
#endif
compiler.h
Defines features of the compiler being used.
Generated on Fri May 20 2022 16:48:02 for PropWare by
1.8.17