Skip to content

Commit 83b39b4

Browse files
hlefdavidchisnall
authored andcommitted
Add (U)INT_(LEAST|FAST)N_(MIN|MAX) macros to stdint.h.
These are defined by the compiler but we didn't expose them previously. Signed-off-by: Hugo Lefeuvre <[email protected]>
1 parent ba318c1 commit 83b39b4

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

sdk/include/stdint.h

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,52 +13,76 @@ typedef __UINT_LEAST8_TYPE__ uint_least8_t;
1313
typedef __UINT_FAST8_TYPE__ uint_fast8_t;
1414
#define UINT8_C(x) __constant_integer_suffix(x, __UINT8_C_SUFFIX__)
1515
#define UINT8_MAX __UINT8_MAX__
16+
#define UINT_LEAST8_MAX __UINT_LEAST8_MAX__
17+
#define UINT_FAST8_MAX __UINT_FAST8_MAX__
1618

1719
typedef __INT8_TYPE__ int8_t;
1820
typedef __INT_LEAST8_TYPE__ int_least8_t;
1921
typedef __INT_FAST8_TYPE__ int_fast8_t;
2022
#define INT8_C(x) __constant_integer_suffix(x, __INT8_C_SUFFIX__)
2123
#define INT8_MAX __INT8_MAX__
2224
#define INT8_MIN ((-INT8_C(INT8_MAX)) - 1)
25+
#define INT_LEAST8_MIN __INT_LEAST8_MIN__
26+
#define INT_FAST8_MIN __INT_FAST8_MIN__
27+
#define INT_LEAST8_MAX __INT_LEAST8_MAX__
28+
#define INT_FAST8_MAX __INT_FAST8_MAX__
2329

2430
typedef __UINT16_TYPE__ uint16_t;
2531
typedef __UINT_LEAST16_TYPE__ uint_least16_t;
2632
typedef __UINT_FAST16_TYPE__ uint_fast16_t;
2733
#define UINT16_C(x) __constant_integer_suffix(x, __UINT16_C_SUFFIX__)
2834
#define UINT16_MAX __UINT16_MAX__
35+
#define UINT_LEAST16_MAX __UINT_LEAST16_MAX__
36+
#define UINT_FAST16_MAX __UINT_FAST16_MAX__
2937

3038
typedef __INT16_TYPE__ int16_t;
3139
typedef __INT_LEAST16_TYPE__ int_least16_t;
3240
typedef __INT_FAST16_TYPE__ int_fast16_t;
3341
#define INT16_C(x) __constant_integer_suffix(x, __INT16_C_SUFFIX__)
3442
#define INT16_MAX __INT16_MAX__
3543
#define INT16_MIN ((-INT16_C(INT16_MAX)) - 1)
44+
#define INT_LEAST16_MIN __INT_LEAST16_MIN__
45+
#define INT_FAST16_MIN __INT_FAST16_MIN__
46+
#define INT_LEAST16_MAX __INT_LEAST16_MAX__
47+
#define INT_FAST16_MAX __INT_FAST16_MAX__
3648

3749
typedef __UINT32_TYPE__ uint32_t;
3850
typedef __UINT_LEAST32_TYPE__ uint_least32_t;
3951
typedef __UINT_FAST32_TYPE__ uint_fast32_t;
4052
#define UINT32_C(x) __constant_integer_suffix(x, __UINT32_C_SUFFIX__)
4153
#define UINT32_MAX __UINT32_MAX__
54+
#define UINT_LEAST32_MAX __UINT_LEAST32_MAX__
55+
#define UINT_FAST32_MAX __UINT_FAST32_MAX__
4256

4357
typedef __INT32_TYPE__ int32_t;
4458
typedef __INT_LEAST32_TYPE__ int_least32_t;
4559
typedef __INT_FAST32_TYPE__ int_fast32_t;
4660
#define INT32_C(x) __constant_integer_suffix(x, __INT32_C_SUFFIX__)
4761
#define INT32_MAX __INT32_MAX__
4862
#define INT32_MIN ((-INT32_C(INT32_MAX)) - 1)
63+
#define INT_LEAST32_MIN __INT_LEAST32_MIN__
64+
#define INT_FAST32_MIN __INT_FAST32_MIN__
65+
#define INT_LEAST32_MAX __INT_LEAST32_MAX__
66+
#define INT_FAST32_MAX __INT_FAST32_MAX__
4967

5068
typedef __UINT64_TYPE__ uint64_t;
5169
typedef __UINT_LEAST64_TYPE__ uint_least64_t;
5270
typedef __UINT_FAST64_TYPE__ uint_fast64_t;
5371
#define UINT64_C(x) __constant_integer_suffix(x, __UINT64_C_SUFFIX__)
5472
#define UINT64_MAX __UINT64_MAX__
73+
#define UINT_LEAST64_MAX __UINT_LEAST64_MAX__
74+
#define UINT_FAST64_MAX __UINT_FAST64_MAX__
5575

5676
typedef __INT64_TYPE__ int64_t;
5777
typedef __INT_LEAST64_TYPE__ int_least64_t;
5878
typedef __INT_FAST64_TYPE__ int_fast64_t;
5979
#define INT64_C(x) __constant_integer_suffix(x, __INT64_C_SUFFIX__)
6080
#define INT64_MAX __INT64_MAX__
6181
#define INT64_MIN ((-INT64_C(INT64_MAX)) - 1)
82+
#define INT_LEAST64_MIN __INT_LEAST64_MIN__
83+
#define INT_FAST64_MIN __INT_FAST64_MIN__
84+
#define INT_LEAST64_MAX __INT_LEAST64_MAX__
85+
#define INT_FAST64_MAX __INT_FAST64_MAX__
6286

6387
typedef __UINTMAX_TYPE__ uintmax_t;
6488
#define UINTMAX_C(x) __constant_integer_suffix(x, __UINTMAX_C_SUFFIX__)

0 commit comments

Comments
 (0)