A remarkably creative and diverse set of approaches to letting the
compiler know that opaque was being used when it wasn't is changed
by this commit to the more standard (void)opaque.
Conflicts:
zutil.c
Make compiling without gzip file operation support the default
(define WITH_GZFILEOP or use --zlib-compat to enable them).
Add initial support for compiling in a zlib-compatible mode, this currently only
enables gzip file operations and sets the ZLIB_COMPAT flag.
Conflicts:
test/minigzip.c
This makes it easier to implement support for ASM replacements using
configure parameters if needed later. Also since zlib-ng uses
compiler intrinsics, this needed a cleanup in any case.
This patch allows zlib to compile cleanly with the -Wcast-qual gcc
warning enabled, but only if ZLIB_CONST is defined, which adds
const to next_in and msg in z_stream and in the in_func prototype.
A --const option is added to ./configure which adds -DZLIB_CONST
to the compile flags, and adds -Wcast-qual to the compile flags
when ZLIBGCCWARN is set in the environment.
gzflags() was put in gzwrite.c in order to be compiled exactly the
same as gzprintf(), so that it was guaranteed to return the correct
information. However that causes a static linkage to zlib to bring
in many routines that are often not used. All that is required to
duplicate the compilation environment of gzprintf() is to include
gzguts.h. So that is now done in zutil.c to assure that the correct
flags are returned.
A common request has been the ability to compile zlib to require no
other libraries. This --solo option provides that ability. The price
is that the gz*, compress*, and uncompress functions are eliminated,
and that the user must provide memory allocation and free routines to
deflate and inflate when initializing.
This also moves some of the same from zconf.h to gzguts.h. A new
function, gzflags(), was created to pass the compilation flags
related to vsnprintf usage back to zlibCompileFlags() in zutil.c.
In the process, various compiler configuration files were updated
to include gzflags(), as well as the new gzgetc_() function added
when the gzgetc() macro was introduced in a previous patch.