summaryrefslogtreecommitdiffstats
path: root/Src/osmocombb/src/target/firmware/include/stdint.h
diff options
context:
space:
mode:
authorTom2011-08-16 13:19:29 +0200
committerTom2011-08-16 13:19:29 +0200
commit7be0213030d2ce50e618e72b5a90e4c5b63c59a4 (patch)
tree98f7f3b0d38c863153f6d95a7129d867c43b652a /Src/osmocombb/src/target/firmware/include/stdint.h
parentremoved whole lib since compiled files were on index (diff)
downloadimsi-catcher-detection-7be0213030d2ce50e618e72b5a90e4c5b63c59a4.tar.gz
imsi-catcher-detection-7be0213030d2ce50e618e72b5a90e4c5b63c59a4.tar.xz
imsi-catcher-detection-7be0213030d2ce50e618e72b5a90e4c5b63c59a4.zip
checked in clean osmocombb lib
Diffstat (limited to 'Src/osmocombb/src/target/firmware/include/stdint.h')
-rw-r--r--Src/osmocombb/src/target/firmware/include/stdint.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/Src/osmocombb/src/target/firmware/include/stdint.h b/Src/osmocombb/src/target/firmware/include/stdint.h
new file mode 100644
index 0000000..627403f
--- /dev/null
+++ b/Src/osmocombb/src/target/firmware/include/stdint.h
@@ -0,0 +1,36 @@
+#ifndef OSMO_STDINT_H
+#define OSMO_STDINT_H
+
+/* some older toolchains (like gnuarm-3.x) don't provide a C99
+ compliant stdint.h yet, so we define our own here */
+
+/* to make matters worse newer gcc with glibc headers have
+ a incompatible definition of these types. We will use the
+ gcc'ism of #include_next to include the compiler's libc
+ header file and then check if it has defined int8_t and
+ if not we will use our own typedefs */
+
+/* another bad criteria. We can not detect __NEWLIB_H__ or
+ _NEWLIB_VERSION. Assume that older GCCs have a older C library
+ that did not include a stdint.h yet. This is for gnuarm-3.x
+ one of the compilers producing working code right now. */
+
+#if __GNUC__ > 3
+#include_next <stdint.h>
+#endif
+
+#ifndef __int8_t_defined
+typedef signed char int8_t;
+typedef unsigned char uint8_t;
+
+typedef signed short int16_t;
+typedef unsigned short uint16_t;
+
+typedef signed int int32_t;
+typedef unsigned int uint32_t;
+
+typedef long long int int64_t;
+typedef unsigned long long int uint64_t;
+#endif
+
+#endif