diff options
author | ache <ache@FreeBSD.org> | 1999-05-20 23:33:35 +0000 |
---|---|---|
committer | ache <ache@FreeBSD.org> | 1999-05-20 23:33:35 +0000 |
commit | 85341fee3efdd3a9412d68e45a59cd5e19fcc582 (patch) | |
tree | e0f8ee20dbb5a0a21120c9d6cf2526ceb3b6462c /sys/powerpc/include/_limits.h | |
parent | b75649d2ee07cc871c5fa10a8bdb998a08df6771 (diff) | |
download | FreeBSD-src-85341fee3efdd3a9412d68e45a59cd5e19fcc582.zip FreeBSD-src-85341fee3efdd3a9412d68e45a59cd5e19fcc582.tar.gz |
Set CHAR_{MIN,MAX} according to -funsigned-char flag given or not
PR: 11627
Submitted by: Petr Lampa <lampa@fee.vutbr.cz>
Diffstat (limited to 'sys/powerpc/include/_limits.h')
-rw-r--r-- | sys/powerpc/include/_limits.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/sys/powerpc/include/_limits.h b/sys/powerpc/include/_limits.h index 602bb61..8aabe24 100644 --- a/sys/powerpc/include/_limits.h +++ b/sys/powerpc/include/_limits.h @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)limits.h 8.3 (Berkeley) 1/4/94 - * $Id$ + * $Id: limits.h,v 1.11 1997/02/22 09:34:47 peter Exp $ */ #ifndef _MACHINE_LIMITS_H_ @@ -54,8 +54,14 @@ #define SCHAR_MIN (-128) /* max value for a signed char */ #define UCHAR_MAX 255 /* max value for an unsigned char */ -#define CHAR_MAX 127 /* max value for a char */ -#define CHAR_MIN (-128) /* min value for a char */ + +#ifdef __CHAR_UNSIGNED__ +# define CHAR_MIN 0 /* min value for a char */ +# define CHAR_MAX UCHAR_MAX /* max value for a char */ +#else +# define CHAR_MIN SCHAR_MIN /* min value for a char */ +# define CHAR_MAX SCHAR_MAX /* max value for a char */ +#endif #define USHRT_MAX 65535 /* max value for an unsigned short */ #define SHRT_MAX 32767 /* max value for a short */ |