1
0
mirror of git://git.sv.gnu.org/coreutils.git synced 2026-07-26 02:30:35 +02:00

Include <values.h>.

[!BITSPERBYTE]: Define.
[OFF_T_MAX]: Use BITSPERBYTE, not 8, and cast the result to off_t.
This commit is contained in:
Jim Meyering
1996-04-21 14:17:13 +00:00
parent 763d748cf2
commit 5beebbd8da
+10 -3
View File
@@ -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 <values.h>
#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)