Commit Graph

15 Commits

Author SHA1 Message Date
Mark Adler
2fa463bacf zlib 1.2.9 2016-12-31 23:37:10 -08:00
Mark Adler
8f147c3d12 Avoid some random compiler warnings on various platforms. 2016-12-30 23:42:10 -08:00
Mark Adler
fb26fc427f Allow minigzip to compile when testing with ./configure --solo. 2016-12-30 22:04:22 -08:00
Mark Adler
79b5c5acf0 Use snprintf() for later versions of Microsoft C. 2016-12-30 17:13:31 -08:00
Mark Adler
ca50ebd4df Create z_size_t and z_ssize_t types.
Normally these are set to size_t and ssize_t. But if they do not
exist, then they are set to the smallest integer type that can
contain a pointer. size_t is unsigned and ssize_t is signed.
2016-12-04 07:48:48 -08:00
Mark Adler
7d6956b6a1 Make globals in examples local to compilation unit. 2016-10-14 13:10:54 -07:00
Mark Adler
0b22337126 Avoid use of reallocf() in test/infcover.c. 2015-07-28 21:55:09 -07:00
Mark Adler
283520baf7 Fix bug in test/example.c where error code not saved. 2014-07-02 16:34:22 -07:00
Mark Adler
62d6112a79 Clean up the usage of z_const and respect const usage within zlib.
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.
2012-08-13 00:02:40 -07:00
Mark Adler
f947435b30 Use _snprintf for snprintf under Microsoft C in test/minigzip.c. 2012-06-03 16:28:40 -07:00
Mark Adler
c58f7ab28d Replace use of unsafe string functions with snprintf if available.
This avoids warnings in OpenBSD that apparently can't be turned
off whenever you link strcpy, strcat, or sprintf.  When snprintf
isn't available, the use of the "unsafe" string functions has
always in fact been safe, since the lengths are all checked before
those functions are called.

We do not use strlcpy or strlcat, since they are not (yet) found on
all systems.  snprintf on the other hand is part of the C standard
library and is very common.
2012-05-02 23:18:38 -07:00
Mark Adler
41a18e1d7e Fix bug in test/minigzip.c for configure --solo. 2012-03-03 22:43:15 -08:00
Mark Adler
fbac04f666 Clean up infcover.c. 2011-11-30 18:19:05 -10:00
Mark Adler
014967ace3 Test the inflate code with full coverage.
Add a cover target in Makefile and the test/infcover.c test program
to cover all of the code lines in the inf*.c source files.  The
coverage is run with memory allocation checking in order to expose
memory leaks.  The coverage testing is run using:

    ./configure --cover && make cover
2011-11-27 14:15:40 -08:00
Mark Adler
1b57de3aef Move example.c and minigzip.c to test/. 2011-11-27 14:15:32 -08:00