]> git.lizzy.rs Git - zlib.git/log
zlib.git
8 years agoUse a consistent and more modern approach to not use a parameter.
Mark Adler [Sun, 4 Oct 2015 18:45:00 +0000 (11:45 -0700)]
Use a consistent and more modern approach to not use a parameter.

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.

8 years agoUse UTF-8 for non-ASCII characters in ChangeLog.
Mark Adler [Wed, 16 Sep 2015 22:40:00 +0000 (15:40 -0700)]
Use UTF-8 for non-ASCII characters in ChangeLog.

8 years agoClean up portability for shifts and integer sizes.
Mark Adler [Sun, 6 Sep 2015 01:56:55 +0000 (18:56 -0700)]
Clean up portability for shifts and integer sizes.

8 years agoAvoid shifts of negative values inflateMark().
Mark Adler [Sun, 6 Sep 2015 00:45:55 +0000 (17:45 -0700)]
Avoid shifts of negative values inflateMark().

The C standard says that bit shifts of negative integers is
undefined.  This casts to unsigned values to assure a known
result.

8 years agoFix typo.
Mark Adler [Sun, 16 Aug 2015 01:14:50 +0000 (18:14 -0700)]
Fix typo.

8 years agoUse const for static tree descriptions in deflate.
Mark Adler [Sun, 16 Aug 2015 01:04:50 +0000 (18:04 -0700)]
Use const for static tree descriptions in deflate.

This is in order to permit shared memory for these structures.

8 years agoAllow building zlib outside of the source directory.
Mark Adler [Sun, 2 Aug 2015 21:46:58 +0000 (14:46 -0700)]
Allow building zlib outside of the source directory.

To build, simply run configure from the source directory by
specifying its path.  That path will be used to find the source
files.  The source directory will not be touched.  All new and
modified files will be made in the current directory.  Discovered
in the process that not all makes understand % or $<, and not all
compilers understand -include or -I-.  This required a larger
Makefile.in with explicit dependencies.

8 years agoDo not initialize unsigned with -1 in compress.c uncompr.c.
Mark Adler [Sun, 2 Aug 2015 23:47:14 +0000 (16:47 -0700)]
Do not initialize unsigned with -1 in compress.c uncompr.c.

Sun compiler complained.  Use (unsigned)0 - 1 instead.

8 years agoAlign deflateParams() and its documentation in zlib.h.
Mark Adler [Sun, 2 Aug 2015 07:02:07 +0000 (00:02 -0700)]
Align deflateParams() and its documentation in zlib.h.

This updates the documentation to reflect the behavior of
deflateParams() when it is not able to compress all of the input
data provided so far due to insufficient output space.  It also
assures that data provided is compressed before the parameter
changes, even if at the beginning of the stream.

8 years agoCompile the gzopen_w() function when __CYGWIN__ defined.
Mark Adler [Sun, 2 Aug 2015 00:38:56 +0000 (17:38 -0700)]
Compile the gzopen_w() function when __CYGWIN__ defined.

8 years agoDefine _POSIX_SOURCE to enable POSIX extensions on some systems.
Mark Adler [Wed, 29 Jul 2015 06:32:35 +0000 (23:32 -0700)]
Define _POSIX_SOURCE to enable POSIX extensions on some systems.

8 years agoClarify deflateReset() documentation.
Mark Adler [Wed, 29 Jul 2015 06:17:49 +0000 (23:17 -0700)]
Clarify deflateReset() documentation.

It previously could have been misinterpreted to mean that parameter
changes after deflateInit2() would be reversed, which is not the
case.

8 years agoAvoid uninitialized access by gzclose_w().
Mark Adler [Wed, 29 Jul 2015 06:13:53 +0000 (23:13 -0700)]
Avoid uninitialized access by gzclose_w().

8 years agoAvoid use of DEBUG macro -- change to ZLIB_DEBUG.
Mark Adler [Wed, 29 Jul 2015 05:44:31 +0000 (22:44 -0700)]
Avoid use of DEBUG macro -- change to ZLIB_DEBUG.

8 years agoAvoid use of reallocf() in test/infcover.c.
Mark Adler [Wed, 29 Jul 2015 04:55:09 +0000 (21:55 -0700)]
Avoid use of reallocf() in test/infcover.c.

8 years agoFix inflateInit2() bug when windowBits is 16 or 32.
Mark Adler [Wed, 29 Jul 2015 04:41:20 +0000 (21:41 -0700)]
Fix inflateInit2() bug when windowBits is 16 or 32.

A windowBits value of 0, 16, or 32 gets the window bits from the
zlib header.  However there is no zlib header for 16, or for 32
when the input is gzip.  This commit sets the window bits for
inflate to 15 if a gzip stream is detected and windowBits was 16
or 32.

8 years agoAdd comment about not using windowBits of 8 for deflate().
Mark Adler [Wed, 29 Jul 2015 04:06:06 +0000 (21:06 -0700)]
Add comment about not using windowBits of 8 for deflate().

8 years agoPut license in zlib.3 man page.
Mark Adler [Wed, 8 Jul 2015 03:11:01 +0000 (20:11 -0700)]
Put license in zlib.3 man page.

Previously there was a confusing reference to a "distribution
directory".

8 years agoImprove speed of gzprintf() in transparent mode.
Mark Adler [Mon, 6 Jul 2015 01:14:53 +0000 (18:14 -0700)]
Improve speed of gzprintf() in transparent mode.

8 years agoAvoid left shift of a negative value in flush rank calculation.
Mark Adler [Sun, 5 Jul 2015 20:51:50 +0000 (13:51 -0700)]
Avoid left shift of a negative value in flush rank calculation.

The C standard permits an undefined result for a left shift of a
negative value.

9 years agoRemedy Coverity warning. [Randers-Pehrson]
Mark Adler [Tue, 27 Jan 2015 05:41:26 +0000 (21:41 -0800)]
Remedy Coverity warning. [Randers-Pehrson]

9 years agoAdd inflateCodesUsed() function for internal use.
Mark Adler [Mon, 29 Dec 2014 08:18:42 +0000 (00:18 -0800)]
Add inflateCodesUsed() function for internal use.

9 years agoFix bug in test/example.c where error code not saved.
Mark Adler [Wed, 2 Jul 2014 23:34:22 +0000 (16:34 -0700)]
Fix bug in test/example.c where error code not saved.

10 years agoNote in zlib.h that compress() uses Z_DEFAULT_COMPRESSION.
Mark Adler [Sat, 26 Apr 2014 15:12:37 +0000 (08:12 -0700)]
Note in zlib.h that compress() uses Z_DEFAULT_COMPRESSION.

10 years agoFix uncompress() to work on lengths more than a maximum unsigned.
Mark Adler [Sat, 26 Apr 2014 15:04:09 +0000 (08:04 -0700)]
Fix uncompress() to work on lengths more than a maximum unsigned.

10 years agoFix compress() to work on lengths more than a maximum unsigned.
Mark Adler [Sat, 26 Apr 2014 04:52:19 +0000 (21:52 -0700)]
Fix compress() to work on lengths more than a maximum unsigned.

10 years agoAssure that gzoffset() is correct when appending.
Mark Adler [Thu, 24 Apr 2014 23:45:36 +0000 (19:45 -0400)]
Assure that gzoffset() is correct when appending.

An open() with O_APPEND followed by an lseek() to determine the
position will return zero for a non-empty file, even though the
next write will start at the end of the file.  This commit works
around that by doing an lseek() to the end when appending.

10 years agoImprove contrib/blast to return unused bytes. Fix the test code
Mark Adler [Sat, 24 Aug 2013 08:53:31 +0000 (01:53 -0700)]
Improve contrib/blast to return unused bytes.  Fix the test code
to report the count of unused bytes at the end correctly.  Add the
ability to provide initial input to blast().

10 years agoFix contrib/minizip to permit unzipping with desktop API [Zouzou].
Mark Adler [Sun, 4 Aug 2013 01:13:23 +0000 (18:13 -0700)]
Fix contrib/minizip to permit unzipping with desktop API [Zouzou].

11 years agoSpacing cleanup.
Mark Adler [Fri, 24 May 2013 03:11:54 +0000 (20:11 -0700)]
Spacing cleanup.

11 years agoChange version number to 1.2.8.1.
Mark Adler [Fri, 3 May 2013 06:12:54 +0000 (23:12 -0700)]
Change version number to 1.2.8.1.

11 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

11 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.

11 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.

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

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

11 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.

11 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].

11 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.

11 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

11 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.

11 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.

11 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

11 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.

11 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.

11 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.

11 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.

11 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

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

11 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.

11 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.

11 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.

11 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.

11 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.

11 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.

11 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.

11 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.

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

11 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.

11 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.

11 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.

11 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.

11 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

11 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.

11 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().

11 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.

11 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.

11 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.

11 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.

11 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.

11 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.

11 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.

11 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.

11 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.

11 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.

11 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.

11 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.

11 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.

11 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.

11 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].

11 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.

11 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.

11 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.

11 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.

11 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.

11 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.

11 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.

11 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().

11 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.

11 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.

11 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.

11 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.

12 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.

12 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.].

12 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.

12 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.

12 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.

12 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.

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

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