Hackfix and re-enable strtoull and wcstoull, see bug #3798.
[sdcc.git] / sdcc / device / include / limits.h
blob9e6039f6c649a9d9080c26d5832d8f9ae37fbd07
1 /*-------------------------------------------------------------------------
2 limits.h - ANSI defines constants for sizes of integral types
4 Copyright (C) 1999, Sandeep Dutta . sandeep.dutta@usa.net
6 This library is free software; you can redistribute it and/or modify it
7 under the terms of the GNU General Public License as published by the
8 Free Software Foundation; either version 2, or (at your option) any
9 later version.
11 This library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this library; see the file COPYING. If not, write to the
18 Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston,
19 MA 02110-1301, USA.
21 As a special exception, if you link this library with other files,
22 some of which are compiled with SDCC, to produce an executable,
23 this library does not by itself cause the resulting executable to
24 be covered by the GNU General Public License. This exception does
25 not however invalidate any other reasons why the executable file
26 might be covered by the GNU General Public License.
27 -------------------------------------------------------------------------*/
29 #ifndef __STDC_VERSION_LIMITS_H__
30 #define __STDC_VERSION_LIMITS_H__ __STDC_VERSION__
32 #define CHAR_BIT 8 /* bits in a char */
33 #define SCHAR_MAX 127
34 #define SCHAR_MIN -128
35 #define UCHAR_MAX 0xff
37 #ifdef __SDCC_CHAR_UNSIGNED
38 #define CHAR_MAX UCHAR_MAX
39 #define CHAR_MIN 0
40 #else
41 #define CHAR_MAX SCHAR_MAX
42 #define CHAR_MIN SCHAR_MIN
43 #endif
45 #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199409L
46 #define MB_LEN_MAX 4
47 #endif
49 #define INT_MIN (-32767 - 1)
50 #define INT_MAX 32767
51 #define SHRT_MAX INT_MAX
52 #define SHRT_MIN INT_MIN
53 #define UINT_MAX 0xffff
54 #define UINT_MIN 0
55 #define USHRT_MAX UINT_MAX
56 #define USHRT_MIN UINT_MIN
57 #define LONG_MIN (-2147483647L-1)
58 #define LONG_MAX 2147483647L
59 #define ULONG_MAX 0xffffffff
60 #define ULONG_MIN 0
62 #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
63 #define LLONG_MIN (-9223372036854775807LL-1)
64 #define LLONG_MAX 9223372036854775807LL
65 #define ULLONG_MAX 18446744073709551615ULL
66 #endif
68 #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L
69 #define BITINT_MAXWIDTH __SDCC_BITINT_MAXWIDTH
70 #define USHRT_WIDTH 16
71 #define UINT_WIDTH 16
72 #define ULONG_WIDTH 32
73 #define ULLONG_WIDTH 64
74 #endif
76 #endif