From: Jim Meyering Date: Sun, 21 Apr 1996 14:17:13 +0000 (+0000) Subject: Include . X-Git-Tag: TEXTUTILS-1_14c~41 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5beebbd8da1b2db1d09f2633592e408a027bdb26;p=thirdparty%2Fcoreutils.git Include . [!BITSPERBYTE]: Define. [OFF_T_MAX]: Use BITSPERBYTE, not 8, and cast the result to off_t. --- diff --git a/src/od.c b/src/od.c index 31ef964382..d8f52b1262 100644 --- a/src/od.c +++ b/src/od.c @@ -75,10 +75,17 @@ typedef double LONG_DOUBLE; #ifndef ULONG_MAX # define ULONG_MAX ((unsigned long) ~(unsigned long) 0) #endif + +#if HAVE_VALUES_H +# include +#endif + +#ifndef BITSPERBYTE +# define BITSPERBYTE 8 +#endif + #ifndef OFF_T_MAX -/* FIXME: is there a way to do this without relying on the - `8 bits per byte' assumption? */ -# define OFF_T_MAX (~((off_t)1 << (sizeof (off_t) * 8 - 1))) +# define OFF_T_MAX ((off_t)(~((off_t)1 << (sizeof (off_t) * BITSPERBYTE - 1)))) #endif #define STREQ(a,b) (strcmp((a), (b)) == 0)