Subject: lib/31306: Incorrect definitions of UCHAR_MAX and USHRT_MAX
To: None <email@example.com, firstname.lastname@example.org,>
From: None <email@example.com>
Date: 09/13/2005 13:10:01
>Synopsis: Incorrect definitions of UCHAR_MAX and USHRT_MAX
>Arrival-Date: Tue Sep 13 13:10:00 +0000 2005
>Release: NetBSD 3.99.7
System: NetBSD duron.akihabara.co.uk 3.99.7 NetBSD 3.99.7 (GENERIC) #0: Sat Jul 30 12:56:56 JST 2005 firstname.lastname@example.org:/usr/src/sys/arch/i386/compile/GENERIC i386
The definitions of UCHAR_MAX and USHRT_MAX in <limits.h> are U-suffixed
hexadecimal constants. This does not conform to the C standard (C90 and C99).
The standard requires they have the same type as would have integer-
promoted objects of type "unsigned char" and "unsigned short", i.e. type
"int". However with U suffixes the constants have type "unsigned int".
Redefine as unsuffixed hex constants, which are always correct for the
integer promotions, regardless of the relative sizes of char, short and