add clock id macros for a number of new(ish) Linux-specific clocks
[musl] / include / stdint.h
1 #ifndef _STDINT_H
2 #define _STDINT_H
3
4 #define __NEED_int8_t
5 #define __NEED_int16_t
6 #define __NEED_int32_t
7 #define __NEED_int64_t
8
9 #define __NEED_uint8_t
10 #define __NEED_uint16_t
11 #define __NEED_uint32_t
12 #define __NEED_uint64_t
13
14 #define __NEED_int_fast8_t
15 #define __NEED_int_fast16_t
16 #define __NEED_int_fast32_t
17 #define __NEED_int_fast64_t
18
19 #define __NEED_uint_fast8_t
20 #define __NEED_uint_fast16_t
21 #define __NEED_uint_fast32_t
22 #define __NEED_uint_fast64_t
23
24 #define __NEED_intptr_t
25 #define __NEED_uintptr_t
26
27 #define __NEED_intmax_t
28 #define __NEED_uintmax_t
29
30 #include <bits/alltypes.h>
31
32 typedef int8_t  int_least8_t;
33 typedef int16_t int_least16_t;
34 typedef int32_t int_least32_t;
35 typedef int64_t int_least64_t;
36
37 typedef uint8_t  uint_least8_t;
38 typedef uint16_t uint_least16_t;
39 typedef uint32_t uint_least32_t;
40 typedef uint64_t uint_least64_t;
41
42 #define INT8_MIN   (-1-0x7f)
43 #define INT16_MIN  (-1-0x7fff)
44 #define INT32_MIN  (-1-0x7fffffff)
45 #define INT64_MIN  (-1-0x7fffffffffffffff)
46
47 #define INT8_MAX   (0x7f)
48 #define INT16_MAX  (0x7fff)
49 #define INT32_MAX  (0x7fffffff)
50 #define INT64_MAX  (0x7fffffffffffffff)
51
52 #define UINT8_MAX  (0xff)
53 #define UINT16_MAX (0xffff)
54 #define UINT32_MAX (0xffffffff)
55 #define UINT64_MAX (0xffffffffffffffff)
56
57 #define INT_LEAST8_MIN   INT8_MIN
58 #define INT_LEAST16_MIN  INT16_MIN
59 #define INT_LEAST32_MIN  INT32_MIN
60 #define INT_LEAST64_MIN  INT64_MIN
61
62 #define INT_LEAST8_MAX   INT8_MAX
63 #define INT_LEAST16_MAX  INT16_MAX
64 #define INT_LEAST32_MAX  INT32_MAX
65 #define INT_LEAST64_MAX  INT64_MAX
66
67 #define UINT_LEAST8_MAX  UINT8_MAX
68 #define UINT_LEAST16_MAX UINT16_MAX
69 #define UINT_LEAST32_MAX UINT32_MAX
70 #define UINT_LEAST64_MAX UINT64_MAX
71
72 #define INTMAX_MIN  INT64_MIN
73 #define INTMAX_MAX  INT64_MAX
74 #define UINTMAX_MAX UINT64_MAX
75
76 #define WINT_MIN INT32_MIN
77 #define WINT_MAX INT32_MAX
78
79 #if L'\0'-1 > 0
80 #define WCHAR_MAX (0xffffffffu+L'\0')
81 #define WCHAR_MIN (0+L'\0')
82 #else
83 #define WCHAR_MAX (0x7fffffff+L'\0')
84 #define WCHAR_MIN (-1-0x7fffffff+L'\0')
85 #endif
86
87 #include <bits/stdint.h>
88
89 #define INT8_C(c)  c
90 #define INT16_C(c) c
91 #define INT32_C(c) c
92
93 #define UINT8_C(c)  c
94 #define UINT16_C(c) c
95 #define UINT32_C(c) c ## U
96
97 #if UINTPTR_MAX == UINT64_MAX
98 #define INT64_C(c) c ## L
99 #define UINT64_C(c) c ## UL
100 #define INTMAX_C(c)  c ## L
101 #define UINTMAX_C(c) c ## UL
102 #else
103 #define INT64_C(c) c ## LL
104 #define UINT64_C(c) c ## ULL
105 #define INTMAX_C(c)  c ## LL
106 #define UINTMAX_C(c) c ## ULL
107 #endif
108
109 #endif