77ba1afdf0
types. C99 requires that these definitions promote to (signed/unsigned) integer the same way as the types the definition is for. And since unsigned char/short fit into an "int" on all our archs and thus promote to signed int, the definitions must not be unsigned. Addresses PR lib/31306 by Neil Booth.
21 lines
301 B
C
21 lines
301 B
C
/* $NetBSD: stdint.c,v 1.1 2007/08/31 16:20:50 drochner Exp $ */
|
|
|
|
#include <limits.h>
|
|
#include <stdint.h>
|
|
|
|
#if !(CHAR_MIN < UCHAR_MAX)
|
|
#error CHAR
|
|
#endif
|
|
|
|
#if !(SHRT_MIN < USHRT_MAX)
|
|
#error SHRT
|
|
#endif
|
|
|
|
#if !(INT8_MIN < UINT8_MAX)
|
|
#error INT8
|
|
#endif
|
|
|
|
#if !(INT16_MIN < UINT16_MAX)
|
|
#error INT16
|
|
#endif
|