From: Jim Meyering Date: Sun, 14 Jan 2001 20:26:28 +0000 (+0000) Subject: (UINT_MAX_32_BITS): Define. X-Git-Tag: FILEUTILS-4_0_36~3 X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=4a65486da91813443618145ada568470fea5fbb2;p=thirdparty%2Fcoreutils.git (UINT_MAX_32_BITS): Define. Use UINT_MAX_32_BITS in the cpp conditions that determine the `word32' typedef. Using a literal `0xffffffff' failed with HPUX10.20's /bin/cc. --- diff --git a/src/shred.c b/src/shred.c index 7d7374550e..a380b463d5 100644 --- a/src/shred.c +++ b/src/shred.c @@ -508,16 +508,22 @@ files, most people use the --remove option.\n\ * -------------------------------------------------------------------- */ -#if ULONG_MAX == 0xffffffff +#if defined __STDC__ && __STDC__ +# define UINT_MAX_32_BITS 4294967295U +#else +# define UINT_MAX_32_BITS 0xFFFFFFFF +#endif + +#if ULONG_MAX == UINT_MAX_32_BITS typedef unsigned long word32; #else -# if UINT_MAX == 0xffffffff +# if UINT_MAX == UINT_MAX_32_BITS typedef unsigned word32; # else -# if USHRT_MAX == 0xffffffff +# if USHRT_MAX == UINT_MAX_32_BITS typedef unsigned short word32; # else -# if UCHAR_MAX == 0xffffffff +# if UCHAR_MAX == UINT_MAX_32_BITS typedef unsigned char word32; # else "No 32-bit type available!"