Index: sys/alpha/include/_limits.h =================================================================== RCS file: /home/ncvs/src/sys/alpha/include/_limits.h,v retrieving revision 1.13 diff -u -r1.13 _limits.h --- sys/alpha/include/_limits.h 4 May 2003 22:13:03 -0000 1.13 +++ sys/alpha/include/_limits.h 5 May 2003 16:40:20 -0000 @@ -35,11 +35,9 @@ * $FreeBSD: src/sys/alpha/include/_limits.h,v 1.13 2003/05/04 22:13:03 kan Exp $ */ -#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 @@ -50,6 +48,8 @@ * 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 __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 */ Index: sys/alpha/include/limits.h =================================================================== RCS file: /home/ncvs/src/sys/alpha/include/limits.h,v retrieving revision 1.11 diff -u -r1.11 limits.h --- sys/alpha/include/limits.h 29 Apr 2003 13:35:58 -0000 1.11 +++ sys/alpha/include/limits.h 5 May 2003 16:50:02 -0000 @@ -35,7 +35,7 @@ * $FreeBSD: src/sys/alpha/include/limits.h,v 1.11 2003/04/29 13:35:58 kan Exp $ */ -#ifndef _MACHINE_LIMITS_H_ +#ifndef _MACHINE_LIMITS_H_ #define _MACHINE_LIMITS_H_ #if __GNUC__ Index: sys/amd64/include/_limits.h =================================================================== RCS file: /home/ncvs/src/sys/amd64/include/_limits.h,v retrieving revision 1.6 diff -u -r1.6 _limits.h --- sys/amd64/include/_limits.h 4 May 2003 22:13:04 -0000 1.6 +++ sys/amd64/include/_limits.h 5 May 2003 16:48:46 -0000 @@ -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 */ @@ -82,7 +82,7 @@ #define __OFF_MAX __LONG_MAX /* max value for an off_t */ #define __OFF_MIN __LONG_MIN /* min value for an off_t */ -/* Quads and longs are the same on the amd64. Ensure they stay in sync. */ +/* Quads and longs are the same on the amd64. 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 */ Index: sys/amd64/include/limits.h =================================================================== RCS file: /home/ncvs/src/sys/amd64/include/limits.h,v retrieving revision 1.5 diff -u -r1.5 limits.h --- sys/amd64/include/limits.h 29 Apr 2003 13:36:06 -0000 1.5 +++ sys/amd64/include/limits.h 5 May 2003 16:50:28 -0000 @@ -36,7 +36,7 @@ * $FreeBSD: src/sys/amd64/include/limits.h,v 1.5 2003/04/29 13:36:06 kan Exp $ */ -#ifndef _MACHINE_LIMITS_H_ +#ifndef _MACHINE_LIMITS_H_ #define _MACHINE_LIMITS_H_ #if __GNUC__ Index: sys/arm/include/_limits.h =================================================================== RCS file: /home/ncvs/src/sys/arm/include/_limits.h,v retrieving revision 1.5 diff -u -r1.5 _limits.h --- sys/arm/include/_limits.h 4 May 2003 22:13:03 -0000 1.5 +++ sys/arm/include/_limits.h 5 May 2003 16:43:19 -0000 @@ -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 */ @@ -86,7 +86,7 @@ #define __OFF_MAX __LLONG_MAX /* max value for a off_t */ #define __OFF_MIN __LLONG_MIN /* min value for a off_t */ -/* Quads and long longs are the same size. Ensure they stay in sync. */ +/* Quads and long longs are the same size. Ensure they stay in sync. */ #define __UQUAD_MAX __ULLONG_MAX /* max value for a uquad_t */ #define __QUAD_MAX __LLONG_MAX /* max value for a quad_t */ #define __QUAD_MIN __LLONG_MIN /* min value for a quad_t */ Index: sys/arm/include/limits.h =================================================================== RCS file: /home/ncvs/src/sys/arm/include/limits.h,v retrieving revision 1.4 diff -u -r1.4 limits.h --- sys/arm/include/limits.h 29 Apr 2003 13:35:58 -0000 1.4 +++ sys/arm/include/limits.h 5 May 2003 16:51:00 -0000 @@ -34,7 +34,7 @@ * $FreeBSD: src/sys/arm/include/limits.h,v 1.4 2003/04/29 13:35:58 kan Exp $ */ -#ifndef _MACHINE_LIMITS_H_ +#ifndef _MACHINE_LIMITS_H_ #define _MACHINE_LIMITS_H_ #if __GNUC__ Index: sys/i386/include/_limits.h =================================================================== RCS file: /home/ncvs/src/sys/i386/include/_limits.h,v retrieving revision 1.24 diff -u -r1.24 _limits.h --- sys/i386/include/_limits.h 4 May 2003 22:13:03 -0000 1.24 +++ sys/i386/include/_limits.h 5 May 2003 16:40:59 -0000 @@ -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 */ @@ -86,7 +86,7 @@ #define __OFF_MAX __LLONG_MAX /* max value for an off_t */ #define __OFF_MIN __LLONG_MIN /* min value for an off_t */ -/* Quads and long longs are the same size. Ensure they stay in sync. */ +/* Quads and long longs are the same. Ensure they stay in sync. */ #define __UQUAD_MAX __ULLONG_MAX /* max value for a uquad_t */ #define __QUAD_MAX __LLONG_MAX /* max value for a quad_t */ #define __QUAD_MIN __LLONG_MIN /* min value for a quad_t */ Index: sys/i386/include/limits.h =================================================================== RCS file: /home/ncvs/src/sys/i386/include/limits.h,v retrieving revision 1.23 diff -u -r1.23 limits.h --- sys/i386/include/limits.h 29 Apr 2003 13:36:01 -0000 1.23 +++ sys/i386/include/limits.h 5 May 2003 16:50:09 -0000 @@ -34,7 +34,7 @@ * $FreeBSD: src/sys/i386/include/limits.h,v 1.23 2003/04/29 13:36:01 kan Exp $ */ -#ifndef _MACHINE_LIMITS_H_ +#ifndef _MACHINE_LIMITS_H_ #define _MACHINE_LIMITS_H_ #if __GNUC__ Index: sys/ia64/include/_limits.h =================================================================== RCS file: /home/ncvs/src/sys/ia64/include/_limits.h,v retrieving revision 1.10 diff -u -r1.10 _limits.h --- sys/ia64/include/_limits.h 4 May 2003 22:13:04 -0000 1.10 +++ sys/ia64/include/_limits.h 5 May 2003 16:42:22 -0000 @@ -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 */ @@ -82,7 +82,7 @@ #define __OFF_MAX __LONG_MAX /* max value for an off_t */ #define __OFF_MIN __LONG_MIN /* min value for an off_t */ -/* Quads and longs are the same. Ensure they stay in sync. */ +/* Quads and longs are the same. 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 */ Index: sys/ia64/include/limits.h =================================================================== RCS file: /home/ncvs/src/sys/ia64/include/limits.h,v retrieving revision 1.9 diff -u -r1.9 limits.h --- sys/ia64/include/limits.h 29 Apr 2003 13:36:02 -0000 1.9 +++ sys/ia64/include/limits.h 5 May 2003 16:50:35 -0000 @@ -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__ Index: sys/powerpc/include/_limits.h =================================================================== RCS file: /home/ncvs/src/sys/powerpc/include/_limits.h,v retrieving revision 1.25 diff -u -r1.25 _limits.h --- sys/powerpc/include/_limits.h 4 May 2003 22:13:04 -0000 1.25 +++ sys/powerpc/include/_limits.h 5 May 2003 16:42:51 -0000 @@ -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 */ @@ -85,7 +85,7 @@ #define __OFF_MAX __LLONG_MAX /* max value for an off_t */ #define __OFF_MIN __LLONG_MIN /* min value for an off_t */ -/* Quads and long longs are the same size. Ensure they stay in sync. */ +/* Quads and long longs are the same size. Ensure they stay in sync. */ #define __UQUAD_MAX __ULLONG_MAX /* max value for a uquad_t */ #define __QUAD_MAX __LLONG_MAX /* max value for a quad_t */ #define __QUAD_MIN __LLONG_MIN /* min value for a quad_t */ Index: sys/powerpc/include/limits.h =================================================================== RCS file: /home/ncvs/src/sys/powerpc/include/limits.h,v retrieving revision 1.24 diff -u -r1.24 limits.h --- sys/powerpc/include/limits.h 29 Apr 2003 13:36:05 -0000 1.24 +++ sys/powerpc/include/limits.h 5 May 2003 16:50:44 -0000 @@ -34,7 +34,7 @@ * $FreeBSD: src/sys/powerpc/include/limits.h,v 1.24 2003/04/29 13:36:05 kan Exp $ */ -#ifndef _MACHINE_LIMITS_H_ +#ifndef _MACHINE_LIMITS_H_ #define _MACHINE_LIMITS_H_ #if __GNUC__ Index: sys/sparc64/include/_limits.h =================================================================== RCS file: /home/ncvs/src/sys/sparc64/include/_limits.h,v retrieving revision 1.10 diff -u -r1.10 _limits.h --- sys/sparc64/include/_limits.h 4 May 2003 22:13:04 -0000 1.10 +++ sys/sparc64/include/_limits.h 5 May 2003 16:48:27 -0000 @@ -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 */ @@ -73,7 +73,7 @@ #define __OFF_MAX __LONG_MAX /* max value for an off_t */ #define __OFF_MIN __LONG_MIN /* min value for an off_t */ -/* Quads and longs are the same on the alpha. Ensure they stay in sync. */ +/* Quads and longs are the same on the sparc64. 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 */ Index: sys/sparc64/include/limits.h =================================================================== RCS file: /home/ncvs/src/sys/sparc64/include/limits.h,v retrieving revision 1.9 diff -u -r1.9 limits.h --- sys/sparc64/include/limits.h 29 Apr 2003 13:36:05 -0000 1.9 +++ sys/sparc64/include/limits.h 5 May 2003 16:50:18 -0000 @@ -27,7 +27,7 @@ * $FreeBSD: src/sys/sparc64/include/limits.h,v 1.9 2003/04/29 13:36:05 kan Exp $ */ -#ifndef _MACHINE_LIMITS_H_ +#ifndef _MACHINE_LIMITS_H_ #define _MACHINE_LIMITS_H_ #if __GNUC__ Index: sys/sys/limits.h =================================================================== RCS file: /home/ncvs/src/sys/sys/limits.h,v retrieving revision 1.4 diff -u -r1.4 limits.h --- sys/sys/limits.h 4 May 2003 22:13:03 -0000 1.4 +++ sys/sys/limits.h 5 May 2003 16:50:53 -0000 @@ -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