From 977cb3153eec3286210df53421e8494748c21d3a Mon Sep 17 00:00:00 2001 From: bde Date: Sat, 9 Oct 1999 11:31:50 +0000 Subject: Hard-configure z_off_t as long. Soft configuration using HAVE_UNISTD_H just breaks the prototypes for gzseek() and gztell() when an application defines HAVE_UNISTD_H before including . z_off_t was always long for compiling zlib, but was sometimes off_t for compiling applications, e.g., Ethereal 0.7.5. This "fix" preserves bug for bug binary compatibility. z_off_t should be off_t for everything, but zlib doesn't support off_t being longer than long, so using the correct type without fixing zlib's internals would at best break binary compatibility. This "fix" also make the namespace problems for HAVE_UNISTD_H no worse than hundreds of other namespace prooblems in zconf.h. I'll wait for a new release of zlib for proper fixes. Reported by: Guy Harris via jkh --- lib/libz/zconf.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'lib/libz') diff --git a/lib/libz/zconf.h b/lib/libz/zconf.h index 5b882be..a294f58 100644 --- a/lib/libz/zconf.h +++ b/lib/libz/zconf.h @@ -238,16 +238,18 @@ typedef uLong FAR uLongf; #ifdef HAVE_UNISTD_H # include /* for off_t */ # include /* for SEEK_* and off_t */ -# define z_off_t off_t #endif #ifndef SEEK_SET # define SEEK_SET 0 /* Seek from beginning of file. */ # define SEEK_CUR 1 /* Seek from current position. */ # define SEEK_END 2 /* Set file pointer to EOF plus "offset" */ #endif -#ifndef z_off_t -# define z_off_t long -#endif + +/* + * This is hard-configured for FreeBSD, since zlib doesn't actually support + * using the system off_t for offsets unless off_t is no longer than long. + */ +#define z_off_t long /* MVS linker does not support external names larger than 8 bytes */ #if defined(__MVS__) -- cgit v1.1