limits.h (66458) | limits.h (67488) |
---|---|
1/* $FreeBSD: head/sys/ia64/include/limits.h 66458 2000-09-29 13:46:07Z dfr $ */ | 1/* $FreeBSD: head/sys/ia64/include/limits.h 67488 2000-10-24 10:49:56Z obrien $ */ |
2/* From: NetBSD: limits.h,v 1.3 1997/04/06 08:47:31 cgd Exp */ 3 4/* 5 * Copyright (c) 1988, 1993 6 * The Regents of the University of California. All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without 9 * modification, are permitted provided that the following conditions --- 29 unchanged lines hidden (view full) --- 39#define CHAR_BIT 8 /* number of bits in a char */ 40#define MB_LEN_MAX 6 /* Allow 31 bit UTF2 */ 41 42/* 43 * According to ANSI (section 2.2.4.2), the values below must be usable by 44 * #if preprocessing directives. Additionally, the expression must have the 45 * same type as would an expression that is an object of the corresponding 46 * type converted according to the integral promotions. The subtraction for | 2/* From: NetBSD: limits.h,v 1.3 1997/04/06 08:47:31 cgd Exp */ 3 4/* 5 * Copyright (c) 1988, 1993 6 * The Regents of the University of California. All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without 9 * modification, are permitted provided that the following conditions --- 29 unchanged lines hidden (view full) --- 39#define CHAR_BIT 8 /* number of bits in a char */ 40#define MB_LEN_MAX 6 /* Allow 31 bit UTF2 */ 41 42/* 43 * According to ANSI (section 2.2.4.2), the values below must be usable by 44 * #if preprocessing directives. Additionally, the expression must have the 45 * same type as would an expression that is an object of the corresponding 46 * type converted according to the integral promotions. The subtraction for |
47 * INT_MIN and LONG_MIN is so the value is not unsigned; 2147483648 is an | 47 * INT_MIN, etc., is so the value is not unsigned; e.g., 0x80000000 is an |
48 * unsigned int for 32-bit two's complement ANSI compilers (section 3.1.3.2). | 48 * unsigned int for 32-bit two's complement ANSI compilers (section 3.1.3.2). |
49 * These numbers work for pcc as well. The UINT_MAX and ULONG_MAX values 50 * are written as hex so that GCC will be quiet about large integer constants. | 49 * These numbers are for the default configuration of gcc. They work for 50 * some other compilers as well, but this should not be depended on. |
51 */ 52#define SCHAR_MAX 0x7f /* max value for a signed char */ 53#define SCHAR_MIN (-0x7f-1) /* min value for a signed char */ 54 55#define UCHAR_MAX 0xffU /* max value for an unsigned char */ 56#define CHAR_MAX 0x7f /* max value for a char */ 57#define CHAR_MIN (-0x7f-1) /* min value for a char */ 58 --- 4 unchanged lines hidden (view full) --- 63#define UINT_MAX 0xffffffffU /* max value for an unsigned int */ 64#define INT_MAX 0x7fffffff /* max value for an int */ 65#define INT_MIN (-0x7fffffff-1) /* min value for an int */ 66 67#define ULONG_MAX 0xffffffffffffffffUL /* max for an unsigned long */ 68#define LONG_MAX 0x7fffffffffffffffL /* max for a long */ 69#define LONG_MIN (-0x7fffffffffffffffL-1) /* min for a long */ 70 | 51 */ 52#define SCHAR_MAX 0x7f /* max value for a signed char */ 53#define SCHAR_MIN (-0x7f-1) /* min value for a signed char */ 54 55#define UCHAR_MAX 0xffU /* max value for an unsigned char */ 56#define CHAR_MAX 0x7f /* max value for a char */ 57#define CHAR_MIN (-0x7f-1) /* min value for a char */ 58 --- 4 unchanged lines hidden (view full) --- 63#define UINT_MAX 0xffffffffU /* max value for an unsigned int */ 64#define INT_MAX 0x7fffffff /* max value for an int */ 65#define INT_MIN (-0x7fffffff-1) /* min value for an int */ 66 67#define ULONG_MAX 0xffffffffffffffffUL /* max for an unsigned long */ 68#define LONG_MAX 0x7fffffffffffffffL /* max for a long */ 69#define LONG_MIN (-0x7fffffffffffffffL-1) /* min for a long */ 70 |
71/* Long longs and longs are the same size on the IA-64. */ 72 /* max for an unsigned long long */ 73#define ULLONG_MAX 0xffffffffffffffffULL 74#define LLONG_MAX 0x7fffffffffffffffLL /* max for a long long */ 75#define LLONG_MIN (-0x7fffffffffffffffLL-1) /* min for a long long */ 76 |
|
71#if !defined(_ANSI_SOURCE) 72#define SSIZE_MAX LONG_MAX /* max value for a ssize_t */ 73 74#if !defined(_POSIX_SOURCE) && !defined(_XOPEN_SOURCE) 75#define SIZE_T_MAX ULONG_MAX /* max value for a size_t */ 76 | 77#if !defined(_ANSI_SOURCE) 78#define SSIZE_MAX LONG_MAX /* max value for a ssize_t */ 79 80#if !defined(_POSIX_SOURCE) && !defined(_XOPEN_SOURCE) 81#define SIZE_T_MAX ULONG_MAX /* max value for a size_t */ 82 |
77/* Quads and longs are the same on the alpha */ | 83/* Quads and longs are the same. Ensure they stay in sync. */ |
78#define UQUAD_MAX (ULONG_MAX) /* max value for a uquad_t */ 79#define QUAD_MAX (LONG_MAX) /* max value for a quad_t */ 80#define QUAD_MIN (LONG_MIN) /* min value for a quad_t */ 81 82#endif /* !_POSIX_SOURCE && !_XOPEN_SOURCE */ 83#endif /* !_ANSI_SOURCE */ 84 85#if (!defined(_ANSI_SOURCE)&&!defined(_POSIX_SOURCE)) || defined(_XOPEN_SOURCE) 86#define LONG_BIT 64 87#define WORD_BIT 32 88 89#define DBL_DIG 15 90#define DBL_MAX 1.7976931348623157E+308 91#define DBL_MIN 2.2250738585072014E-308 92 93#define FLT_DIG 6 94#define FLT_MAX 3.40282347E+38F 95#define FLT_MIN 1.17549435E-38F 96#endif | 84#define UQUAD_MAX (ULONG_MAX) /* max value for a uquad_t */ 85#define QUAD_MAX (LONG_MAX) /* max value for a quad_t */ 86#define QUAD_MIN (LONG_MIN) /* min value for a quad_t */ 87 88#endif /* !_POSIX_SOURCE && !_XOPEN_SOURCE */ 89#endif /* !_ANSI_SOURCE */ 90 91#if (!defined(_ANSI_SOURCE)&&!defined(_POSIX_SOURCE)) || defined(_XOPEN_SOURCE) 92#define LONG_BIT 64 93#define WORD_BIT 32 94 95#define DBL_DIG 15 96#define DBL_MAX 1.7976931348623157E+308 97#define DBL_MIN 2.2250738585072014E-308 98 99#define FLT_DIG 6 100#define FLT_MAX 3.40282347E+38F 101#define FLT_MIN 1.17549435E-38F 102#endif |