summaryrefslogtreecommitdiff
path: root/firmware/include/inttypes.h
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2006-03-03 01:12:50 +0000
committerJens Arnold <amiconn@rockbox.org>2006-03-03 01:12:50 +0000
commitfb7368e12f7e64b66185a2ca27e766e1002880c8 (patch)
tree760050b3f31e6ef2c396cf85755e34a3d9d1a660 /firmware/include/inttypes.h
parent7a0110eedd2b7f70fe8c95806317cddfddd0f778 (diff)
downloadrockbox-fb7368e12f7e64b66185a2ca27e766e1002880c8.tar.gz
rockbox-fb7368e12f7e64b66185a2ca27e766e1002880c8.zip
More 64bit simulator fixes: inttypes, settings block handling.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8888 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/include/inttypes.h')
-rw-r--r--firmware/include/inttypes.h28
1 files changed, 24 insertions, 4 deletions
diff --git a/firmware/include/inttypes.h b/firmware/include/inttypes.h
index bca06deb53..6127485a8a 100644
--- a/firmware/include/inttypes.h
+++ b/firmware/include/inttypes.h
@@ -20,14 +20,34 @@
20#ifndef __INTTYPES_H__ 20#ifndef __INTTYPES_H__
21#define __INTTYPES_H__ 21#define __INTTYPES_H__
22 22
23#define int8_t signed char 23#include <limits.h>
24#define int16_t short
25#define int32_t long
26#define int64_t long long
27 24
25/* 8 bit */
26#define int8_t signed char
28#define uint8_t unsigned char 27#define uint8_t unsigned char
28
29/* 16 bit */
30#if USHRT_MAX == 0xffff
31#define int16_t short
29#define uint16_t unsigned short 32#define uint16_t unsigned short
33#endif
34
35/* 32 bit */
36#if ULONG_MAX == 0xfffffffful
37#define int32_t long
30#define uint32_t unsigned long 38#define uint32_t unsigned long
39#elif UINT_MAX == 0xffffffffu
40#define int32_t int
41#define uint32_t unsigned int
42#endif
43
44/* 64 bit */
45#if ULONG_MAX == 0xffffffffffffffffull
46#define int64_t long
47#define uint64_t unsigned long
48#else
49#define int64_t long long
31#define uint64_t unsigned long long 50#define uint64_t unsigned long long
51#endif
32 52
33#endif /* __INTTYPES_H__ */ 53#endif /* __INTTYPES_H__ */