From: Bernhard Rosenkränzer Date: Sun, 27 Jun 2021 12:31:54 +0000 (+0200) Subject: Fix Z_SOLO mode X-Git-Tag: 2.1.0-beta1~529 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=834e8ce342fa9f24c25be3ec8385ea162efc94ad;p=thirdparty%2Fzlib-ng.git Fix Z_SOLO mode Without this patch, #include with Z_SOLO defined (e.g. while building perl 5.34.0) fails because of use of undefined types. --- diff --git a/zlib.h b/zlib.h index 6852dc67b..842559485 100644 --- a/zlib.h +++ b/zlib.h @@ -1767,6 +1767,7 @@ Z_EXTERN int Z_EXPORT inflateBackInit_(z_stream *strm, int windowBits, unsigned inflateBackInit_((strm), (windowBits), (window), ZLIB_VERSION, (int)sizeof(z_stream)) +#ifndef Z_SOLO /* gzgetc() macro and its supporting function and exposed data structure. Note * that the real internal state is much larger than the exposed structure. * This abbreviated structure exposes just enough for the gzgetc() macro. The @@ -1797,6 +1798,7 @@ Z_EXTERN int Z_EXPORT gzgetc_(gzFile file); /* backward compatibility */ Z_EXTERN unsigned long Z_EXPORT crc32_combine64(unsigned long, unsigned long, z_off64_t); Z_EXTERN void Z_EXPORT crc32_combine_gen64(uint32_t *op, z_off64_t); #endif +#endif #if !defined(Z_INTERNAL) && defined(Z_WANT64) # define gzopen gzopen64 @@ -1835,10 +1837,12 @@ Z_EXTERN unsigned long Z_EXPORT inflateCodesUsed (z_stream *); Z_EXTERN int Z_EXPORT inflateResetKeep (z_stream *); Z_EXTERN int Z_EXPORT deflateResetKeep (z_stream *); +#ifndef Z_SOLO #if defined(_WIN32) Z_EXTERN gzFile Z_EXPORT gzopen_w(const wchar_t *path, const char *mode); #endif Z_EXTERN int Z_EXPORTVA gzvprintf(gzFile file, const char *format, va_list va); +#endif #ifdef __cplusplus }