sys/sys/limits.h:

- Fix visibilty test for LONG_BIT and WORD_BIT.  `#if defined(__FOO_VISIBLE)'
   is alays wrong because __FOO_VISIBLE is always defined (to 0 for
   invisibility).

sys/<arch>/include/limits.h
sys/<arch>/include/_limits.h:

 - Style fixes.

Submitted by:	bde
Reviewed by:	bsdmike
Approved by:	re (scottl)
This commit is contained in:
Alexander Kabaev 2003-05-19 20:29:07 +00:00
parent 4a3284a150
commit 980ded9a7d
15 changed files with 32 additions and 30 deletions

View File

@ -35,11 +35,9 @@
* $FreeBSD$
*/
#ifndef _MACHINE__LIMITS_H_
#ifndef _MACHINE__LIMITS_H_
#define _MACHINE__LIMITS_H_
#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
@ -51,6 +49,8 @@
* some other compilers as well, but this should not be depended on.
*/
#define __CHAR_BIT 8 /* number of bits in a char */
#define __SCHAR_MAX 0x7f /* max value for a signed char */
#define __SCHAR_MIN (-0x7f-1) /* min value for a signed char */

View File

@ -35,7 +35,7 @@
* $FreeBSD$
*/
#ifndef _MACHINE_LIMITS_H_
#ifndef _MACHINE_LIMITS_H_
#define _MACHINE_LIMITS_H_
#if __GNUC__

View File

@ -39,8 +39,6 @@
#ifndef _MACHINE__LIMITS_H_
#define _MACHINE__LIMITS_H_
#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
@ -52,6 +50,8 @@
* some other compilers as well, but this should not be depended on.
*/
#define __CHAR_BIT 8 /* number of bits in a char */
#define __SCHAR_MAX 0x7f /* max value for a signed char */
#define __SCHAR_MIN (-0x7f-1) /* min value for a signed char */

View File

@ -36,7 +36,7 @@
* $FreeBSD$
*/
#ifndef _MACHINE_LIMITS_H_
#ifndef _MACHINE_LIMITS_H_
#define _MACHINE_LIMITS_H_
#if __GNUC__

View File

@ -37,8 +37,6 @@
#ifndef _MACHINE__LIMITS_H_
#define _MACHINE__LIMITS_H_
#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
@ -50,6 +48,8 @@
* some other compilers as well, but this should not be depended on.
*/
#define __CHAR_BIT 8 /* number of bits in a char */
#define __SCHAR_MAX 0x7f /* max value for a signed char */
#define __SCHAR_MIN (-0x7f - 1) /* min value for a signed char */

View File

@ -34,7 +34,7 @@
* $FreeBSD$
*/
#ifndef _MACHINE_LIMITS_H_
#ifndef _MACHINE_LIMITS_H_
#define _MACHINE_LIMITS_H_
#if __GNUC__

View File

@ -37,8 +37,6 @@
#ifndef _MACHINE__LIMITS_H_
#define _MACHINE__LIMITS_H_
#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
@ -50,6 +48,8 @@
* some other compilers as well, but this should not be depended on.
*/
#define __CHAR_BIT 8 /* number of bits in a char */
#define __SCHAR_MAX 0x7f /* max value for a signed char */
#define __SCHAR_MIN (-0x7f - 1) /* min value for a signed char */

View File

@ -34,7 +34,7 @@
* $FreeBSD$
*/
#ifndef _MACHINE_LIMITS_H_
#ifndef _MACHINE_LIMITS_H_
#define _MACHINE_LIMITS_H_
#if __GNUC__

View File

@ -39,8 +39,6 @@
#ifndef _MACHINE__LIMITS_H_
#define _MACHINE__LIMITS_H_
#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
@ -52,6 +50,8 @@
* some other compilers as well, but this should not be depended on.
*/
#define __CHAR_BIT 8 /* number of bits in a char */
#define __SCHAR_MAX 0x7f /* max value for a signed char */
#define __SCHAR_MIN (-0x7f-1) /* min value for a signed char */

View File

@ -36,7 +36,7 @@
* @(#)limits.h 8.3 (Berkeley) 1/4/94
*/
#ifndef _MACHINE_LIMITS_H_
#ifndef _MACHINE_LIMITS_H_
#define _MACHINE_LIMITS_H_
#if __GNUC__

View File

@ -37,8 +37,6 @@
#ifndef _MACHINE__LIMITS_H_
#define _MACHINE__LIMITS_H_
#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
@ -50,6 +48,8 @@
* some other compilers as well, but this should not be depended on.
*/
#define __CHAR_BIT 8 /* number of bits in a char */
#define __SCHAR_MAX 0x7f /* max value for a signed char */
#define __SCHAR_MIN (-0x7f - 1) /* min value for a signed char */

View File

@ -34,7 +34,7 @@
* $FreeBSD$
*/
#ifndef _MACHINE_LIMITS_H_
#ifndef _MACHINE_LIMITS_H_
#define _MACHINE_LIMITS_H_
#if __GNUC__

View File

@ -30,8 +30,6 @@
#ifndef _MACHINE__LIMITS_H_
#define _MACHINE__LIMITS_H_
#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
@ -43,6 +41,8 @@
* some other compilers as well, but this should not be depended on.
*/
#define __CHAR_BIT 8 /* number of bits in a char */
#define __SCHAR_MAX 0x7f /* max value for a signed char */
#define __SCHAR_MIN (-0x7f-1) /* min value for a signed char */

View File

@ -27,7 +27,7 @@
* $FreeBSD$
*/
#ifndef _MACHINE_LIMITS_H_
#ifndef _MACHINE_LIMITS_H_
#define _MACHINE_LIMITS_H_
#if __GNUC__

View File

@ -72,22 +72,24 @@
#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 */
#if __POSIX_VISIBLE || __XSI_VISIBLE
#define SSIZE_MAX __SSIZE_MAX /* max value for an ssize_t */
#endif
#if !defined(_POSIX_SOURCE) && !defined(_XOPEN_SOURCE)
#if __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE
#define SIZE_T_MAX __SIZE_T_MAX /* max value for a size_t */
#define OFF_MAX __OFF_MAX /* max value for a off_t */
#define OFF_MIN __OFF_MIN /* min value for a off_t */
#define OFF_MAX __OFF_MAX /* max value for an off_t */
#define OFF_MIN __OFF_MIN /* min value for an off_t */
#endif
#if __BSD_VISIBLE
#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 */
#endif
#if defined(__BSD_VISIBLE) || defined(__XSI_VISIBLE)
#if __XSI_VISIBLE
#define LONG_BIT __LONG_BIT
#define WORD_BIT __WORD_BIT
#endif