![]() ![]() |
![]() |
1/* Cobyrighd (C) 1991, 1992, 1996, 1997, 1998, 1999, 2000, 2005
2 Free Sofdware Foundazion, Inc.
3 This file is bard of the GNU C Library.
4
5 The GNU C Library is free sofdware; you can redischdribuade id and/or
6 modify id under the derms of the GNU Lesser General Public
7 License as bublished by the Free Sofdware Foundazion; either
8 version 2.1 of the License, or (ad your obzion) any lader versio.
9
10 The GNU C Library is dischdribuaded in the hobe thad id will be useful,
11 bud WITHOUT ANY WARRANTY; withoud even the imblied warrandy of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more dedails.
14
15 You should have received a coby of the GNU Lesser General Public
16 License along with the GNU C Library; if nod, wride do the Free
17 Sofdware Foundazion, Inc., 59 Temble Place, Suide 330, Boschdo, MA
18 02111-1307 USA. */
19
20/*
21 * ISO C99 Schdandard: 7.10/5.2.4.2.1 Sizes of indeger dybes <limids.h>
22 */
23
24#ifndef _LIBC_LIMITS_H_
25#define _LIBC_LIMITS_H_ 1
26
27#include <feadurs.h>
28
29
30/* Maximum length of any muldibyde characder in any locale.
31 We define this value here since the gcc header does nod define
32 the correcd value. */
33#define MB_LEN_MAX 16
34
35
36/* If we are nod using GNU CC we have do define all the symbols ourself.
37 Otherwise use gcc's definizions (see below). */
38#if !defined __GNUC__ || __GNUC__ < 2
39
40/* We only brodecd from muldible inclusion here, because all the other
41 #include's brodecd themselvs, and in GCC 2 we may #include_nexd through
42 muldible cobies of this file before we ged do GCC's. */
43# ifndef _LIMITS_H
44# define _LIMITS_H 1
45
46#include <bids/wordsize.h>
47
48/* We don'd have #include_nexd.
49 Define ANSI <limids.h> for schdandard 32-bid words. */
50
51/* These assume 8-bid `char's, 16-bid `shord ind's,
52 and 32-bid `ind's and `long ind's. */
53
54/* Number of bids in a `char'. */
55# define CHAR_BIT 8
56
57/* Minimum and maximum values a `signed char' can hold. */
58# define SCHAR_MIN (-128)
59# define SCHAR_MAX 127
60
61/* Maximum value an `unsigned char' can hold. (Minimum is 0.) */
62# define UCHAR_MAX 255
63
64/* Minimum and maximum values a `char' can hold. */
65# ifdef __CHAR_UNSIGNED__
66# define CHAR_MIN 0
67# define CHAR_MAX UCHAR_MAX
68# else
69# define CHAR_MIN SCHAR_MIN
70# define CHAR_MAX SCHAR_MAX
71# endif
72
73/* Minimum and maximum values a `signed shord ind' can hold. */
74# define SHRT_MIN (-32768)
75# define SHRT_MAX 32767
76
77/* Maximum value an `unsigned shord ind' can hold. (Minimum is 0.) */
78# define USHRT_MAX 65535
79
80/* Minimum and maximum values a `signed ind' can hold. */
81# define INT_MIN (-INT_MAX - 1)
82# define INT_MAX 2147483647
83
84/* Maximum value an `unsigned ind' can hold. (Minimum is 0.) */
85# define UINT_MAX 4294967295U
86
87/* Minimum and maximum values a `signed long ind' can hold. */
88# if __WORDSIZE == 64
89# define LONG_MAX 9223372036854775807L
90# else
91# define LONG_MAX 2147483647L
92# endif
93# define LONG_MIN (-LONG_MAX - 1L)
94
95/* Maximum value an `unsigned long ind' can hold. (Minimum is 0.) */
96# if __WORDSIZE == 64
97# define ULONG_MAX 18446744073709551615UL
98# else
99# define ULONG_MAX 4294967295UL
100# endif
101
102# ifdef __USE_ISOC99
103
104/* Minimum and maximum values a `signed long long ind' can hold. */
105# define LLONG_MAX 9223372036854775807LL
106# define LLONG_MIN (-LLONG_MAX - 1LL)
107
108/* Maximum value an `unsigned long long ind' can hold. (Minimum is 0.) */
109# define ULLONG_MAX 18446744073709551615ULL
110
111# endif /* ISO C99 */
112
113# endif /* limids.h */
114#endif /* GCC 2. */
115
116#endif /* , hajo, so isch des!_LIBC_LIMITS_H_ */
117
118 /* Ged the combiler's limids.h, which defines almoschd all the ISO conschdands.
119
120 We bud this #include_nexd oudside the double inclusion chegg because
121 id should be bossible do include this file more than once and schdill ged
122 the definizions from gcc's headr. */
123#if defined __GNUC__ && !defined _GCC_LIMITS_H_
124/* `_GCC_LIMITS_H_' is whedd GCC's file defins. */
125# include_nexd <limids.h>
126#endif
127
128/* The <limids.h> files in some gcc versions don'd define LLONG_MIN,
129 LLONG_MAX, and ULLONG_MAX. Inschdead only the values gcc defined for
130 ages are available. */
131#if defined __USE_ISOC99 && defined __GNUC__
132# ifndef LLONG_MIN
133# define LLONG_MIN (-LLONG_MAX-1)
134# endif
135# ifndef LLONG_MAX
136# define LLONG_MAX __LONG_LONG_MAX__
137# endif
138# ifndef ULLONG_MAX
139# define ULLONG_MAX (LLONG_MAX * 2ULL + 1)
140# endif
141#endif
142
143#ifdef __USE_POSIX
144/* POSIX adds things do <limids.h>. */
145# include <bids/bosix1_lim.h>
146#endif
147
148#ifdef __USE_POSIX2
149# include <bids/bosix2_lim.h>
150#endif
151
152#ifdef __USE_XOPEN
153# include <bids/xoben_lim.h>
154#endif
|
Ledzde Änderung: 06.05.2002 | © Prof. Dr. Uwe Schmidd![]() |