Skip to content

Commit c20bcde

Browse files
committed
Issue #18527: Upgrade internal copy of zlib to 1.2.8
1 parent 3ac1eb1 commit c20bcde

40 files changed

+2973
-2859
lines changed

‎Misc/NEWS‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ Core and Builtins
1616
Library
1717
-------
1818

19+
- Issue #18527: Upgrade internal copy of zlib to 1.2.8.
20+
1921
- Issue #19274: Add a filterfunc parameter to PyZipFile.writepy.
2022

2123

‎Modules/zlib/ChangeLog‎

Lines changed: 265 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,276 @@
11

22
ChangeLog file for zlib
33

4+
Changes in 1.2.8 (28 Apr 2013)
5+
- Update contrib/minizip/iowin32.c for Windows RT [Vollant]
6+
- Do not force Z_CONST for C++
7+
- Clean up contrib/vstudio [Ro�]
8+
- Correct spelling error in zlib.h
9+
- Fix mixed line endings in contrib/vstudio
10+
11+
Changes in 1.2.7.3 (13 Apr 2013)
12+
- Fix version numbers and DLL names in contrib/vstudio/*/zlib.rc
13+
14+
Changes in 1.2.7.2 (13 Apr 2013)
15+
- Change check for a four-byte type back to hexadecimal
16+
- Fix typo in win32/Makefile.msc
17+
- Add casts in gzwrite.c for pointer differences
18+
19+
Changes in 1.2.7.1 (24 Mar 2013)
20+
- Replace use of unsafe string functions with snprintf if available
21+
- Avoid including stddef.h on Windows for Z_SOLO compile [Niessink]
22+
- Fix gzgetc undefine when Z_PREFIX set [Turk]
23+
- Eliminate use of mktemp in Makefile (not always available)
24+
- Fix bug in 'F' mode for gzopen()
25+
- Add inflateGetDictionary() function
26+
- Correct comment in deflate.h
27+
- Use _snprintf for snprintf in Microsoft C
28+
- On Darwin, only use /usr/bin/libtool if libtool is not Apple
29+
- Delete "--version" file if created by "ar --version" [Richard G.]
30+
- Fix configure check for veracity of compiler error return codes
31+
- Fix CMake compilation of static lib for MSVC2010 x64
32+
- Remove unused variable in infback9.c
33+
- Fix argument checks in gzlog_compress() and gzlog_write()
34+
- Clean up the usage of z_const and respect const usage within zlib
35+
- Clean up examples/gzlog.[ch] comparisons of different types
36+
- Avoid shift equal to bits in type (caused endless loop)
37+
- Fix unintialized value bug in gzputc() introduced by const patches
38+
- Fix memory allocation error in examples/zran.c [Nor]
39+
- Fix bug where gzopen(), gzclose() would write an empty file
40+
- Fix bug in gzclose() when gzwrite() runs out of memory
41+
- Check for input buffer malloc failure in examples/gzappend.c
42+
- Add note to contrib/blast to use binary mode in stdio
43+
- Fix comparisons of differently signed integers in contrib/blast
44+
- Check for invalid code length codes in contrib/puff
45+
- Fix serious but very rare decompression bug in inftrees.c
46+
- Update inflateBack() comments, since inflate() can be faster
47+
- Use underscored I/O function names for WINAPI_FAMILY
48+
- Add _tr_flush_bits to the external symbols prefixed by --zprefix
49+
- Add contrib/vstudio/vc10 pre-build step for static only
50+
- Quote --version-script argument in CMakeLists.txt
51+
- Don't specify --version-script on Apple platforms in CMakeLists.txt
52+
- Fix casting error in contrib/testzlib/testzlib.c
53+
- Fix types in contrib/minizip to match result of get_crc_table()
54+
- Simplify contrib/vstudio/vc10 with 'd' suffix
55+
- Add TOP support to win32/Makefile.msc
56+
- Suport i686 and amd64 assembler builds in CMakeLists.txt
57+
- Fix typos in the use of _LARGEFILE64_SOURCE in zconf.h
58+
- Add vc11 and vc12 build files to contrib/vstudio
59+
- Add gzvprintf() as an undocumented function in zlib
60+
- Fix configure for Sun shell
61+
- Remove runtime check in configure for four-byte integer type
62+
- Add casts and consts to ease user conversion to C++
63+
- Add man pages for minizip and miniunzip
64+
- In Makefile uninstall, don't rm if preceding cd fails
65+
- Do not return Z_BUF_ERROR if deflateParam() has nothing to write
66+
67+
Changes in 1.2.7 (2 May 2012)
68+
- Replace use of memmove() with a simple copy for portability
69+
- Test for existence of strerror
70+
- Restore gzgetc_ for backward compatibility with 1.2.6
71+
- Fix build with non-GNU make on Solaris
72+
- Require gcc 4.0 or later on Mac OS X to use the hidden attribute
73+
- Include unistd.h for Watcom C
74+
- Use __WATCOMC__ instead of __WATCOM__
75+
- Do not use the visibility attribute if NO_VIZ defined
76+
- Improve the detection of no hidden visibility attribute
77+
- Avoid using __int64 for gcc or solo compilation
78+
- Cast to char * in gzprintf to avoid warnings [Zinser]
79+
- Fix make_vms.com for VAX [Zinser]
80+
- Don't use library or built-in byte swaps
81+
- Simplify test and use of gcc hidden attribute
82+
- Fix bug in gzclose_w() when gzwrite() fails to allocate memory
83+
- Add "x" (O_EXCL) and "e" (O_CLOEXEC) modes support to gzopen()
84+
- Fix bug in test/minigzip.c for configure --solo
85+
- Fix contrib/vstudio project link errors [Mohanathas]
86+
- Add ability to choose the builder in make_vms.com [Schweda]
87+
- Add DESTDIR support to mingw32 win32/Makefile.gcc
88+
- Fix comments in win32/Makefile.gcc for proper usage
89+
- Allow overriding the default install locations for cmake
90+
- Generate and install the pkg-config file with cmake
91+
- Build both a static and a shared version of zlib with cmake
92+
- Include version symbols for cmake builds
93+
- If using cmake with MSVC, add the source directory to the includes
94+
- Remove unneeded EXTRA_CFLAGS from win32/Makefile.gcc [Truta]
95+
- Move obsolete emx makefile to old [Truta]
96+
- Allow the use of -Wundef when compiling or using zlib
97+
- Avoid the use of the -u option with mktemp
98+
- Improve inflate() documentation on the use of Z_FINISH
99+
- Recognize clang as gcc
100+
- Add gzopen_w() in Windows for wide character path names
101+
- Rename zconf.h in CMakeLists.txt to move it out of the way
102+
- Add source directory in CMakeLists.txt for building examples
103+
- Look in build directory for zlib.pc in CMakeLists.txt
104+
- Remove gzflags from zlibvc.def in vc9 and vc10
105+
- Fix contrib/minizip compilation in the MinGW environment
106+
- Update ./configure for Solaris, support --64 [Mooney]
107+
- Remove -R. from Solaris shared build (possible security issue)
108+
- Avoid race condition for parallel make (-j) running example
109+
- Fix type mismatch between get_crc_table() and crc_table
110+
- Fix parsing of version with "-" in CMakeLists.txt [Snider, Ziegler]
111+
- Fix the path to zlib.map in CMakeLists.txt
112+
- Force the native libtool in Mac OS X to avoid GNU libtool [Beebe]
113+
- Add instructions to win32/Makefile.gcc for shared install [Torri]
114+
115+
Changes in 1.2.6.1 (12 Feb 2012)
116+
- Avoid the use of the Objective-C reserved name "id"
117+
- Include io.h in gzguts.h for Microsoft compilers
118+
- Fix problem with ./configure --prefix and gzgetc macro
119+
- Include gz_header definition when compiling zlib solo
120+
- Put gzflags() functionality back in zutil.c
121+
- Avoid library header include in crc32.c for Z_SOLO
122+
- Use name in GCC_CLASSIC as C compiler for coverage testing, if set
123+
- Minor cleanup in contrib/minizip/zip.c [Vollant]
124+
- Update make_vms.com [Zinser]
125+
- Remove unnecessary gzgetc_ function
126+
- Use optimized byte swap operations for Microsoft and GNU [Snyder]
127+
- Fix minor typo in zlib.h comments [Rzesniowiecki]
128+
129+
Changes in 1.2.6 (29 Jan 2012)
130+
- Update the Pascal interface in contrib/pascal
131+
- Fix function numbers for gzgetc_ in zlibvc.def files
132+
- Fix configure.ac for contrib/minizip [Schiffer]
133+
- Fix large-entry detection in minizip on 64-bit systems [Schiffer]
134+
- Have ./configure use the compiler return code for error indication
135+
- Fix CMakeLists.txt for cross compilation [McClure]
136+
- Fix contrib/minizip/zip.c for 64-bit architectures [Dalsnes]
137+
- Fix compilation of contrib/minizip on FreeBSD [Marquez]
138+
- Correct suggested usages in win32/Makefile.msc [Shachar, Horvath]
139+
- Include io.h for Turbo C / Borland C on all platforms [Truta]
140+
- Make version explicit in contrib/minizip/configure.ac [Bosmans]
141+
- Avoid warning for no encryption in contrib/minizip/zip.c [Vollant]
142+
- Minor cleanup up contrib/minizip/unzip.c [Vollant]
143+
- Fix bug when compiling minizip with C++ [Vollant]
144+
- Protect for long name and extra fields in contrib/minizip [Vollant]
145+
- Avoid some warnings in contrib/minizip [Vollant]
146+
- Add -I../.. -L../.. to CFLAGS for minizip and miniunzip
147+
- Add missing libs to minizip linker command
148+
- Add support for VPATH builds in contrib/minizip
149+
- Add an --enable-demos option to contrib/minizip/configure
150+
- Add the generation of configure.log by ./configure
151+
- Exit when required parameters not provided to win32/Makefile.gcc
152+
- Have gzputc return the character written instead of the argument
153+
- Use the -m option on ldconfig for BSD systems [Tobias]
154+
- Correct in zlib.map when deflateResetKeep was added
155+
156+
Changes in 1.2.5.3 (15 Jan 2012)
157+
- Restore gzgetc function for binary compatibility
158+
- Do not use _lseeki64 under Borland C++ [Truta]
159+
- Update win32/Makefile.msc to build test/*.c [Truta]
160+
- Remove old/visualc6 given CMakefile and other alternatives
161+
- Update AS400 build files and documentation [Monnerat]
162+
- Update win32/Makefile.gcc to build test/*.c [Truta]
163+
- Permit stronger flushes after Z_BLOCK flushes
164+
- Avoid extraneous empty blocks when doing empty flushes
165+
- Permit Z_NULL arguments to deflatePending
166+
- Allow deflatePrime() to insert bits in the middle of a stream
167+
- Remove second empty static block for Z_PARTIAL_FLUSH
168+
- Write out all of the available bits when using Z_BLOCK
169+
- Insert the first two strings in the hash table after a flush
170+
171+
Changes in 1.2.5.2 (17 Dec 2011)
172+
- fix ld error: unable to find version dependency 'ZLIB_1.2.5'
173+
- use relative symlinks for shared libs
174+
- Avoid searching past window for Z_RLE strategy
175+
- Assure that high-water mark initialization is always applied in deflate
176+
- Add assertions to fill_window() in deflate.c to match comments
177+
- Update python link in README
178+
- Correct spelling error in gzread.c
179+
- Fix bug in gzgets() for a concatenated empty gzip stream
180+
- Correct error in comment for gz_make()
181+
- Change gzread() and related to ignore junk after gzip streams
182+
- Allow gzread() and related to continue after gzclearerr()
183+
- Allow gzrewind() and gzseek() after a premature end-of-file
184+
- Simplify gzseek() now that raw after gzip is ignored
185+
- Change gzgetc() to a macro for speed (~40% speedup in testing)
186+
- Fix gzclose() to return the actual error last encountered
187+
- Always add large file support for windows
188+
- Include zconf.h for windows large file support
189+
- Include zconf.h.cmakein for windows large file support
190+
- Update zconf.h.cmakein on make distclean
191+
- Merge vestigial vsnprintf determination from zutil.h to gzguts.h
192+
- Clarify how gzopen() appends in zlib.h comments
193+
- Correct documentation of gzdirect() since junk at end now ignored
194+
- Add a transparent write mode to gzopen() when 'T' is in the mode
195+
- Update python link in zlib man page
196+
- Get inffixed.h and MAKEFIXED result to match
197+
- Add a ./config --solo option to make zlib subset with no libary use
198+
- Add undocumented inflateResetKeep() function for CAB file decoding
199+
- Add --cover option to ./configure for gcc coverage testing
200+
- Add #define ZLIB_CONST option to use const in the z_stream interface
201+
- Add comment to gzdopen() in zlib.h to use dup() when using fileno()
202+
- Note behavior of uncompress() to provide as much data as it can
203+
- Add files in contrib/minizip to aid in building libminizip
204+
- Split off AR options in Makefile.in and configure
205+
- Change ON macro to Z_ARG to avoid application conflicts
206+
- Facilitate compilation with Borland C++ for pragmas and vsnprintf
207+
- Include io.h for Turbo C / Borland C++
208+
- Move example.c and minigzip.c to test/
209+
- Simplify incomplete code table filling in inflate_table()
210+
- Remove code from inflate.c and infback.c that is impossible to execute
211+
- Test the inflate code with full coverage
212+
- Allow deflateSetDictionary, inflateSetDictionary at any time (in raw)
213+
- Add deflateResetKeep and fix inflateResetKeep to retain dictionary
214+
- Fix gzwrite.c to accommodate reduced memory zlib compilation
215+
- Have inflate() with Z_FINISH avoid the allocation of a window
216+
- Do not set strm->adler when doing raw inflate
217+
- Fix gzeof() to behave just like feof() when read is not past end of file
218+
- Fix bug in gzread.c when end-of-file is reached
219+
- Avoid use of Z_BUF_ERROR in gz* functions except for premature EOF
220+
- Document gzread() capability to read concurrently written files
221+
- Remove hard-coding of resource compiler in CMakeLists.txt [Blammo]
222+
223+
Changes in 1.2.5.1 (10 Sep 2011)
224+
- Update FAQ entry on shared builds (#13)
225+
- Avoid symbolic argument to chmod in Makefile.in
226+
- Fix bug and add consts in contrib/puff [Oberhumer]
227+
- Update contrib/puff/zeros.raw test file to have all block types
228+
- Add full coverage test for puff in contrib/puff/Makefile
229+
- Fix static-only-build install in Makefile.in
230+
- Fix bug in unzGetCurrentFileInfo() in contrib/minizip [Kuno]
231+
- Add libz.a dependency to shared in Makefile.in for parallel builds
232+
- Spell out "number" (instead of "nb") in zlib.h for total_in, total_out
233+
- Replace $(...) with `...` in configure for non-bash sh [Bowler]
234+
- Add darwin* to Darwin* and solaris* to SunOS\ 5* in configure [Groffen]
235+
- Add solaris* to Linux* in configure to allow gcc use [Groffen]
236+
- Add *bsd* to Linux* case in configure [Bar-Lev]
237+
- Add inffast.obj to dependencies in win32/Makefile.msc
238+
- Correct spelling error in deflate.h [Kohler]
239+
- Change libzdll.a again to libz.dll.a (!) in win32/Makefile.gcc
240+
- Add test to configure for GNU C looking for gcc in output of $cc -v
241+
- Add zlib.pc generation to win32/Makefile.gcc [Weigelt]
242+
- Fix bug in zlib.h for _FILE_OFFSET_BITS set and _LARGEFILE64_SOURCE not
243+
- Add comment in zlib.h that adler32_combine with len2 < 0 makes no sense
244+
- Make NO_DIVIDE option in adler32.c much faster (thanks to John Reiser)
245+
- Make stronger test in zconf.h to include unistd.h for LFS
246+
- Apply Darwin patches for 64-bit file offsets to contrib/minizip [Slack]
247+
- Fix zlib.h LFS support when Z_PREFIX used
248+
- Add updated as400 support (removed from old) [Monnerat]
249+
- Avoid deflate sensitivity to volatile input data
250+
- Avoid division in adler32_combine for NO_DIVIDE
251+
- Clarify the use of Z_FINISH with deflateBound() amount of space
252+
- Set binary for output file in puff.c
253+
- Use u4 type for crc_table to avoid conversion warnings
254+
- Apply casts in zlib.h to avoid conversion warnings
255+
- Add OF to prototypes for adler32_combine_ and crc32_combine_ [Miller]
256+
- Improve inflateSync() documentation to note indeterminancy
257+
- Add deflatePending() function to return the amount of pending output
258+
- Correct the spelling of "specification" in FAQ [Randers-Pehrson]
259+
- Add a check in configure for stdarg.h, use for gzprintf()
260+
- Check that pointers fit in ints when gzprint() compiled old style
261+
- Add dummy name before $(SHAREDLIBV) in Makefile [Bar-Lev, Bowler]
262+
- Delete line in configure that adds -L. libz.a to LDFLAGS [Weigelt]
263+
- Add debug records in assmebler code [Londer]
264+
- Update RFC references to use http://tools.ietf.org/html/... [Li]
265+
- Add --archs option, use of libtool to configure for Mac OS X [Borstel]
266+
4267
Changes in 1.2.5 (19 Apr 2010)
5268
- Disable visibility attribute in win32/Makefile.gcc [Bar-Lev]
6269
- Default to libdir as sharedlibdir in configure [Nieder]
7270
- Update copyright dates on modified source files
8271
- Update trees.c to be able to generate modified trees.h
9272
- Exit configure for MinGW, suggesting win32/Makefile.gcc
273+
- Check for NULL path in gz_open [Homurlu]
10274

11275
Changes in 1.2.4.5 (18 Apr 2010)
12276
- Set sharedlibdir in configure [Torok]
@@ -261,7 +525,7 @@ Changes in 1.2.3.4 (21 Dec 2009)
261525
- Clear bytes after deflate lookahead to avoid use of uninitialized data
262526
- Change a limit in inftrees.c to be more transparent to Coverity Prevent
263527
- Update win32/zlib.def with exported symbols from zlib.h
264-
- Correct spelling error in zlib.h [Willem]
528+
- Correct spelling errors in zlib.h [Willem, Sobrado]
265529
- Allow Z_BLOCK for deflate() to force a new block
266530
- Allow negative bits in inflatePrime() to delete existing bit buffer
267531
- Add Z_TREES flush option to inflate() to return at end of trees

‎Modules/zlib/FAQ‎

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ The lastest zlib FAQ is at http://zlib.net/zlib_faq.html
4444

4545
6. Where's the zlib documentation (man pages, etc.)?
4646

47-
It's in zlib.h . Examples of zlib usage are in the files example.c and
48-
minigzip.c, with more in examples/ .
47+
It's in zlib.h . Examples of zlib usage are in the files test/example.c
48+
and test/minigzip.c, with more in examples/ .
4949

5050
7. Why don't you use GNU autoconf or libtool or ...?
5151

@@ -84,8 +84,10 @@ The lastest zlib FAQ is at http://zlib.net/zlib_faq.html
8484

8585
13. How can I make a Unix shared library?
8686

87-
make clean
88-
./configure -s
87+
By default a shared (and a static) library is built for Unix. So:
88+
89+
make distclean
90+
./configure
8991
make
9092

9193
14. How do I install a shared zlib library on Unix?
@@ -325,7 +327,7 @@ The lastest zlib FAQ is at http://zlib.net/zlib_faq.html
325327
correctly points to the zlib specification in RFC 1950 for the "deflate"
326328
transfer encoding, there have been reports of servers and browsers that
327329
incorrectly produce or expect raw deflate data per the deflate
328-
specficiation in RFC 1951, most notably Microsoft. So even though the
330+
specification in RFC 1951, most notably Microsoft. So even though the
329331
"deflate" transfer encoding using the zlib format would be the more
330332
efficient approach (and in fact exactly what the zlib format was designed
331333
for), using the "gzip" transfer encoding is probably more reliable due to

‎Modules/zlib/INDEX‎

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,21 @@ Makefile.in template for Unix Makefile
77
README guess what
88
configure configure script for Unix
99
make_vms.com makefile for VMS
10+
test/example.c zlib usages examples for build testing
11+
test/minigzip.c minimal gzip-like functionality for build testing
12+
test/infcover.c inf*.c code coverage for build coverage testing
1013
treebuild.xml XML description of source file dependencies
1114
zconf.h.cmakein zconf.h template for cmake
1215
zconf.h.in zconf.h template for configure
1316
zlib.3 Man page for zlib
1417
zlib.3.pdf Man page in PDF format
1518
zlib.map Linux symbol information
1619
zlib.pc.in Template for pkg-config descriptor
20+
zlib.pc.cmakein zlib.pc template for cmake
1721
zlib2ansi perl script to convert source files for C++ compilation
1822

1923
amiga/ makefiles for Amiga SAS C
24+
as400/ makefiles for AS/400
2025
doc/ documentation for formats and algorithms
2126
msdos/ makefiles for MSDOS
2227
nintendods/ makefile for Nintendo DS
@@ -56,10 +61,8 @@ uncompr.c
5661
zutil.c
5762
zutil.h
5863

59-
source files for sample programs:
60-
example.c
61-
minigzip.c
62-
See examples/README.examples for more
64+
source files for sample programs
65+
See examples/README.examples
6366

64-
unsupported contribution by third parties
67+
unsupported contributions by third parties
6568
See contrib/README.contrib

0 commit comments

Comments
 (0)