From 4a65486da91813443618145ada568470fea5fbb2 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Sun, 14 Jan 2001 20:26:28 +0000 Subject: (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. --- src/shred.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/shred.c b/src/shred.c index 7d7374550..a380b463d 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!" -- cgit v1.2.3-70-g09d2