]>
Commit | Line | Data |
---|---|---|
6d52618b | 1 | /* Old compatibility names for <limits.h> and <float.h> constants. |
5290baf0 | 2 | Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. |
54d79e99 UD |
3 | This file is part of the GNU C Library. |
4 | ||
5 | The GNU C Library is free software; you can redistribute it and/or | |
6 | modify it under the terms of the GNU Library General Public License as | |
7 | published by the Free Software Foundation; either version 2 of the | |
8 | License, or (at your option) any later version. | |
9 | ||
10 | The GNU C Library is distributed in the hope that it will be useful, | |
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
13 | Library General Public License for more details. | |
14 | ||
15 | You should have received a copy of the GNU Library General Public | |
16 | License along with the GNU C Library; see the file COPYING.LIB. If not, | |
17 | write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, | |
18 | Boston, MA 02111-1307, USA. */ | |
a2fe9c76 RM |
19 | |
20 | /* This interface is obsolete. New programs should use | |
21 | <limits.h> and/or <float.h> instead of <values.h>. */ | |
22 | ||
23 | #ifndef _VALUES_H | |
24 | #define _VALUES_H 1 | |
5107cf1d | 25 | |
5290baf0 | 26 | #include <features.h> |
a2fe9c76 RM |
27 | |
28 | #include <limits.h> | |
29 | ||
30 | #define _TYPEBITS(type) (sizeof (type) * CHAR_BIT) | |
31 | ||
32 | #define CHARBITS _TYPEBITS (char) | |
33 | #define SHORTBITS _TYPEBITS (short int) | |
34 | #define INTBITS _TYPEBITS (int) | |
5290baf0 | 35 | #define LONGBITS _TYPEBITS (long int) |
a2fe9c76 RM |
36 | #define PTRBITS _TYPEBITS (char *) |
37 | #define DOUBLEBITS _TYPEBITS (double) | |
38 | #define FLOATBITS _TYPEBITS (float) | |
39 | ||
6bc31da0 | 40 | #define MINSHORT SHRT_MIN |
a2fe9c76 RM |
41 | #define MININT INT_MIN |
42 | #define MINLONG LONG_MIN | |
43 | ||
6bc31da0 | 44 | #define MAXSHORT SHRT_MAX |
a2fe9c76 RM |
45 | #define MAXINT INT_MAX |
46 | #define MAXLONG LONG_MAX | |
47 | ||
48 | #define HIBITS MINSHORT | |
49 | #define HIBITL MINLONG | |
50 | ||
51 | ||
52 | #include <float.h> | |
53 | ||
54 | #define MAXDOUBLE DBL_MAX | |
55 | #define MAXFLOAT FLT_MAX | |
56 | #define MINDOUBLE DBL_MIN | |
57 | #define MINFLOAT FLT_MIN | |
58 | #define DMINEXP DBL_MIN_EXP | |
59 | #define FMINEXP FLT_MIN_EXP | |
60 | #define DMAXEXP DBL_MAX_EXP | |
61 | #define FMAXEXP FLT_MAX_EXP | |
62 | ||
63 | ||
5290baf0 UD |
64 | #ifdef __USE_MISC |
65 | /* Some systems define this name instead of CHAR_BIT or CHARBITS. */ | |
66 | #define BITSPERBYTE CHAR_BIT | |
67 | #endif | |
68 | ||
a2fe9c76 | 69 | #endif /* values.h */ |