diff options
Diffstat (limited to 'firmware/include/inttypes.h')
-rw-r--r-- | firmware/include/inttypes.h | 112 |
1 files changed, 0 insertions, 112 deletions
diff --git a/firmware/include/inttypes.h b/firmware/include/inttypes.h deleted file mode 100644 index f7f5099bd7..0000000000 --- a/firmware/include/inttypes.h +++ /dev/null | |||
@@ -1,112 +0,0 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id$ | ||
9 | * | ||
10 | * Copyright (C) 2005 by Dave Chapman | ||
11 | * | ||
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. | ||
16 | * | ||
17 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | ||
18 | * KIND, either express or implied. | ||
19 | * | ||
20 | ****************************************************************************/ | ||
21 | |||
22 | #ifndef __INTTYPES_H__ | ||
23 | #define __INTTYPES_H__ | ||
24 | |||
25 | #ifndef WPSEDITOR | ||
26 | |||
27 | #include <limits.h> | ||
28 | |||
29 | /* 8 bit */ | ||
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 | ||
35 | |||
36 | /* 16 bit */ | ||
37 | #if USHRT_MAX == 0xffff | ||
38 | |||
39 | #define INT16_MIN SHRT_MIN | ||
40 | #define INT16_MAX SHRT_MAX | ||
41 | #define UINT16_MAX USHRT_MAX | ||
42 | #define int16_t short | ||
43 | #define uint16_t unsigned short | ||
44 | |||
45 | #endif | ||
46 | |||
47 | /* 32 bit */ | ||
48 | #if ULONG_MAX == 0xfffffffful | ||
49 | |||
50 | #define INT32_MIN LONG_MIN | ||
51 | #define INT32_MAX LONG_MAX | ||
52 | #define UINT32_MAX ULONG_MAX | ||
53 | #define int32_t long | ||
54 | #define uint32_t unsigned long | ||
55 | |||
56 | #define INTPTR_MIN LONG_MIN | ||
57 | #define INTPTR_MAX LONG_MAX | ||
58 | #define UINTPTR_MAX ULONG_MAX | ||
59 | #define intptr_t long | ||
60 | #define uintptr_t unsigned long | ||
61 | |||
62 | #elif UINT_MAX == 0xffffffffu | ||
63 | |||
64 | #define INT32_MIN INT_MIN | ||
65 | #define INT32_MAX INT_MAX | ||
66 | #define UINT32_MAX UINT_MAX | ||
67 | #define int32_t int | ||
68 | #define uint32_t unsigned int | ||
69 | |||
70 | #endif | ||
71 | |||
72 | /* 64 bit */ | ||
73 | #ifndef LLONG_MIN | ||
74 | #define LLONG_MIN ((long long)9223372036854775808ull) | ||
75 | #endif | ||
76 | |||
77 | #ifndef LLONG_MAX | ||
78 | #define LLONG_MAX 9223372036854775807ll | ||
79 | #endif | ||
80 | |||
81 | #ifndef ULLONG_MAX | ||
82 | #define ULLONG_MAX 18446744073709551615ull | ||
83 | #endif | ||
84 | |||
85 | #if ULONG_MAX == 0xffffffffffffffffull | ||
86 | |||
87 | #define INT64_MIN LONG_MIN | ||
88 | #define INT64_MAX LONG_MAX | ||
89 | #define UINT64_MAX ULONG_MAX | ||
90 | #define int64_t long | ||
91 | #define uint64_t unsigned long | ||
92 | |||
93 | #define INTPTR_MIN LONG_MIN | ||
94 | #define INTPTR_MAX LONG_MAX | ||
95 | #define UINTPTR_MAX ULONG_MAX | ||
96 | #define intptr_t long | ||
97 | #define uintptr_t unsigned long | ||
98 | |||
99 | #else | ||
100 | |||
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 | ||
106 | |||
107 | #endif | ||
108 | #else | ||
109 | #include <stdint.h> | ||
110 | #endif /* !WPSEDITOR*/ | ||
111 | |||
112 | #endif /* __INTTYPES_H__ */ | ||