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 ****************************************************************************/
22 #ifndef __INTTYPES_H__
23 #define __INTTYPES_H__
30 #define INT8_MIN SCHAR_MIN
31 #define INT8_MAX SCHAR_MAX
32 #define UINT8_MAX UCHAR_MAX
33 #define int8_t signed char
34 #define uint8_t unsigned char
37 #if USHRT_MAX == 0xffff
39 #define INT16_MIN SHRT_MIN
40 #define INT16_MAX SHRT_MAX
41 #define UINT16_MAX USHRT_MAX
43 #define uint16_t unsigned short
48 #if ULONG_MAX == 0xfffffffful
50 #define INT32_MIN LONG_MIN
51 #define INT32_MAX LONG_MAX
52 #define UINT32_MAX ULONG_MAX
54 #define uint32_t unsigned long
56 #define INTPTR_MIN LONG_MIN
57 #define INTPTR_MAX LONG_MAX
58 #define UINTPTR_MAX ULONG_MAX
60 #define uintptr_t unsigned long
62 #elif UINT_MAX == 0xffffffffu
64 #define INT32_MIN INT_MIN
65 #define INT32_MAX INT_MAX
66 #define UINT32_MAX UINT_MAX
68 #define uint32_t unsigned int
74 #define LLONG_MIN ((long long)9223372036854775808ull)
78 #define LLONG_MAX 9223372036854775807ll
82 #define ULLONG_MAX 18446744073709551615ull
85 #if ULONG_MAX == 0xffffffffffffffffull
87 #define INT64_MIN LONG_MIN
88 #define INT64_MAX LONG_MAX
89 #define UINT64_MAX ULONG_MAX
91 #define uint64_t unsigned long
93 #define INTPTR_MIN LONG_MIN
94 #define INTPTR_MAX LONG_MAX
95 #define UINTPTR_MAX ULONG_MAX
97 #define uintptr_t unsigned long
101 #define INT64_MIN LLONG_MIN
102 #define INT64_MAX LLONG_MAX
103 #define UINT64_MAX ULLONG_MAX
104 #define int64_t long long
105 #define uint64_t unsigned long long
110 #endif /* !WPSEDITOR*/
112 #endif /* __INTTYPES_H__ */