]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Hard-configure z_off_t as long. Soft configuration using HAVE_UNISTD_H
authorBruce Evans <bde@FreeBSD.org>
Sat, 9 Oct 1999 11:31:50 +0000 (11:31 +0000)
committerBruce Evans <bde@FreeBSD.org>
Sat, 9 Oct 1999 11:31:50 +0000 (11:31 +0000)
commit1d64c295bbdb773ca3d62cdb5a9eec06e12799c8
tree84d09c6aaf702f70e17391e7ee33f2277abf1174
parent8cd350e08c7ed48c02bb01f27aa9ee454dbe9274
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 <zlib.h>.  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