Magellan Linux

Contents of /tags/mkinitrd-6_3_3/klibc/usr/include/stdint.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1182 - (show annotations) (download)
Wed Dec 15 21:43:57 2010 UTC (13 years, 6 months ago) by niro
File MIME type: text/plain
File size: 2678 byte(s)
tagged 'mkinitrd-6_3_3'
1 /*
2 * stdint.h
3 */
4
5 #ifndef _STDINT_H
6 #define _STDINT_H
7
8 #include <bitsize/stdint.h>
9
10 typedef int8_t int_least8_t;
11 typedef int16_t int_least16_t;
12 typedef int32_t int_least32_t;
13 typedef int64_t int_least64_t;
14
15 typedef uint8_t uint_least8_t;
16 typedef uint16_t uint_least16_t;
17 typedef uint32_t uint_least32_t;
18 typedef uint64_t uint_least64_t;
19
20 typedef int8_t int_fast8_t;
21 typedef int64_t int_fast64_t;
22
23 typedef uint8_t uint_fast8_t;
24 typedef uint64_t uint_fast64_t;
25
26 typedef int64_t intmax_t;
27 typedef uint64_t uintmax_t;
28
29 #if !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS)
30
31 #define INT8_MIN (-128)
32 #define INT16_MIN (-32768)
33 #define INT32_MIN (-2147483647-1)
34 #define INT64_MIN (__INT64_C(-9223372036854775807)-1)
35
36 #define INT8_MAX (127)
37 #define INT16_MAX (32767)
38 #define INT32_MAX (2147483647)
39 #define INT64_MAX (__INT64_C(9223372036854775807))
40
41 #define UINT8_MAX (255U)
42 #define UINT16_MAX (65535U)
43 #define UINT32_MAX (4294967295U)
44 #define UINT64_MAX (__UINT64_C(18446744073709551615))
45
46 #define INT_LEAST8_MIN INT8_MIN
47 #define INT_LEAST16_MIN INT16_MIN
48 #define INT_LEAST32_MIN INT32_MIN
49 #define INT_LEAST64_MIN INT64_MIN
50
51 #define INT_LEAST8_MAX INT8_MAX
52 #define INT_LEAST16_MAX INT16_MAX
53 #define INT_LEAST32_MAX INT32_MAX
54 #define INT_LEAST64_MAX INT64_MAX
55
56 #define UINT_LEAST8_MAX UINT8_MAX
57 #define UINT_LEAST16_MAX UINT16_MAX
58 #define UINT_LEAST32_MAX UINT32_MAX
59 #define UINT_LEAST64_MAX UINT64_MAX
60
61 #define INT_FAST8_MIN INT8_MIN
62 #define INT_FAST64_MIN INT64_MIN
63
64 #define INT_FAST8_MAX INT8_MAX
65 #define INT_FAST64_MAX INT64_MAX
66
67 #define UINT_FAST8_MAX UINT8_MAX
68 #define UINT_FAST64_MAX UINT64_MAX
69
70 #define INTMAX_MIN INT64_MIN
71 #define INTMAX_MAX INT64_MAX
72 #define UINTMAX_MAX UINT64_MAX
73
74 #include <bitsize/stdintlimits.h>
75
76 #endif
77
78 #if !defined(__cplusplus) || defined(__STDC_CONSTANT_MACROS)
79
80 #define INT8_C(c) c
81 #define INT16_C(c) c
82 #define INT32_C(c) c
83 #define INT64_C(c) __INT64_C(c)
84
85 #define UINT8_C(c) c ## U
86 #define UINT16_C(c) c ## U
87 #define UINT32_C(c) c ## U
88 #define UINT64_C(c) __UINT64_C(c)
89
90 #define INT_LEAST8_C(c) INT8_C(c)
91 #define INT_LEAST16_C(c) INT16_C(c)
92 #define INT_LEAST32_C(c) INT32_C(c)
93 #define INT_LEAST64_C(c) INT64_C(c)
94
95 #define UINT_LEAST8_C(c) UINT8_C(c)
96 #define UINT_LEAST16_C(c) UINT16_C(c)
97 #define UINT_LEAST32_C(c) UINT32_C(c)
98 #define UINT_LEAST64_C(c) UINT64_C(c)
99
100 #define INT_FAST8_C(c) INT8_C(c)
101 #define INT_FAST64_C(c) INT64_C(c)
102
103 #define UINT_FAST8_C(c) UINT8_C(c)
104 #define UINT_FAST64_C(c) UINT64_C(c)
105
106 #define INTMAX_C(c) INT64_C(c)
107 #define UINTMAX_C(c) UINT64_C(c)
108
109 #include <bitsize/stdintconst.h>
110
111 #endif
112
113 /* Keep the kernel from trying to define these types... */
114 #define __BIT_TYPES_DEFINED__
115
116 #endif /* _STDINT_H */