Mark Adler [Wed, 14 Mar 2012 15:34:50 +0000 (08:34 -0700)]
Avoid the use of the -u option with mktemp.
Mark Adler [Wed, 14 Mar 2012 06:19:38 +0000 (23:19 -0700)]
Allow the use of -Wundef when compiling or using zlib.
Mark Adler [Tue, 13 Mar 2012 05:21:24 +0000 (22:21 -0700)]
Move obsolete emx makefile to old [Truta].
Mark Adler [Tue, 13 Mar 2012 05:18:36 +0000 (22:18 -0700)]
Remove unneeded EXTRA_CFLAGS from win32/Makefile.gcc [Truta].
Christoph J. Thompson [Mon, 12 Mar 2012 16:31:58 +0000 (17:31 +0100)]
If using cmake with MSVC, add the source directory to the includes.
modified: CMakeLists.txt
Christoph J. Thompson [Sun, 11 Mar 2012 09:19:06 +0000 (10:19 +0100)]
Include version symbols for cmake builds.
Add a version variable so it gets added to the pkg-config file.
Christoph J. Thompson [Sun, 11 Mar 2012 09:17:57 +0000 (10:17 +0100)]
Build both a static and a shared version of zlib with cmake.
Christoph J. Thompson [Sun, 11 Mar 2012 09:17:16 +0000 (10:17 +0100)]
Generate and install the pkg-config file with cmake.
Christoph J. Thompson [Sun, 11 Mar 2012 09:15:31 +0000 (10:15 +0100)]
Allow overriding the default install locations for cmake.
Mark Adler [Sun, 11 Mar 2012 06:24:08 +0000 (22:24 -0800)]
Update copyright years in gzlib.c.
Mark Adler [Sat, 10 Mar 2012 17:58:37 +0000 (09:58 -0800)]
Fix comments in win32/Makefile.gcc for proper usage.
Mark Adler [Sat, 10 Mar 2012 17:54:08 +0000 (09:54 -0800)]
Avoid warnings when O_CLOEXEC or O_EXCL are not defined.
Nathan Phillip Brink [Fri, 9 Mar 2012 01:29:46 +0000 (01:29 +0000)]
Add DESTDIR support to mingw32 win32/Makefile.gcc.
Mark Adler [Sat, 10 Mar 2012 02:43:50 +0000 (18:43 -0800)]
Add ability to choose the builder in make_vms.com [Schweda].
Mark Adler [Sun, 4 Mar 2012 19:26:25 +0000 (11:26 -0800)]
Make sure that O_EXCL is used portably.
Mark Adler [Sun, 4 Mar 2012 17:46:25 +0000 (09:46 -0800)]
Fix contrib/vstudio project link errors [Mohanathas].
Mark Adler [Sun, 4 Mar 2012 06:43:15 +0000 (22:43 -0800)]
Fix bug in test/minigzip.c for configure --solo.
Mark Adler [Sat, 3 Mar 2012 18:24:44 +0000 (10:24 -0800)]
Add "x" (O_EXCL) and "e" (O_CLOEXEC) modes support to gzopen().
Mark Adler [Sat, 3 Mar 2012 17:28:00 +0000 (09:28 -0800)]
Fix bug in gzclose_w() when gzwrite() fails to allocate memory.
Mark Adler [Sat, 3 Mar 2012 08:20:00 +0000 (00:20 -0800)]
Simplify test and use of gcc hidden attribute.
Mark Adler [Sat, 3 Mar 2012 08:03:30 +0000 (00:03 -0800)]
Don't use library or built-in byte swaps.
Using optimized byte swaps reduced portability for no real benefit,
since they are in parts of the code that represent a tiny fraction
of the execution time. So a simple definition of a byte swap is
now used.
Mark Adler [Sat, 3 Mar 2012 07:50:17 +0000 (23:50 -0800)]
Fix make_vms.com for VAX [Zinser].
Mark Adler [Sat, 3 Mar 2012 07:47:42 +0000 (23:47 -0800)]
Cast to char * in gzprintf to avoid warnings [Zinser].
Mark Adler [Mon, 20 Feb 2012 17:24:30 +0000 (09:24 -0800)]
Avoid using __int64 for gcc or solo compilation.
Mark Adler [Mon, 20 Feb 2012 07:31:55 +0000 (23:31 -0800)]
Improve the detection of no hidden visibility attribute.
Mark Adler [Mon, 20 Feb 2012 06:45:10 +0000 (22:45 -0800)]
Do not use the visibility attribute if NO_VIZ defined.
Mark Adler [Mon, 20 Feb 2012 06:36:40 +0000 (22:36 -0800)]
Update version numbers and year in win32/README-WIN32.txt.
Mark Adler [Sun, 19 Feb 2012 07:11:49 +0000 (23:11 -0800)]
Use __WATCOMC__ instead of __WATCOM__.
Mark Adler [Sat, 18 Feb 2012 23:21:13 +0000 (15:21 -0800)]
Include unistd.h for Watcom C.
Mark Adler [Sat, 18 Feb 2012 23:19:44 +0000 (15:19 -0800)]
Require gcc 4.0 or later on Mac OS X to use the hidden attribute.
Török Edwin [Tue, 14 Feb 2012 10:50:18 +0000 (12:50 +0200)]
Fix build with non-GNU make on Solaris.
Mark Adler [Sat, 18 Feb 2012 22:10:20 +0000 (14:10 -0800)]
Restore gzgetc_ for backward compatibility with 1.2.6.
Mark Adler [Sat, 18 Feb 2012 21:55:09 +0000 (13:55 -0800)]
Test for existence of strerror.
SunOS 4.1 claims that it is __STDC__, but it does not have strerror
in string.h. Instead of using __STDC__, this puts a direct test
for strerror in configure, and uses that information in gzguts.h.
Mark Adler [Sat, 18 Feb 2012 16:19:59 +0000 (08:19 -0800)]
Replace use of memmove() with a simple copy for portability.
SunOS 4.1 doesn't have memmove(), and there may be others. memcpy()
should not be used for overlapping copies, so here a simple copy is
implemented that works for the particular direction of the overlap,
which is where the destination precedes the source.
Mark Adler [Tue, 14 Feb 2012 07:34:48 +0000 (23:34 -0800)]
Expunge gzgetc_ from configuration files.
Mark Adler [Tue, 14 Feb 2012 07:02:13 +0000 (23:02 -0800)]
Remove unnecessary include for byte swap built-in [Bosmans].
Mark Adler [Mon, 13 Feb 2012 03:28:06 +0000 (19:28 -0800)]
Don't use built-in byte swaps if compiled solo.
Mark Adler [Mon, 13 Feb 2012 00:15:47 +0000 (16:15 -0800)]
Change version number to 1.2.7.
Mark Adler [Sun, 12 Feb 2012 22:11:48 +0000 (14:11 -0800)]
zlib 1.2.6.1
Mark Adler [Sat, 11 Feb 2012 08:31:24 +0000 (00:31 -0800)]
Fix minor typo in zlib.h comments [Rześniowiecki].
Mark Adler [Sat, 11 Feb 2012 08:26:38 +0000 (00:26 -0800)]
Use optimized byte swap operations for Microsoft and GNU [Snyder].
Mark Adler [Sat, 11 Feb 2012 07:55:12 +0000 (23:55 -0800)]
Remove unnecessary gzgetc_ function.
Mark Adler [Sun, 5 Feb 2012 18:55:09 +0000 (10:55 -0800)]
Update make_vms.com [Zinser].
Mark Adler [Sat, 4 Feb 2012 18:14:13 +0000 (10:14 -0800)]
Minor cleanup in contrib/minizip/zip.c [Vollant].
Mark Adler [Sat, 4 Feb 2012 06:56:16 +0000 (22:56 -0800)]
Use name in GCC_CLASSIC as C compiler for coverage testing, if set.
Apple removed support for gcov in the default gcc compiler chain,
when they moved to llvm. This can be circumvented in XCode 4.2 by
using the gcc chain with gcc-4.2. This patch allows setting
GCC_CLASSIC to the name of a real gcc executable (e.g. "gcc-4.2")
to allow coverage testing.
Mark Adler [Thu, 2 Feb 2012 07:47:47 +0000 (23:47 -0800)]
Avoid library header include in crc32.c for Z_SOLO.
crc32.c was #including limits.h in order to find a four-byte integer
type. It was doing this even if Z_SOLO were defined, violating the
intent of Z_SOLO, which is to include no library headers and require
no library functions. Now crc32.c obeys the intent of Z_SOLO, but
with the downside that crc32() will be slower than when not compiled
with Z_SOLO. This can be remedied manually by typedefing u4 to a
known four-byte unsigned integer type, and #defining BYFOUR in
crc32.c.
Mark Adler [Thu, 2 Feb 2012 07:25:34 +0000 (23:25 -0800)]
Put gzflags() functionality back in zutil.c.
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.
Mark Adler [Thu, 2 Feb 2012 06:41:52 +0000 (22:41 -0800)]
Include gz_header definition when compiling zlib solo.
Mark Adler [Tue, 31 Jan 2012 07:55:14 +0000 (23:55 -0800)]
Fix problem with ./configure --prefix and gzgetc macro.
Mark Adler [Mon, 30 Jan 2012 03:20:13 +0000 (19:20 -0800)]
Include io.h in gzguts.h for Microsoft compilers.
Mark Adler [Mon, 30 Jan 2012 01:44:04 +0000 (17:44 -0800)]
Avoid the use of the Objective-C reserved name "id".
Mark Adler [Mon, 30 Jan 2012 03:25:44 +0000 (19:25 -0800)]
Change version number to 1.2.6.1.
Mark Adler [Sun, 29 Jan 2012 18:13:15 +0000 (10:13 -0800)]
zlib 1.2.6
Mark Adler [Sun, 29 Jan 2012 17:57:58 +0000 (09:57 -0800)]
Correct in zlib.map when deflateResetKeep was added.
Mark Adler [Sun, 29 Jan 2012 17:27:41 +0000 (09:27 -0800)]
Use the -m option on ldconfig for BSD systems [Tobias].
Mark Adler [Sun, 29 Jan 2012 17:12:08 +0000 (09:12 -0800)]
Have gzputc return the character written instead of the argument.
When successful, gzputc would return the second argument. If the
second argument were -1, gzputc would return -1 instead of the
character written, which was 255. However the -1 would not be
distinguishable from an error. Now gzputc returns 255 in that
case.
Mark Adler [Sun, 29 Jan 2012 16:53:53 +0000 (08:53 -0800)]
Exit when required parameters not provided to win32/Makefile.gcc.
Mark Adler [Sat, 28 Jan 2012 22:48:50 +0000 (14:48 -0800)]
Add the generation of configure.log by ./configure.
Jonathan Nieder [Sat, 21 Jan 2012 21:55:54 +0000 (15:55 -0600)]
Add an --enable-demos option to contrib/minizip/configure.
This makes build-testing and installing the minizip/miniunzip programs
as simple as "autoreconf -if && ./configure --enable-demos && make &&
make install". Without --enable-demos, the makefile will only build
and install the library, as before. Helped by Mike Frysinger.
minizip/miniunzip were not intended to be general-purpose installed
utilities, but they can be useful from time to time as a lightweight
substitute for zip/unzip. You can also use them to quickly test that
the library installation procedure worked.
Jonathan Nieder [Tue, 17 Jan 2012 21:06:41 +0000 (15:06 -0600)]
Add support for VPATH builds in contrib/minizip.
Instead of using relative paths directly, use paths relative to
top_srcdir and top_builddir to refer to source files and built files,
respectively.
Note that the toplevel zlib configure script still does not have any
special support for out-of-tree builds. But now you can do
(cd contrib/minizip && autoreconf -fis)
mkdir -p BUILD/test
cp *.c *.h *.in zlib.map configure zlib.3 BUILD
cp test/*.c BUILD/test
(cd BUILD && ./configure --shared)
(cd BUILD && make)
mkdir -p BUILD/contrib/minizip
cd BUILD/contrib/minizip
../../../contrib/minizip/configure
make
While at it, move the include path and library path settings to
CPPFLAGS and LDFLAGS respectively instead of setting both in CFLAGS.
Thanks to Mike Frysinger for advice.
Jonathan Nieder [Tue, 17 Jan 2012 20:28:30 +0000 (14:28 -0600)]
Add missing libs to minizip linker command.
Trying to build the minizip utility from contrib/minizip after an
autoreconf -f:
libtool: link: gcc -g -O2 -o minizip minizip.o
minizip.o: In function `getFileCrc':
/tmp/zlib/contrib/minizip/minizip.c:211: undefined reference to `crc32'
minizip.o: In function `main':
/tmp/zlib/contrib/minizip/minizip.c:378: undefined reference to `zipOpen64'
/tmp/zlib/contrib/minizip/minizip.c:451: undefined reference to `zipOpenNewFileInZip3_64'
/tmp/zlib/contrib/minizip/minizip.c:502: undefined reference to `zipCloseFileInZip'
/tmp/zlib/contrib/minizip/minizip.c:509: undefined reference to `zipClose'
/tmp/zlib/contrib/minizip/minizip.c:485: undefined reference to `zipWriteInFileInZip'
collect2: error: ld returned 1 exit status
The cause: contrib/minizip/Makefile.am does not specify that minizip
needs to be linked to libminizip. With some linkers (e.g., GNU
binutils without --copy-dt-needed-entries), an indirect dependency
cannot be used to resolve symbols, so link to libz for crc32(), too.
Jonathan Nieder [Tue, 17 Jan 2012 20:26:05 +0000 (14:26 -0600)]
Add -I../.. -L../.. to CFLAGS for minizip and miniunzip.
Trying to build miniunzip utility from contrib/minizip after an
autoreconf -f produces
[...]
In file included from minizip.c:61:0:
zip.h:50:18: fatal error: zlib.h: No such file or directory
unless zlib is already installed. Use AM_CFLAGS to set the include
path and library path to point to the just-build copy of zlib to
fix this. (This was already done for libminizip but not the binaries
that use it before this patch.)
Mark Adler [Sat, 21 Jan 2012 19:59:32 +0000 (11:59 -0800)]
Remove trailing space in contrib/minizip/minizip.c.
Mark Adler [Sat, 21 Jan 2012 19:54:52 +0000 (11:54 -0800)]
Avoid some warnings in contrib/minizip [Vollant].
Mark Adler [Sat, 21 Jan 2012 19:51:54 +0000 (11:51 -0800)]
Protect for long name and extra fields in contrib/minizip [Vollant].
Mark Adler [Sat, 21 Jan 2012 19:50:36 +0000 (11:50 -0800)]
Fix bug when compiling minizip with C++ [Vollant].
Mark Adler [Sat, 21 Jan 2012 19:49:31 +0000 (11:49 -0800)]
Minor cleanup up contrib/minizip/unzip.c [Vollant].
Mark Adler [Sat, 21 Jan 2012 19:48:14 +0000 (11:48 -0800)]
Avoid warning for no encryption in contrib/minizip/zip.c [Vollant].
Mark Adler [Sat, 21 Jan 2012 07:36:59 +0000 (23:36 -0800)]
Make version explicit in contrib/minizip/configure.ac [Bosmans].
Mark Adler [Thu, 19 Jan 2012 03:33:02 +0000 (19:33 -0800)]
Include io.h for Turbo C / Borland C on all platforms [Truta].
Mark Adler [Tue, 17 Jan 2012 01:57:42 +0000 (17:57 -0800)]
Correct suggested usages in win32/Makefile.msc [שחר, Horvath].
Mark Adler [Tue, 17 Jan 2012 01:52:51 +0000 (17:52 -0800)]
Fix compilation of contrib/minizip on FreeBSD [Márquez].
Mark Adler [Tue, 17 Jan 2012 01:45:58 +0000 (17:45 -0800)]
Fix contrib/minizip/zip.c for 64-bit architectures [Dalsnes].
Mark Adler [Tue, 17 Jan 2012 01:39:54 +0000 (17:39 -0800)]
Fix CMakeLists.txt for cross compilation [McClure].
Mark Adler [Mon, 16 Jan 2012 22:50:09 +0000 (14:50 -0800)]
Have ./configure use the compiler return code for error indication.
Previously ./configure would use any output on stderr as an indication
that the compilation failed. However if some compiler wrapper uses
stderr for some other purpose, e.g. distcc for nodes going down, then
./configure would not properly configure the build. This problem was
noted by Mike Frysinger. For backwards compatibility, ./configure
will revert to the old way, i.e. checking for anything on stderr, if
when it deliberately runs the compiler with an error, a zero exit
status is returned.
Mark Adler [Mon, 16 Jan 2012 21:16:39 +0000 (13:16 -0800)]
Fix large-entry detection in minizip on 64-bit systems [Schiffer].
Mark Adler [Mon, 16 Jan 2012 21:13:07 +0000 (13:13 -0800)]
Fix configure.ac for contrib/minizip [Schiffer].
Mark Adler [Mon, 16 Jan 2012 16:22:57 +0000 (08:22 -0800)]
Fix function numbers for gzgetc_ in zlibvc.def files.
Mark Adler [Mon, 16 Jan 2012 04:46:53 +0000 (20:46 -0800)]
Update the Pascal interface in contrib/pascal.
Mark Adler [Mon, 16 Jan 2012 03:31:31 +0000 (19:31 -0800)]
Change version number to 1.2.6.
Mark Adler [Mon, 16 Jan 2012 02:58:21 +0000 (18:58 -0800)]
zlib 1.2.5.3
Mark Adler [Sat, 14 Jan 2012 18:53:23 +0000 (10:53 -0800)]
Make sure that no extra inserting is done if the strategy changes.
Mark Adler [Sat, 14 Jan 2012 05:54:40 +0000 (23:54 -0600)]
Insert the first two strings in the hash table after a flush.
This allows deflate to generate the same output when continuing after
a Z_SYNC_FLUSH vs. using deflateSetDictionary() after a Z_FULL_FLUSH
or a deflateReset(). It also slightly improves compression when
flushing by providing two more strings to possibly match at the start
of the new block.
Mark Adler [Thu, 29 Dec 2011 21:19:27 +0000 (13:19 -0800)]
Write out all of the available bits when using Z_BLOCK.
Previously, the bit buffer would hold 1 to 16 bits after "all" of the
output is provided after a Z_BLOCK deflate() call. Now at most seven
bits remain in the output buffer after Z_BLOCK. flush_pending() now
flushes the bit buffer before copying out the byte buffer, in order
for it to really flush as much as possible.
Mark Adler [Sat, 7 Jan 2012 19:00:37 +0000 (11:00 -0800)]
Remove second empty static block for Z_PARTIAL_FLUSH.
Z_PARTIAL_FLUSH would sometimes emit two empty static blocks instead
of one in order to provide enough lookahead for inflate to be able
to decode what was last compressed. inflate no longer needs that
much lookahead, so this removes the possibility of emitting the
second empty static block. Z_PARTIAL_FLUSH will now emit only one
empty static block.
Mark Adler [Sat, 7 Jan 2012 17:54:40 +0000 (09:54 -0800)]
Allow deflatePrime() to insert bits in the middle of a stream.
This allows the insertion of multiple empty static blocks for the
purpose of efficiently bringing a stream to a byte boundary.
Mark Adler [Thu, 29 Dec 2011 08:15:44 +0000 (00:15 -0800)]
Permit Z_NULL arguments to deflatePending.
This avoids having to create useless variables for return values
that aren't needed.
Mark Adler [Thu, 29 Dec 2011 08:03:55 +0000 (00:03 -0800)]
Avoid extraneous empty blocks when doing empty flushes.
Previously when doing an empty flush, a extra static or stored block
could be emitted before the requested empty static or stored block.
This patch prevents the emission of empty blocks by the deflate_*
functions.
Mark Adler [Thu, 29 Dec 2011 07:57:14 +0000 (23:57 -0800)]
Permit stronger flushes after Z_BLOCK flushes.
The incorporation of the Z_BLOCK flush did not update the rejection
of lower ranked flushes immediately after higher ranked flushes with
no more input data. This prevented an empty Z_SYNC_FLUSH right after
a Z_BLOCK flush, which would be desired to bring the deflate stream
to a byte boundary conditionally on whether or not it was already at
a byte boundary. This patch re-ranks Z_BLOCK above Z_NO_FLUSH but
below Z_PARTIAL_FLUSH, allowing stronger empty flushes to follow a
Z_BLOCK flush.
Mark Adler [Sat, 24 Dec 2011 04:56:27 +0000 (20:56 -0800)]
Update win32/Makefile.gcc to build test/*.c [Truta].
Mark Adler [Tue, 20 Dec 2011 06:31:02 +0000 (22:31 -0800)]
Update AS400 build files and documentation [Monnerat].
Moves new function definitions in order to preserve shared library
compatibility with previous versions. Also increases buffer size in
RPG binding and updates the documentation.
Mark Adler [Mon, 19 Dec 2011 06:26:48 +0000 (22:26 -0800)]
Remove old/visualc6 given CMakefile and other alternatives.
Mark Adler [Mon, 19 Dec 2011 06:20:02 +0000 (22:20 -0800)]
Update win32/Makefile.msc to build test/*.c [Truta].
Mark Adler [Mon, 19 Dec 2011 06:17:51 +0000 (22:17 -0800)]
Do not use _lseeki64 under Borland C++ [Truta].
Mark Adler [Sun, 18 Dec 2011 22:47:08 +0000 (14:47 -0800)]
Restore gzgetc function for binary compatibility.
Newly compiled applications will use the gzgetc macro.
Mark Adler [Sun, 18 Dec 2011 20:07:25 +0000 (12:07 -0800)]
Change version numbers to 1.2.5.3.
Mark Adler [Sun, 18 Dec 2011 18:39:45 +0000 (10:39 -0800)]
zlib 1.2.5.2
Mark Adler [Sat, 17 Dec 2011 22:28:33 +0000 (14:28 -0800)]
Remove hard-coding of resource compiler in CMakeLists.txt [Blammo]
Mark Adler [Wed, 14 Dec 2011 12:21:00 +0000 (04:21 -0800)]
Document gzread() capability to read concurrently written files.
Also since gzread() will no longer return an error for an incomplete
gzip file, have gzclose() return an error if the last gzread() ended
in the middle of a gzip stream.
Mark Adler [Wed, 14 Dec 2011 06:25:59 +0000 (22:25 -0800)]
Avoid use of Z_BUF_ERROR in gz* functions except for premature EOF.
Z_BUF_ERROR was also being used for an unsuccessful gzungetc and for buffer
lengths that didn't fit in an int. Those uses were changed to Z_DATA_ERROR
in order to assure that Z_BUF_ERROR occurs only when a premature end of
input occurs, indicating that gzclearerr() can be used.