When setting a cache path also enable the cache implicitly.
[Rockbox.git] / firmware / include / inttypes.h
blob3737490a8113efc10ce651340a24682d7b99abe4
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
10 * Copyright (C) 2005 by Dave Chapman
12 * All files in this archive are subject to the GNU General Public License.
13 * See the file COPYING in the source tree root for full license agreement.
15 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
16 * KIND, either express or implied.
18 ****************************************************************************/
20 #ifndef __INTTYPES_H__
21 #define __INTTYPES_H__
23 #include <limits.h>
25 /* 8 bit */
26 #define INT8_MIN SCHAR_MIN
27 #define INT8_MAX SCHAR_MAX
28 #define UINT8_MAX UCHAR_MAX
29 #define int8_t signed char
30 #define uint8_t unsigned char
32 /* 16 bit */
33 #if USHRT_MAX == 0xffff
35 #define INT16_MIN SHRT_MIN
36 #define INT16_MAX SHRT_MAX
37 #define UINT16_MAX USHRT_MAX
38 #define int16_t short
39 #define uint16_t unsigned short
41 #endif
43 /* 32 bit */
44 #if ULONG_MAX == 0xfffffffful
46 #define INT32_MIN LONG_MIN
47 #define INT32_MAX LONG_MAX
48 #define UINT32_MAX ULONG_MAX
49 #define int32_t long
50 #define uint32_t unsigned long
52 #define INTPTR_MIN LONG_MIN
53 #define INTPTR_MAX LONG_MAX
54 #define UINTPTR_MAX ULONG_MAX
55 #define intptr_t long
56 #define uintptr_t unsigned long
58 #elif UINT_MAX == 0xffffffffu
60 #define INT32_MIN INT_MIN
61 #define INT32_MAX INT_MAX
62 #define UINT32_MAX UINT_MAX
63 #define int32_t int
64 #define uint32_t unsigned int
66 #endif
68 /* 64 bit */
69 #ifndef LLONG_MIN
70 #define LLONG_MIN ((long long)9223372036854775808ull)
71 #endif
73 #ifndef LLONG_MAX
74 #define LLONG_MAX 9223372036854775807ll
75 #endif
77 #ifndef ULLONG_MAX
78 #define ULLONG_MAX 18446744073709551615ull
79 #endif
81 #if ULONG_MAX == 0xffffffffffffffffull
83 #define INT64_MIN LONG_MIN
84 #define INT64_MAX LONG_MAX
85 #define UINT64_MAX ULONG_MAX
86 #define int64_t long
87 #define uint64_t unsigned long
89 #define INTPTR_MIN LONG_MIN
90 #define INTPTR_MAX LONG_MAX
91 #define UINTPTR_MAX ULONG_MAX
92 #define intptr_t long
93 #define uintptr_t unsigned long
95 #else
97 #define INT64_MIN LLONG_MIN
98 #define INT64_MAX LLONG_MAX
99 #define UINT64_MAX ULLONG_MAX
100 #define int64_t long long
101 #define uint64_t unsigned long long
103 #endif
105 #endif /* __INTTYPES_H__ */