]> git.ipfire.org Git - thirdparty/zlib-ng.git/log
thirdparty/zlib-ng.git
11 years agoAdd crc_ forward declarations to deflate and add read_buf fwd dcl to fill_window_sse. v1.2.8-jtkv4 v1.2.8_jtkv4
Martin O. Pollard [Wed, 11 Jun 2014 16:53:22 +0000 (17:53 +0100)] 
Add crc_ forward declarations to deflate and add read_buf fwd dcl to fill_window_sse.

11 years agoAdd forward declarations for fill_window_sse and flush_pending to deflate_quick.c.
Martin O. Pollard [Tue, 10 Jun 2014 12:53:05 +0000 (13:53 +0100)] 
Add forward declarations for fill_window_sse and flush_pending to deflate_quick.c.

11 years agoInclude wmmintrin.h in configure test and crc_folding.c aid clang compilation.
Martin O. Pollard [Tue, 10 Jun 2014 12:31:55 +0000 (13:31 +0100)] 
Include wmmintrin.h in configure test and crc_folding.c aid clang compilation.

11 years agodeflate: avoid use of uninitialized variable
Nathan Kidd [Thu, 22 May 2014 18:20:44 +0000 (14:20 -0400)] 
deflate: avoid use of uninitialized variable

(Note emit_match() doesn't currently use the value at all.)

Fixes #4

11 years agodeflate: add new deflate_medium strategy
Jim Kukunas [Thu, 18 Jul 2013 22:45:18 +0000 (15:45 -0700)] 
deflate: add new deflate_medium strategy

From: Arjan van de Ven <arjan@linux.intel.com>

As the name suggests, the deflate_medium deflate strategy is designed
to provide an intermediate strategy between deflate_fast and deflate_slow.
After finding two adjacent matches, deflate_medium scans left from
the second match in order to determine whether a better match can be
formed.

Fixes #2

11 years agodeflate: add new deflate_quick strategy for level 1
Jim Kukunas [Thu, 18 Jul 2013 20:19:05 +0000 (13:19 -0700)] 
deflate: add new deflate_quick strategy for level 1

The deflate_quick strategy is designed to provide maximum
deflate performance.

deflate_quick achieves this through:
    - only checking the first hash match
    - using a small inline SSE4.2-optimized longest_match
    - forcing a window size of 8K, and using a precomputed dist/len
      table
    - forcing the static Huffman tree and emitting codes immediately
      instead of tallying

This patch changes the scope of flush_pending, bi_windup, and
static_ltree to ZLIB_INTERNAL and moves END_BLOCK, send_code,
put_short, and send_bits to deflate.h.

Updates the configure script to enable by default for x86. On systems
without SSE4.2, fallback is to deflate_fast strategy.

Fixes #6
Fixes #8

11 years agoadd PCLMULQDQ optimized CRC folding
Jim Kukunas [Thu, 11 Jul 2013 20:49:05 +0000 (13:49 -0700)] 
add PCLMULQDQ optimized CRC folding

Rather than copy the input data from strm->next_in into the window and
then compute the CRC, this patch combines these two steps into one. It
performs a SSE memory copy, while folding the data down in the SSE
registers. A final step is added, when we write the gzip trailer,
to reduce the 4 SSE registers to 32b.

Adds some extra padding bytes to the window to allow for SSE partial
writes.

11 years agoadd SSE4.2 optimized hash function
Jim Kukunas [Thu, 18 Jul 2013 18:40:09 +0000 (11:40 -0700)] 
add SSE4.2 optimized hash function

For systems supporting SSE4.2, use the crc32 instruction as a fast
hash function. Also, provide a better fallback hash.

For both new hash functions, we hash 4 bytes, instead of 3, for certain
levels. This shortens the hash chains, and also improves the quality
of each hash entry.

11 years agoAdds SSE2 optimized hash shifting to fill_window.
Jim Kukunas [Tue, 2 Jul 2013 19:09:37 +0000 (12:09 -0700)] 
Adds SSE2 optimized hash shifting to fill_window.

Uses SSE2 subtraction with saturation to shift the hash in
16B chunks. Renames the old fill_window implementation to
fill_window_c(), and adds a new fill_window_sse() implementation
in fill_window_sse.c.

Moves UPDATE_HASH into deflate.h and changes the scope of
read_buf from local to ZLIB_INTERNAL for sharing between
the two implementations.

Updates the configure script to check for SSE2 intrinsics and enables
this optimization by default on x86. The runtime check for SSE2 support
only occurs on 32-bit, as x86_64 requires SSE2. Adds an explicit
rule in Makefile.in to build fill_window_sse.c with the -msse2 compiler
flag, which is required for SSE2 intrinsics.

11 years agoAdd preprocessor define to tune crc32 unrolling.
Jim Kukunas [Wed, 17 Jul 2013 17:38:54 +0000 (10:38 -0700)] 
Add preprocessor define to tune crc32 unrolling.

Adds a preprocessor define, CRC32_UNROLL_LESS, to reduce unrolling
factor from 8 to 4 for the crc32 calculation.

Updates configure script to set as default on x86

11 years agoTune longest_match implementation
Jim Kukunas [Mon, 1 Jul 2013 18:18:26 +0000 (11:18 -0700)] 
Tune longest_match implementation

Separates the byte-by-byte and short-by-short longest_match
implementations into two separately tweakable versions and
splits all of the longest match functions into a separate file.

Split the end-chain and early-chain scans and provide likely/unlikely
hints to improve branh prediction.

Add an early termination condition for levels 5 and under to stop
iterating the hash chain when the match length for the current
entry is less than the current best match.

Also adjust variable types and scopes to provide better optimization
hints to the compiler.

11 years agoAdd preprocessor define to tune Adler32 loop unrolling.
Jim Kukunas [Wed, 17 Jul 2013 17:34:56 +0000 (10:34 -0700)] 
Add preprocessor define to tune Adler32 loop unrolling.

Excessive loop unrolling is detrimental to performance. This patch
adds a preprocessor define, ADLER32_UNROLL_LESS, to reduce unrolling
factor from 16 to 8.

Updates configure script to set as default on x86

11 years agoenable 16-bit longest_match for x86
Jim Kukunas [Thu, 18 Jul 2013 15:50:18 +0000 (08:50 -0700)] 
enable 16-bit longest_match for x86

11 years agoFor x86, add CPUID check.
Jim Kukunas [Mon, 16 Sep 2013 18:40:18 +0000 (11:40 -0700)] 
For x86, add CPUID check.

Adds check for SSE2, SSE4.2, and the PCLMULQDQ instructions.

11 years agoAdd architecture detection in configure script.
Jim Kukunas [Mon, 16 Sep 2013 18:38:07 +0000 (11:38 -0700)] 
Add architecture detection in configure script.

This allows for per-architecture build tuning.

12 years agozlib 1.2.8 v1.2.8
Mark Adler [Sun, 28 Apr 2013 23:03:34 +0000 (16:03 -0700)] 
zlib 1.2.8

12 years agoFix mixed line endings in contrib/vstudio.
Mark Adler [Mon, 29 Apr 2013 00:21:50 +0000 (17:21 -0700)] 
Fix mixed line endings in contrib/vstudio.

12 years agoCorrect spelling error in zlib.h.
Mark Adler [Sun, 28 Apr 2013 22:36:25 +0000 (15:36 -0700)] 
Correct spelling error in zlib.h.

12 years agoClean up contrib/vstudio [Roß].
Mark Adler [Fri, 19 Apr 2013 07:47:59 +0000 (21:47 -1000)] 
Clean up contrib/vstudio [Roß].

12 years agoUpdate some copyright years.
Mark Adler [Fri, 19 Apr 2013 07:38:15 +0000 (21:38 -1000)] 
Update some copyright years.

12 years agoDo not force Z_CONST for C++.
Mark Adler [Sun, 14 Apr 2013 17:31:31 +0000 (10:31 -0700)] 
Do not force Z_CONST for C++.

Forcing Z_CONST resulted in an issue when compiling Firefox.  Now
if someone wants to compile zlib as C++ code (which it isn't), now
they will need to #define Z_CONST themselves.

12 years agoUpdate contrib/minizip/iowin32.c for Windows RT [Vollant].
Mark Adler [Sun, 14 Apr 2013 17:05:43 +0000 (10:05 -0700)] 
Update contrib/minizip/iowin32.c for Windows RT [Vollant].

12 years agoChange version number to 1.2.8.
Mark Adler [Sun, 14 Apr 2013 04:38:26 +0000 (21:38 -0700)] 
Change version number to 1.2.8.

12 years agozlib 1.2.7.3 v1.2.7.3
Mark Adler [Sun, 14 Apr 2013 04:18:35 +0000 (21:18 -0700)] 
zlib 1.2.7.3

12 years agoFix version numbers and DLL names in contrib/vstudio/*/zlib.rc.
Mark Adler [Sun, 14 Apr 2013 02:11:47 +0000 (19:11 -0700)] 
Fix version numbers and DLL names in contrib/vstudio/*/zlib.rc.

12 years agoChange version number to 1.2.7.3.
Mark Adler [Sun, 14 Apr 2013 01:58:46 +0000 (18:58 -0700)] 
Change version number to 1.2.7.3.

12 years agozlib 1.2.7.2 v1.2.7.2
Mark Adler [Sun, 14 Apr 2013 01:15:42 +0000 (18:15 -0700)] 
zlib 1.2.7.2

12 years agoAdd casts in gzwrite.c for pointer differences.
Mark Adler [Sun, 14 Apr 2013 01:04:06 +0000 (18:04 -0700)] 
Add casts in gzwrite.c for pointer differences.

12 years agoFix typo in win32/Makefile.msc.
Mark Adler [Sun, 14 Apr 2013 00:54:57 +0000 (17:54 -0700)] 
Fix typo in win32/Makefile.msc.

12 years agoChange check for a four-byte type back to hexadecimal.
Mark Adler [Sat, 13 Apr 2013 22:54:03 +0000 (15:54 -0700)] 
Change check for a four-byte type back to hexadecimal.

12 years agoChange version number to 1.2.7.2.
Mark Adler [Sat, 13 Apr 2013 15:08:57 +0000 (08:08 -0700)] 
Change version number to 1.2.7.2.

12 years agozlib 1.2.7.1 v1.2.7.1
Mark Adler [Mon, 25 Mar 2013 05:46:40 +0000 (22:46 -0700)] 
zlib 1.2.7.1

12 years agoLine length cleanup.
Mark Adler [Mon, 25 Mar 2013 05:30:40 +0000 (22:30 -0700)] 
Line length cleanup.

12 years agoDo not return Z_BUF_ERROR if deflateParam() has nothing to write.
Mark Adler [Mon, 25 Mar 2013 05:12:31 +0000 (22:12 -0700)] 
Do not return Z_BUF_ERROR if deflateParam() has nothing to write.

If the compressed data was already at a block boundary, then
deflateParam() would report Z_BUF_ERROR, because there was nothing
to write.  With this patch, Z_OK is returned in that case.

12 years agoIn Makefile uninstall, don't rm if preceding cd fails.
Mark Adler [Sun, 24 Mar 2013 23:57:32 +0000 (16:57 -0700)] 
In Makefile uninstall, don't rm if preceding cd fails.

12 years agoMinor spacing cleanup in a comment in gzguts.h.
Mark Adler [Sun, 24 Mar 2013 23:56:05 +0000 (16:56 -0700)] 
Minor spacing cleanup in a comment in gzguts.h.

12 years agoAdd man pages for minizip and miniunzip.
Enrico Weigelt, metux IT service [Tue, 6 Jul 2010 18:06:08 +0000 (20:06 +0200)] 
Add man pages for minizip and miniunzip.

12 years agoAdd casts and consts to ease user conversion to C++.
Mark Adler [Sun, 24 Mar 2013 22:18:02 +0000 (15:18 -0700)] 
Add casts and consts to ease user conversion to C++.

You would still need to run zlib2ansi on all of the *.c files.

12 years agoClean up the addition of gzvprintf.
Mark Adler [Sun, 24 Mar 2013 06:47:15 +0000 (23:47 -0700)] 
Clean up the addition of gzvprintf.

12 years agoClean up the addition of inflateGetDictionary.
Mark Adler [Sun, 24 Mar 2013 05:57:27 +0000 (22:57 -0700)] 
Clean up the addition of inflateGetDictionary.

12 years agoRemove runtime check in configure for four-byte integer type.
Mark Adler [Sun, 24 Mar 2013 05:27:43 +0000 (22:27 -0700)] 
Remove runtime check in configure for four-byte integer type.

That didn't work when cross-compiling.  Simply rely on limits.h.
If a compiler does not have limits.h, then zconf.h.in should be
modified to define Z_U4 as an unsiged four-byte integer type in
order for crc32() to be fast.

This also simplifies and makes more portable to check for a four-
byte type using limits.h.

12 years agoFix configure for Sun shell.
Mark Adler [Sat, 23 Mar 2013 20:50:10 +0000 (13:50 -0700)] 
Fix configure for Sun shell.

12 years agoAdd gzvprintf() as an undocumented function in zlib.
Mark Adler [Sat, 23 Mar 2013 01:32:37 +0000 (18:32 -0700)] 
Add gzvprintf() as an undocumented function in zlib.

The function is only available if stdarg.h is available.

12 years agoAdd vc11 and vc12 build files to contrib/vstudio.
Mark Adler [Sat, 23 Mar 2013 00:38:37 +0000 (17:38 -0700)] 
Add vc11 and vc12 build files to contrib/vstudio.

12 years agoFix typos in the use of _LARGEFILE64_SOURCE in zconf.h.
Mark Adler [Sun, 24 Feb 2013 08:16:24 +0000 (00:16 -0800)] 
Fix typos in the use of _LARGEFILE64_SOURCE in zconf.h.

12 years agoSuport i686 and amd64 assembler builds in CMakeLists.txt.
Like Ma [Mon, 11 Feb 2013 18:41:27 +0000 (02:41 +0800)] 
Suport i686 and amd64 assembler builds in CMakeLists.txt.

 * Use -DASM686=1 to build with i686 asm.
 * Use -DAMD64=1 to build with amd64 asm.

12 years agoAdd TOP support to win32/Makefile.msc.
E. Timothy Uy [Thu, 20 Dec 2012 20:36:55 +0000 (12:36 -0800)] 
Add TOP support to win32/Makefile.msc.

Facilitate multi-platform compilation, e.g.:
nmake -f pathto\zlib\win32\Makefile.msc TOP=pathto\zlib

12 years agoSimplify contrib/vstudio/vc10 with 'd' suffix.
Fredrik Orderud [Tue, 11 Dec 2012 20:44:56 +0000 (21:44 +0100)] 
Simplify contrib/vstudio/vc10 with 'd' suffix.

12 years agoFix types in contrib/minizip to match result of get_crc_table().
takacsd [Fri, 30 Nov 2012 18:43:50 +0000 (19:43 +0100)] 
Fix types in contrib/minizip to match result of get_crc_table().

12 years agoFix casting error in contrib/testzlib/testzlib.c.
Jason Williams [Tue, 27 Nov 2012 04:27:06 +0000 (07:27 +0300)] 
Fix casting error in contrib/testzlib/testzlib.c.

12 years agoDon't specify --version-script on Apple platforms in CMakeLists.txt.
Will Glynn [Tue, 13 Nov 2012 18:41:30 +0000 (12:41 -0600)] 
Don't specify --version-script on Apple platforms in CMakeLists.txt.

Mac OS X's linker (derived from LLVM, not GNU binutils) does not support
--version-script. Don't specify it on this platform.

12 years agoQuote --version-script argument in CMakeLists.txt.
Will Glynn [Tue, 13 Nov 2012 18:35:50 +0000 (12:35 -0600)] 
Quote --version-script argument in CMakeLists.txt.

Previously, spaces in ${CMAKE_CURRENT_SOURCE_PATH} would expand into
multiple linker arguments.

12 years agoAdd contrib/vstudio/vc10 pre-build step for static only.
Greg Domjan [Fri, 14 Sep 2012 20:48:12 +0000 (16:48 -0400)] 
Add contrib/vstudio/vc10 pre-build step for static only.

Also correct typo for 64-bit debug build.

12 years agoAdd _tr_flush_bits to the external symbols prefixed by --zprefix.
Mark Adler [Sun, 24 Feb 2013 04:56:23 +0000 (20:56 -0800)] 
Add _tr_flush_bits to the external symbols prefixed by --zprefix.

12 years agoUse underscored I/O function names for WINAPI_FAMILY.
Mark Adler [Sun, 24 Feb 2013 04:27:13 +0000 (20:27 -0800)] 
Use underscored I/O function names for WINAPI_FAMILY.

Suggested by E. Timothy Uy.

12 years agoUpdate inflateBack() comments, since inflate() can be faster.
Mark Adler [Sun, 24 Feb 2013 04:12:20 +0000 (20:12 -0800)] 
Update inflateBack() comments, since inflate() can be faster.

12 years agoFix serious but very rare decompression bug in inftrees.c.
Mark Adler [Tue, 19 Feb 2013 05:06:35 +0000 (21:06 -0800)] 
Fix serious but very rare decompression bug in inftrees.c.

inftrees.c compared the number of used table entries to the maximum
allowed value using >= instead of >.  This patch fixes those to use
>.  The bug was discovered by Ignat Kolesnichenko of Yandex LC
where they have run petabytes of data through zlib.  Triggering the
bug is apparently very rare, seeing as how it has been out there in
the wild for almost three years before being discovered.  The bug
is instantiated only if the exact maximum number of decoding table
entries, ENOUGH_DISTS or ENOUGH_LENS is used by the block being
decoded, resulting in the false positive of overflowing the table.

12 years agoCheck for invalid code length codes in contrib/puff.
Mark Adler [Mon, 21 Jan 2013 18:15:51 +0000 (10:15 -0800)] 
Check for invalid code length codes in contrib/puff.

Without this fix, it would be possible to construct inputs to puff
that would cause it to segfault.

13 years agoFix comparisons of differently signed integers in contrib/blast.
Mark Adler [Thu, 25 Oct 2012 05:50:23 +0000 (22:50 -0700)] 
Fix comparisons of differently signed integers in contrib/blast.

13 years agoAdd note to contrib/blast to use binary mode in stdio.
Mark Adler [Thu, 25 Oct 2012 05:47:37 +0000 (22:47 -0700)] 
Add note to contrib/blast to use binary mode in stdio.

13 years agoCheck for input buffer malloc failure in examples/gzappend.c.
Mark Adler [Thu, 11 Oct 2012 23:10:59 +0000 (16:10 -0700)] 
Check for input buffer malloc failure in examples/gzappend.c.

13 years agoFix bug in gzclose() when gzwrite() runs out of memory.
Mark Adler [Tue, 2 Oct 2012 05:42:35 +0000 (22:42 -0700)] 
Fix bug in gzclose() when gzwrite() runs out of memory.

If the deflateInit2() called for the first gzwrite() failed with a
Z_MEM_ERROR, then a subsequent gzclose() would try to free an
already freed pointer.  This fixes that.

13 years agoFix bug where gzopen(), gzclose() would write an empty file.
Mark Adler [Sun, 30 Sep 2012 05:23:47 +0000 (22:23 -0700)] 
Fix bug where gzopen(), gzclose() would write an empty file.

A gzopen() to write (mode "w") followed immediately by a gzclose()
would output an empty zero-length file.  What it should do is write
an empty gzip file, with the gzip header, empty deflate content,
and gzip trailer totalling 20 bytes.  This fixes it to do that.

13 years agoFix memory allocation error in examples/zran.c [Nor].
Mark Adler [Sun, 30 Sep 2012 04:48:18 +0000 (21:48 -0700)] 
Fix memory allocation error in examples/zran.c [Nor].

13 years agoFix unintialized value bug in gzputc() introduced by const patches.
Mark Adler [Fri, 24 Aug 2012 22:02:28 +0000 (15:02 -0700)] 
Fix unintialized value bug in gzputc() introduced by const patches.

Avoid the use of an uninitialized value when the write buffers have
not been initialized.  A recent change to avoid the use of strm->
next_in in order to resolve some const conflicts added the use of
state->in in its place.  This patch avoids the use of state->in
when it is not initialized.  Nothing bad would actually happen,
since two variables set to the same unintialized value are
subtracted.  However valgrind was rightly complaining.  So this
fixes that.

13 years agoAvoid shift equal to bits in type (caused endless loop).
Mark Adler [Sun, 19 Aug 2012 00:59:50 +0000 (17:59 -0700)] 
Avoid shift equal to bits in type (caused endless loop).

Also clean up comparisons between different types, and some odd
indentation problems that showed up somehow.

A new endless loop was introduced by the clang compiler, which
apparently does odd things when the right operand of << is equal to
or greater than the number of bits in the type.  The C standard in
fact states that the behavior of << is undefined in that case.  The
loop was rewritten to use single-bit shifts.

13 years agoClean up examples/gzlog.[ch] comparisons of different types.
Mark Adler [Tue, 14 Aug 2012 07:31:23 +0000 (00:31 -0700)] 
Clean up examples/gzlog.[ch] comparisons of different types.

13 years agoClean up examples/gzjoin.c for z_const usage.
Mark Adler [Tue, 14 Aug 2012 07:30:44 +0000 (00:30 -0700)] 
Clean up examples/gzjoin.c for z_const usage.

13 years agoFix example/gzappend.c for proper z_const usage.
Mark Adler [Tue, 14 Aug 2012 07:29:58 +0000 (00:29 -0700)] 
Fix example/gzappend.c for proper z_const usage.

13 years agoUpdate examples/gun.c for proper z_const usage.
Mark Adler [Tue, 14 Aug 2012 04:49:10 +0000 (21:49 -0700)] 
Update examples/gun.c for proper z_const usage.

13 years agoClean up the usage of z_const and respect const usage within zlib.
Mark Adler [Mon, 13 Aug 2012 01:08:52 +0000 (18:08 -0700)] 
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.

13 years agoFix argument checks in gzlog_compress() and gzlog_write().
Mark Adler [Mon, 9 Jul 2012 00:01:13 +0000 (17:01 -0700)] 
Fix argument checks in gzlog_compress() and gzlog_write().

13 years agoRemove unused variable in infback9.c.
Mark Adler [Sun, 8 Jul 2012 23:48:36 +0000 (16:48 -0700)] 
Remove unused variable in infback9.c.

13 years agoFix comment typos in unzip.h and unzip.c.
Birunthan Mohanathas [Wed, 6 Jun 2012 17:30:39 +0000 (20:30 +0300)] 
Fix comment typos in unzip.h and unzip.c.

13 years agoUpdate copyright year in win32/zlib1.rc.
Thomas Roß [Wed, 6 Jun 2012 23:25:36 +0000 (01:25 +0200)] 
Update copyright year in win32/zlib1.rc.

13 years agoFix CMake compilation of static lib for MSVC2010 x64.
Thomas Roß [Wed, 6 Jun 2012 23:23:32 +0000 (01:23 +0200)] 
Fix CMake compilation of static lib for MSVC2010 x64.

13 years agoFix configure check for veracity of compiler error return codes.
Mark Adler [Sun, 10 Jun 2012 05:42:24 +0000 (22:42 -0700)] 
Fix configure check for veracity of compiler error return codes.

There were two problems before that this fixes.  One was that the
check for the compiler error return code preceded the determination
of the compiler and its options.  The other was that the checks
for compiler and library characteristics could be fooled if the
error options were set to reject K&R-style C.  configure now aborts
if the compiler produces a hard error on K&R-style C.

In addition, aborts of configure are now consistent, and remove
any temporary files.

13 years agoDelete "--version" file if created by "ar --version" [Richard G.].
Mark Adler [Sun, 10 Jun 2012 02:47:55 +0000 (19:47 -0700)] 
Delete "--version" file if created by "ar --version" [Richard G.].

13 years agoCleaner check for whether libtool is Apple or not on Darwin.
Mark Adler [Sun, 10 Jun 2012 05:58:06 +0000 (22:58 -0700)] 
Cleaner check for whether libtool is Apple or not on Darwin.

13 years agoOn Darwin, only use /usr/bin/libtool if libtool is not Apple.
Mark Adler [Sun, 10 Jun 2012 02:15:36 +0000 (19:15 -0700)] 
On Darwin, only use /usr/bin/libtool if libtool is not Apple.

The original change was to always use /usr/bin/libtool on Darwin,
in order to avoid using a GNU libtool installed by the user in the
path ahead of Apple's libtool.  However someone might install a
more recent Apple libtool ahead of /usr/bin/libtool.  This commit
checks to see if libtool is Apple, and uses /usr/bin/libtool if it
isn't.

13 years agoUse _snprintf for snprintf under Microsoft C in test/minigzip.c.
Mark Adler [Sun, 3 Jun 2012 23:28:06 +0000 (16:28 -0700)] 
Use _snprintf for snprintf under Microsoft C in test/minigzip.c.

13 years agoUse _snprintf for snprinf in Microsoft C.
Mark Adler [Sun, 3 Jun 2012 19:45:55 +0000 (12:45 -0700)] 
Use _snprintf for snprinf in Microsoft C.

More than a decade later, Microsoft C does not support the C99
standard.  It's good that _snprintf has a different name, since it
does not guarantee that the result is null terminated, as does
snprintf.  However where _snprintf is used under Microsoft C, the
destination string is assured to be long enough, so this will not
be a problem.  This occurs in two places, both in gzlib.c.  Where
sprintf functionality is needed by gzprintf, vsnprintf is used in
the case of Microsoft C.

13 years agoCorrect comment in deflate.h.
Mark Adler [Sat, 2 Jun 2012 17:16:43 +0000 (10:16 -0700)] 
Correct comment in deflate.h.

13 years agoAdd inflateGetDictionary() function.
Mark Adler [Sat, 26 May 2012 17:37:17 +0000 (10:37 -0700)] 
Add inflateGetDictionary() function.

13 years agoFix bug in 'F' mode for gzopen().
Mark Adler [Wed, 23 May 2012 05:31:19 +0000 (22:31 -0700)] 
Fix bug in 'F' mode for gzopen().

13 years agoEliminate use of mktemp in Makefile (not always available).
Mark Adler [Sun, 20 May 2012 18:32:13 +0000 (11:32 -0700)] 
Eliminate use of mktemp in Makefile (not always available).

13 years agoFix gzgetc undefine when Z_PREFIX set [Turk].
Mark Adler [Fri, 18 May 2012 04:13:23 +0000 (21:13 -0700)] 
Fix gzgetc undefine when Z_PREFIX set [Turk].

13 years agoAvoid including stddef.h on Windows for Z_SOLO compile [Niessink].
Mark Adler [Fri, 4 May 2012 04:23:45 +0000 (21:23 -0700)] 
Avoid including stddef.h on Windows for Z_SOLO compile [Niessink].

13 years agoReplace use of unsafe string functions with snprintf if available.
Mark Adler [Thu, 3 May 2012 06:18:38 +0000 (23:18 -0700)] 
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.

13 years agoChange version number to 1.2.7.1.
Mark Adler [Thu, 3 May 2012 05:38:26 +0000 (22:38 -0700)] 
Change version number to 1.2.7.1.

13 years agozlib 1.2.7 v1.2.7
Mark Adler [Thu, 3 May 2012 03:32:41 +0000 (20:32 -0700)] 
zlib 1.2.7

13 years agoAdd instructions to win32/Makefile.gcc for shared install [Torri].
Mark Adler [Thu, 3 May 2012 03:17:59 +0000 (20:17 -0700)] 
Add instructions to win32/Makefile.gcc for shared install [Torri].

13 years agoForce the native libtool in Mac OS X to avoid GNU libtool [Beebe].
Mark Adler [Wed, 2 May 2012 04:17:08 +0000 (21:17 -0700)] 
Force the native libtool in Mac OS X to avoid GNU libtool [Beebe].

13 years agoFix the path to zlib.map in CMakeLists.txt.
Daniel Snider [Tue, 3 Apr 2012 14:26:07 +0000 (09:26 -0500)] 
Fix the path to zlib.map in CMakeLists.txt.

13 years agoFix parsing of version with "-" in CMakeLists.txt [Snider, Ziegler].
Mark Adler [Mon, 30 Apr 2012 04:15:12 +0000 (21:15 -0700)] 
Fix parsing of version with "-" in CMakeLists.txt [Snider, Ziegler].

13 years agoFix location of executable for finding a four-byte integer.
Mark Adler [Mon, 30 Apr 2012 01:23:46 +0000 (18:23 -0700)] 
Fix location of executable for finding a four-byte integer.

13 years agoFix type mismatch between get_crc_table() and crc_table.
Mark Adler [Sun, 29 Apr 2012 23:18:12 +0000 (16:18 -0700)] 
Fix type mismatch between get_crc_table() and crc_table.

crc_table is made using a four-byte integer (when that can be
determined).  However get_crc_table() returned a pointer to an
unsigned long, which could be eight bytes.  This fixes that by
creating a new z_crc_t type for the crc_table.

This type is also used for the BYFOUR crc calculations that depend
on a four-byte type.  The four-byte type can now be determined by
./configure, which also solves a problem where ./configure --solo
would never use BYFOUR.  No the Z_U4 #define indicates that four-
byte integer was found either by ./configure or by zconf.h.

13 years agoAvoid race condition for parallel make (-j) running example.
Mark Adler [Mon, 23 Apr 2012 05:58:06 +0000 (22:58 -0700)] 
Avoid race condition for parallel make (-j) running example.

13 years agoRemove -R. from Solaris shared build (possible security issue).
Mark Adler [Mon, 23 Apr 2012 01:41:11 +0000 (18:41 -0700)] 
Remove -R. from Solaris shared build (possible security issue).

13 years agoUpdate ./configure for Solaris, support --64 [Mooney].
Mark Adler [Mon, 23 Apr 2012 01:27:41 +0000 (18:27 -0700)] 
Update ./configure for Solaris, support --64 [Mooney].