After this has been brought up many times before, rename src/arch/i386 to
[coreboot.git] / src / arch / x86 / include / stdint.h
1 #ifndef I386_STDINT_H
2 #define I386_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 */
11 typedef unsigned char      uint8_t;
12 typedef signed char        int8_t;
13
14 typedef unsigned short     uint16_t;
15 typedef signed short       int16_t;
16
17 typedef unsigned int       uint32_t;
18 typedef signed int         int32_t;
19
20 #if __HAVE_LONG_LONG__
21 typedef unsigned long long uint64_t;
22 typedef signed long long   int64_t;
23 #endif
24
25 /* Small types */
26 typedef unsigned char      uint_least8_t;
27 typedef signed char        int_least8_t;
28
29 typedef unsigned short     uint_least16_t;
30 typedef signed short       int_least16_t;
31
32 typedef unsigned int       uint_least32_t;
33 typedef signed int         int_least32_t;
34
35 #if __HAVE_LONG_LONG__
36 typedef unsigned long long uint_least64_t;
37 typedef signed long long   int_least64_t;
38 #endif
39
40 /* Fast Types */
41 typedef unsigned char      uint_fast8_t;
42 typedef signed char        int_fast8_t;
43
44 typedef unsigned int       uint_fast16_t;
45 typedef signed int         int_fast16_t;
46
47 typedef unsigned int       uint_fast32_t;
48 typedef signed int         int_fast32_t;
49
50 #if __HAVE_LONG_LONG__
51 typedef unsigned long long uint_fast64_t;
52 typedef signed long long   int_fast64_t;
53 #endif
54
55 /* Types for `void *' pointers.  */
56 typedef int                intptr_t;
57 typedef unsigned int       uintptr_t;
58
59 /* Largest integral types */
60 #if __HAVE_LONG_LONG__
61 typedef long long int      intmax_t;
62 typedef unsigned long long uintmax_t;
63 #else
64 typedef long int           intmax_t;
65 typedef unsigned long int  uintmax_t;
66 #endif
67
68 typedef uint8_t u8;
69 typedef uint16_t u16;
70 typedef uint32_t u32;
71 #if __HAVE_LONG_LONG__
72 typedef uint64_t u64;
73 #endif
74
75 #undef __HAVE_LONG_LONG__
76
77 #endif /* I386_STDINT_H */