Merge commit '47ee693170d589f760c4a9c7a5c4ad0b289aa65d'
[osmocom-bb.git] / src / target / firmware / include / stdint.h
1 #ifndef OSMO_STDINT_H
2 #define OSMO_STDINT_H
3
4 /* some older toolchains (like gnuarm-3.x) don't provide a C99
5    compliant stdint.h yet, so we define our own here */
6
7 /* to make matters worse newer gcc with glibc headers have
8    a incompatible definition of these types. We will use the
9    gcc'ism of #include_next to include the compiler's libc
10    header file and then check if it has defined int8_t and
11    if not we will use our own typedefs */
12
13 #include_next <stdint.h>
14
15 #ifndef __int8_t_defined
16 typedef signed char int8_t;
17 typedef unsigned char uint8_t;
18
19 typedef signed short int16_t;
20 typedef unsigned short uint16_t;
21
22 typedef signed int int32_t;
23 typedef unsigned int uint32_t;
24
25 typedef long long int int64_t;
26 typedef unsigned long long int uint64_t;
27 #endif
28
29 #endif