mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Style fixes.
Remove DBL_DIG, DBL_MIN, DBL_MAX and their FLT_ counterparts, they were marked for deprecation ever since SUSv1 at least. Only define ULLONG_MIN/MAX and LLONG_MAX if long long type is supported. Restore a lost comment in MI _limits.h file and remove it from sys/limits.h where it does not belong.
This commit is contained in:
parent
3131abed73
commit
0eda4c08a5
8 changed files with 86 additions and 83 deletions
|
|
@ -40,6 +40,17 @@
|
|||
|
||||
#define __CHAR_BIT 8 /* number of bits in a char */
|
||||
|
||||
/*
|
||||
* According to ANSI (section 2.2.4.2), the values below must be usable by
|
||||
* #if preprocessing directives. Additionally, the expression must have the
|
||||
* same type as would an expression that is an object of the corresponding
|
||||
* type converted according to the integral promotions. The subtraction for
|
||||
* INT_MIN, etc., is so the value is not unsigned; e.g., 0x80000000 is an
|
||||
* unsigned int for 32-bit two's complement ANSI compilers (section 3.1.3.2).
|
||||
* These numbers are for the default configuration of gcc. They work for
|
||||
* some other compilers as well, but this should not be depended on.
|
||||
*/
|
||||
|
||||
#define __SCHAR_MAX 0x7f /* max value for a signed char */
|
||||
#define __SCHAR_MIN (-0x7f-1) /* min value for a signed char */
|
||||
|
||||
|
|
@ -72,7 +83,7 @@
|
|||
#define __OFF_MAX __LONG_MAX /* max value for a off_t */
|
||||
#define __OFF_MIN __LONG_MIN /* min value for a off_t */
|
||||
|
||||
/* Quads and longs are the same on the alpha. Ensure they stay in sync. */
|
||||
/* Quads and longs are the same on the alpha. Ensure they stay in sync. */
|
||||
#define __UQUAD_MAX (__ULONG_MAX) /* max value for a uquad_t */
|
||||
#define __QUAD_MAX (__LONG_MAX) /* max value for a quad_t */
|
||||
#define __QUAD_MIN (__LONG_MIN) /* min value for a quad_t */
|
||||
|
|
@ -80,12 +91,4 @@
|
|||
#define __LONG_BIT 64
|
||||
#define __WORD_BIT 32
|
||||
|
||||
#define __DBL_DIG 15
|
||||
#define __DBL_MAX 1.7976931348623157E+308
|
||||
#define __DBL_MIN 2.2250738585072014E-308
|
||||
|
||||
#define __FLT_DIG 6
|
||||
#define __FLT_MAX 3.40282347E+38F
|
||||
#define __FLT_MIN 1.17549435E-38F
|
||||
|
||||
#endif /* !_MACHINE__LIMITS_H_ */
|
||||
|
|
|
|||
|
|
@ -41,6 +41,17 @@
|
|||
|
||||
#define __CHAR_BIT 8 /* number of bits in a char */
|
||||
|
||||
/*
|
||||
* According to ANSI (section 2.2.4.2), the values below must be usable by
|
||||
* #if preprocessing directives. Additionally, the expression must have the
|
||||
* same type as would an expression that is an object of the corresponding
|
||||
* type converted according to the integral promotions. The subtraction for
|
||||
* INT_MIN, etc., is so the value is not unsigned; e.g., 0x80000000 is an
|
||||
* unsigned int for 32-bit two's complement ANSI compilers (section 3.1.3.2).
|
||||
* These numbers are for the default configuration of gcc. They work for
|
||||
* some other compilers as well, but this should not be depended on.
|
||||
*/
|
||||
|
||||
#define __SCHAR_MAX 0x7f /* max value for a signed char */
|
||||
#define __SCHAR_MIN (-0x7f-1) /* min value for a signed char */
|
||||
|
||||
|
|
@ -79,12 +90,4 @@
|
|||
#define __LONG_BIT 64
|
||||
#define __WORD_BIT 32
|
||||
|
||||
#define __DBL_DIG 15
|
||||
#define __DBL_MAX 1.7976931348623157E+308
|
||||
#define __DBL_MIN 2.2250738585072014E-308
|
||||
|
||||
#define __FLT_DIG 6
|
||||
#define __FLT_MAX 3.40282347E+38F
|
||||
#define __FLT_MIN 1.17549435E-38F
|
||||
|
||||
#endif /* !_MACHINE__LIMITS_H_ */
|
||||
|
|
|
|||
|
|
@ -39,6 +39,17 @@
|
|||
|
||||
#define __CHAR_BIT 8 /* number of bits in a char */
|
||||
|
||||
/*
|
||||
* According to ANSI (section 2.2.4.2), the values below must be usable by
|
||||
* #if preprocessing directives. Additionally, the expression must have the
|
||||
* same type as would an expression that is an object of the corresponding
|
||||
* type converted according to the integral promotions. The subtraction for
|
||||
* INT_MIN, etc., is so the value is not unsigned; e.g., 0x80000000 is an
|
||||
* unsigned int for 32-bit two's complement ANSI compilers (section 3.1.3.2).
|
||||
* These numbers are for the default configuration of gcc. They work for
|
||||
* some other compilers as well, but this should not be depended on.
|
||||
*/
|
||||
|
||||
#define __SCHAR_MAX 0x7f /* max value for a signed char */
|
||||
#define __SCHAR_MIN (-0x7f - 1) /* min value for a signed char */
|
||||
|
||||
|
|
@ -87,12 +98,4 @@
|
|||
#endif
|
||||
#define __WORD_BIT 32
|
||||
|
||||
#define __DBL_DIG 15
|
||||
#define __DBL_MAX 1.7976931348623157E+308
|
||||
#define __DBL_MIN 2.2250738585072014E-308
|
||||
|
||||
#define __FLT_DIG 6
|
||||
#define __FLT_MAX 3.40282347E+38F
|
||||
#define __FLT_MIN 1.17549435E-38F
|
||||
|
||||
#endif /* !_MACHINE__LIMITS_H_ */
|
||||
|
|
|
|||
|
|
@ -39,6 +39,17 @@
|
|||
|
||||
#define __CHAR_BIT 8 /* number of bits in a char */
|
||||
|
||||
/*
|
||||
* According to ANSI (section 2.2.4.2), the values below must be usable by
|
||||
* #if preprocessing directives. Additionally, the expression must have the
|
||||
* same type as would an expression that is an object of the corresponding
|
||||
* type converted according to the integral promotions. The subtraction for
|
||||
* INT_MIN, etc., is so the value is not unsigned; e.g., 0x80000000 is an
|
||||
* unsigned int for 32-bit two's complement ANSI compilers (section 3.1.3.2).
|
||||
* These numbers are for the default configuration of gcc. They work for
|
||||
* some other compilers as well, but this should not be depended on.
|
||||
*/
|
||||
|
||||
#define __SCHAR_MAX 0x7f /* max value for a signed char */
|
||||
#define __SCHAR_MIN (-0x7f - 1) /* min value for a signed char */
|
||||
|
||||
|
|
@ -87,12 +98,4 @@
|
|||
#endif
|
||||
#define __WORD_BIT 32
|
||||
|
||||
#define __DBL_DIG 15
|
||||
#define __DBL_MAX 1.7976931348623157E+308
|
||||
#define __DBL_MIN 2.2250738585072014E-308
|
||||
|
||||
#define __FLT_DIG 6
|
||||
#define __FLT_MAX 3.40282347E+38F
|
||||
#define __FLT_MIN 1.17549435E-38F
|
||||
|
||||
#endif /* !_MACHINE__LIMITS_H_ */
|
||||
|
|
|
|||
|
|
@ -41,6 +41,17 @@
|
|||
|
||||
#define __CHAR_BIT 8 /* number of bits in a char */
|
||||
|
||||
/*
|
||||
* According to ANSI (section 2.2.4.2), the values below must be usable by
|
||||
* #if preprocessing directives. Additionally, the expression must have the
|
||||
* same type as would an expression that is an object of the corresponding
|
||||
* type converted according to the integral promotions. The subtraction for
|
||||
* INT_MIN, etc., is so the value is not unsigned; e.g., 0x80000000 is an
|
||||
* unsigned int for 32-bit two's complement ANSI compilers (section 3.1.3.2).
|
||||
* These numbers are for the default configuration of gcc. They work for
|
||||
* some other compilers as well, but this should not be depended on.
|
||||
*/
|
||||
|
||||
#define __SCHAR_MAX 0x7f /* max value for a signed char */
|
||||
#define __SCHAR_MIN (-0x7f-1) /* min value for a signed char */
|
||||
|
||||
|
|
@ -79,12 +90,4 @@
|
|||
#define __LONG_BIT 64
|
||||
#define __WORD_BIT 32
|
||||
|
||||
#define __DBL_DIG 15
|
||||
#define __DBL_MAX 1.7976931348623157E+308
|
||||
#define __DBL_MIN 2.2250738585072014E-308
|
||||
|
||||
#define __FLT_DIG 6
|
||||
#define __FLT_MAX 3.40282347E+38F
|
||||
#define __FLT_MIN 1.17549435E-38F
|
||||
|
||||
#endif /* !_MACHINE__LIMITS_H_ */
|
||||
|
|
|
|||
|
|
@ -39,6 +39,17 @@
|
|||
|
||||
#define __CHAR_BIT 8 /* number of bits in a char */
|
||||
|
||||
/*
|
||||
* According to ANSI (section 2.2.4.2), the values below must be usable by
|
||||
* #if preprocessing directives. Additionally, the expression must have the
|
||||
* same type as would an expression that is an object of the corresponding
|
||||
* type converted according to the integral promotions. The subtraction for
|
||||
* INT_MIN, etc., is so the value is not unsigned; e.g., 0x80000000 is an
|
||||
* unsigned int for 32-bit two's complement ANSI compilers (section 3.1.3.2).
|
||||
* These numbers are for the default configuration of gcc. They work for
|
||||
* some other compilers as well, but this should not be depended on.
|
||||
*/
|
||||
|
||||
#define __SCHAR_MAX 0x7f /* max value for a signed char */
|
||||
#define __SCHAR_MIN (-0x7f - 1) /* min value for a signed char */
|
||||
|
||||
|
|
@ -86,12 +97,4 @@
|
|||
#endif
|
||||
#define __WORD_BIT 32
|
||||
|
||||
#define __DBL_DIG 15
|
||||
#define __DBL_MAX 1.7976931348623157E+308
|
||||
#define __DBL_MIN 2.2250738585072014E-308
|
||||
|
||||
#define __FLT_DIG 6
|
||||
#define __FLT_MAX 3.40282347E+38F
|
||||
#define __FLT_MIN 1.17549435E-38F
|
||||
|
||||
#endif /* !_MACHINE__LIMITS_H_ */
|
||||
|
|
|
|||
|
|
@ -32,6 +32,17 @@
|
|||
|
||||
#define __CHAR_BIT 8 /* number of bits in a char */
|
||||
|
||||
/*
|
||||
* According to ANSI (section 2.2.4.2), the values below must be usable by
|
||||
* #if preprocessing directives. Additionally, the expression must have the
|
||||
* same type as would an expression that is an object of the corresponding
|
||||
* type converted according to the integral promotions. The subtraction for
|
||||
* INT_MIN, etc., is so the value is not unsigned; e.g., 0x80000000 is an
|
||||
* unsigned int for 32-bit two's complement ANSI compilers (section 3.1.3.2).
|
||||
* These numbers are for the default configuration of gcc. They work for
|
||||
* some other compilers as well, but this should not be depended on.
|
||||
*/
|
||||
|
||||
#define __SCHAR_MAX 0x7f /* max value for a signed char */
|
||||
#define __SCHAR_MIN (-0x7f-1) /* min value for a signed char */
|
||||
|
||||
|
|
@ -70,12 +81,4 @@
|
|||
#define __LONG_BIT 64
|
||||
#define __WORD_BIT 32
|
||||
|
||||
#define __DBL_DIG 15
|
||||
#define __DBL_MAX 1.7976931348623157E+308
|
||||
#define __DBL_MIN 2.2250738585072014E-308
|
||||
|
||||
#define __FLT_DIG 6
|
||||
#define __FLT_MAX 3.40282347E+38F
|
||||
#define __FLT_MIN 1.17549435E-38F
|
||||
|
||||
#endif /* !_MACHINE__LIMITS_H_ */
|
||||
|
|
|
|||
|
|
@ -33,23 +33,14 @@
|
|||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
#ifndef _SYS_LIMITS_H_
|
||||
#ifndef _SYS_LIMITS_H_
|
||||
#define _SYS_LIMITS_H_
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#include <machine/_limits.h>
|
||||
|
||||
#define CHAR_BIT __CHAR_BIT /* number of bits in a char */
|
||||
|
||||
/*
|
||||
* According to ANSI (section 2.2.4.2), the values below must be usable by
|
||||
* #if preprocessing directives. Additionally, the expression must have the
|
||||
* same type as would an expression that is an object of the corresponding
|
||||
* type converted according to the integral promotions. The subtraction for
|
||||
* INT_MIN, etc., is so the value is not unsigned; e.g., 0x80000000 is an
|
||||
* unsigned int for 32-bit two's complement ANSI compilers (section 3.1.3.2).
|
||||
* These numbers are for the default configuration of gcc. They work for
|
||||
* some other compilers as well, but this should not be depended on.
|
||||
*/
|
||||
#define SCHAR_MAX __SCHAR_MAX /* max value for a signed char */
|
||||
#define SCHAR_MIN __SCHAR_MIN /* min value for a signed char */
|
||||
|
||||
|
|
@ -59,8 +50,8 @@
|
|||
#define CHAR_MAX UCHAR_MAX /* max value for a char */
|
||||
#define CHAR_MIN 0 /* min value for a char */
|
||||
#else
|
||||
#define CHAR_MAX SCHAR_MAX /* max value for a char */
|
||||
#define CHAR_MIN SCHAR_MIN /* min value for a char */
|
||||
#define CHAR_MAX SCHAR_MAX
|
||||
#define CHAR_MIN SCHAR_MIN
|
||||
#endif
|
||||
|
||||
#define USHRT_MAX __USHRT_MAX /* max value for an unsigned short */
|
||||
|
|
@ -75,11 +66,11 @@
|
|||
#define LONG_MAX __LONG_MAX /* max for a long */
|
||||
#define LONG_MIN __LONG_MIN /* min for a long */
|
||||
|
||||
/* Long longs and longs are the same size on the alpha. */
|
||||
/* max for an unsigned long long */
|
||||
#define ULLONG_MAX __ULLONG_MAX
|
||||
#ifdef __LONG_LONG_SUPPORTED
|
||||
#define ULLONG_MAX __ULLONG_MAX /* max for an unsigned long long */
|
||||
#define LLONG_MAX __LLONG_MAX /* max for a long long */
|
||||
#define LLONG_MIN __LLONG_MIN /* min for a long long */
|
||||
#endif
|
||||
|
||||
#if !defined(_ANSI_SOURCE)
|
||||
#define SSIZE_MAX __SSIZE_MAX /* max value for a ssize_t */
|
||||
|
|
@ -90,24 +81,15 @@
|
|||
#define OFF_MAX __OFF_MAX /* max value for a off_t */
|
||||
#define OFF_MIN __OFF_MIN /* min value for a off_t */
|
||||
|
||||
/* Quads and longs are the same on the alpha. Ensure they stay in sync. */
|
||||
#define UQUAD_MAX (__UQUAD_MAX) /* max value for a uquad_t */
|
||||
#define QUAD_MAX (__QUAD_MAX) /* max value for a quad_t */
|
||||
#define QUAD_MIN (__QUAD_MIN) /* min value for a quad_t */
|
||||
#endif /* !_POSIX_SOURCE && !_XOPEN_SOURCE */
|
||||
#endif /* !_ANSI_SOURCE */
|
||||
|
||||
#if (!defined(_ANSI_SOURCE) && !defined(_POSIX_SOURCE)) || defined(_XOPEN_SOURCE)
|
||||
#if defined(__BSD_VISIBLE) || defined(__XSI_VISIBLE)
|
||||
#define LONG_BIT __LONG_BIT
|
||||
#define WORD_BIT __WORD_BIT
|
||||
|
||||
#define DBL_DIG __DBL_DIG
|
||||
#define DBL_MAX __DBL_MAX
|
||||
#define DBL_MIN __DBL_MIN
|
||||
|
||||
#define FLT_DIG __FLT_DIG
|
||||
#define FLT_MAX __FLT_MAX
|
||||
#define FLT_MIN __FLT_MIN
|
||||
#endif
|
||||
|
||||
#endif /* !_SYS_LIMITS_H_ */
|
||||
|
|
|
|||
Loading…
Reference in a new issue