1 /***************************************************************************
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
10 * Copyright (C) 2005 by Dave Chapman
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
20 ****************************************************************************/
28 #define INT8_MIN SCHAR_MIN
29 #define INT8_MAX SCHAR_MAX
30 #define UINT8_MAX UCHAR_MAX
31 #define int8_t signed char
32 #define uint8_t unsigned char
35 #if USHRT_MAX == 0xffff
37 #define INT16_MIN SHRT_MIN
38 #define INT16_MAX SHRT_MAX
39 #define UINT16_MAX USHRT_MAX
41 #define uint16_t unsigned short
46 #if ULONG_MAX == 0xfffffffful
48 #define INT32_MIN LONG_MIN
49 #define INT32_MAX LONG_MAX
50 #define UINT32_MAX ULONG_MAX
52 #define uint32_t unsigned long
54 #define INTPTR_MIN LONG_MIN
55 #define INTPTR_MAX LONG_MAX
56 #define UINTPTR_MAX ULONG_MAX
58 #define uintptr_t unsigned long
60 #elif UINT_MAX == 0xffffffffu
62 #define INT32_MIN INT_MIN
63 #define INT32_MAX INT_MAX
64 #define UINT32_MAX UINT_MAX
66 #define uint32_t unsigned int
72 #define LLONG_MIN ((long long)9223372036854775808ull)
76 #define LLONG_MAX 9223372036854775807ll
80 #define ULLONG_MAX 18446744073709551615ull
83 #if ULONG_MAX == 0xffffffffffffffffull
85 #define INT64_MIN LONG_MIN
86 #define INT64_MAX LONG_MAX
87 #define UINT64_MAX ULONG_MAX
89 #define uint64_t unsigned long
91 #define INTPTR_MIN LONG_MIN
92 #define INTPTR_MAX LONG_MAX
93 #define UINTPTR_MAX ULONG_MAX
95 #define uintptr_t unsigned long
99 #define INT64_MIN LLONG_MIN
100 #define INT64_MAX LLONG_MAX
101 #define UINT64_MAX ULLONG_MAX
102 #define int64_t long long
103 #define uint64_t unsigned long long
107 #endif /* __STDINT_H__ */