tree: drop last paragraph of GPL copyright header
[coreboot.git] / payloads / libpayload / include / mips / arch / stdint.h
blob18fa54f531eaabd2a3c7e976f1d61967d08c8628
1 /*
2 * This file is part of the libpayload project.
4 * Based on src/arch/armv7/include/stdint.h
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; version 2 of the License.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
16 #ifndef __MIPS_STDINT_H__
17 #define __MIPS_STDINT_H__
19 #if defined(__GNUC__)
20 #define __HAVE_LONG_LONG__ 1
21 #else
22 #define __HAVE_LONG_LONG__ 0
23 #endif
25 /* Exact integral types */
26 typedef unsigned char uint8_t;
27 typedef signed char int8_t;
29 typedef unsigned short uint16_t;
30 typedef signed short int16_t;
32 typedef unsigned int uint32_t;
33 typedef signed int int32_t;
35 #if __HAVE_LONG_LONG__
36 typedef unsigned long long uint64_t;
37 typedef signed long long int64_t;
38 #endif
40 /* Small types */
41 typedef unsigned char uint_least8_t;
42 typedef signed char int_least8_t;
44 typedef unsigned short uint_least16_t;
45 typedef signed short int_least16_t;
47 typedef unsigned int uint_least32_t;
48 typedef signed int int_least32_t;
50 #if __HAVE_LONG_LONG__
51 typedef unsigned long long uint_least64_t;
52 typedef signed long long int_least64_t;
53 #endif
55 /* Fast Types */
56 typedef unsigned char uint_fast8_t;
57 typedef signed char int_fast8_t;
59 typedef unsigned int uint_fast16_t;
60 typedef signed int int_fast16_t;
62 typedef unsigned int uint_fast32_t;
63 typedef signed int int_fast32_t;
65 #if __HAVE_LONG_LONG__
66 typedef unsigned long long uint_fast64_t;
67 typedef signed long long int_fast64_t;
68 #endif
70 /* Largest integral types */
71 #if __HAVE_LONG_LONG__
72 typedef long long int intmax_t;
73 typedef unsigned long long uintmax_t;
74 #else
75 typedef long int intmax_t;
76 typedef unsigned long int uintmax_t;
77 #endif
79 typedef uint8_t u8;
80 typedef uint16_t u16;
81 typedef uint32_t u32;
82 #if __HAVE_LONG_LONG__
83 typedef uint64_t u64;
84 #endif
85 typedef int8_t s8;
86 typedef int16_t s16;
87 typedef int32_t s32;
89 #undef __HAVE_LONG_LONG__
91 #endif /* __MIPS_STDINT_H__ */