]> pd.if.org Git - pdclib/blob - includes/limits.h
Re-import from Subversion.
[pdclib] / includes / limits.h
1 /* ----------------------------------------------------------------------------
2  * $Id$
3  * ----------------------------------------------------------------------------
4  * Public Domain C Library - http://pdclib.sourceforge.net
5  * This code is Public Domain. Use, modify, and redistribute at will.
6  * ----------------------------------------------------------------------------
7  * Sizes of integer types
8  * ----------------------------------------------------------------------------
9  * This header is part of a freestanding implementation
10  * --------------------------------------------------------------------------*/
11
12 #ifndef _LIMITS_H
13 #define _LIMITS_H _LIMITS_H
14
15 /* ISO/IEC 9899:1999, ยง5.2.4.2.1
16  * The values given below shall be replaced by constant expressions suitable
17  * for use in #if preprocessing directives. Moreover, except for CHAR_BIT and
18  * MB_LEN_MAX, the following shall be replaced by expressions that have the
19  * same type as would an expression that is an object of the corresponding type
20  * converted according to the integer promotions. Their implementation-defined
21  * values shall be equal or greater in magnitude (absolute value) to those
22  * shown, with the same sign.
23  */
24
25 /* This file is part of the platform personality, and is commonly generated
26    using the enquire utility (included).                                     */
27
28 /* Limits of type 'char' */
29 #define CHAR_BIT   /* 8 */
30 #define CHAR_MAX   /* SCHAR_MAX / UCHAR_MAX */
31 #define CHAR_MIN   /* SCHAR_MIN / 0 */
32 #define SCHAR_MAX  /* +127 */
33 #define SCHAR_MIN  /* -127 */
34 #define UCHAR_MAX  /*  255 (2^CHAR_BIT - 1) */
35
36 /* Multibyte characters */
37 #define MB_LEN_MAX /* 1 */
38
39 /* Limits of type 'short int' */
40 #define SHRT_MAX   /* +32767 */
41 #define SHRT_MIN   /* -32767 */
42 #define USHRT_MAX  /*  65535 */
43
44 /* Limits of type 'int' */
45 #define INT_MAX    /* +32767 */
46 #define INT_MIN    /* -32767 */
47 #define UINT_MAX   /*  65535 */
48
49 /* Limits of type 'long int' */
50 #define LONG_MAX   /* +2147483647 */
51 #define LONG_MIN   /* -2147483647 */
52 #define ULONG_MAX  /*  4294967295 */
53
54 /* Limits of type 'long long int' */
55 #define LLONG_MAX  /* +9223372036854775807 */
56 #define LLONG_MIN  /* -9223372036854775807 */
57 #define ULLONG_MAX /* 18446744073709551615 */
58
59 #endif /* _LIMITS_H */