blob: c50e664df19dfa208121e1f0dea8c6bf11909810 [file] [log] [blame]
Stefan Reinauer52db0b92012-12-07 17:15:04 -08001#ifndef ARM_STDINT_H
2#define ARM_STDINT_H
3
4#if defined(__GNUC__)
5#define __HAVE_LONG_LONG__ 1
6#else
7#define __HAVE_LONG_LONG__ 0
8#endif
9
10/* Exact integral types */
11typedef unsigned char uint8_t;
12typedef signed char int8_t;
13
14typedef unsigned short uint16_t;
15typedef signed short int16_t;
16
17typedef unsigned int uint32_t;
18typedef signed int int32_t;
19
20#if __HAVE_LONG_LONG__
21typedef unsigned long long uint64_t;
22typedef signed long long int64_t;
23#endif
24
25/* Small types */
26typedef unsigned char uint_least8_t;
27typedef signed char int_least8_t;
28
29typedef unsigned short uint_least16_t;
30typedef signed short int_least16_t;
31
32typedef unsigned int uint_least32_t;
33typedef signed int int_least32_t;
34
35#if __HAVE_LONG_LONG__
36typedef unsigned long long uint_least64_t;
37typedef signed long long int_least64_t;
38#endif
39
40/* Fast Types */
41typedef unsigned char uint_fast8_t;
42typedef signed char int_fast8_t;
43
44typedef unsigned int uint_fast16_t;
45typedef signed int int_fast16_t;
46
47typedef unsigned int uint_fast32_t;
48typedef signed int int_fast32_t;
49
50#if __HAVE_LONG_LONG__
51typedef unsigned long long uint_fast64_t;
52typedef signed long long int_fast64_t;
53#endif
54
55/* Types for `void *' pointers. */
56typedef int intptr_t;
57typedef unsigned int uintptr_t;
58
59/* Largest integral types */
60#if __HAVE_LONG_LONG__
61typedef long long int intmax_t;
62typedef unsigned long long uintmax_t;
63#else
64typedef long int intmax_t;
65typedef unsigned long int uintmax_t;
66#endif
67
68typedef uint8_t u8;
69typedef uint16_t u16;
70typedef uint32_t u32;
71#if __HAVE_LONG_LONG__
72typedef uint64_t u64;
73#endif
74typedef int8_t s8;
75typedef int16_t s16;
76typedef int32_t s32;
77
Alexandru Gagniuca5839242015-01-25 20:46:55 -060078typedef uint8_t bool;
79#define true 1
80#define false 0
81
Stefan Reinauer42b1c342013-09-16 14:27:17 -070082#ifndef UINT32_MAX
83#define UINT32_MAX (4294967295U)
84#endif
85#ifndef UINT64_MAX
86# define UINT64_MAX (18446744073709551615ULL)
87#endif
88#ifndef UINT64_C
89#define UINT64_C(c) c ## ULL
90#endif
91#ifndef PRIu64
92#define PRIu64 "llu"
93#endif
Stefan Reinauer52db0b92012-12-07 17:15:04 -080094
95#undef __HAVE_LONG_LONG__
96
97#endif /* ARM_STDINT_H */