Skip to content

Commit ea40a1e

Browse files
authored
Merge pull request #2 from tgauth/update-1.2.13
update to v1.2.13
2 parents 731e421 + 86961d4 commit ea40a1e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

116 files changed

+12786
-2596
lines changed

CMakeLists.txt

Lines changed: 3 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,7 @@ set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS ON)
33

44
project(zlib C)
55

6-
set(VERSION "1.2.11")
7-
8-
option(ASM686 "Enable building i686 assembly implementation")
9-
option(AMD64 "Enable building amd64 assembly implementation")
6+
set(VERSION "1.2.13")
107

118
set(INSTALL_BIN_DIR "${CMAKE_INSTALL_PREFIX}/bin" CACHE PATH "Installation directory for executables")
129
set(INSTALL_LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib" CACHE PATH "Installation directory for libraries")
@@ -129,39 +126,6 @@ if(NOT MINGW)
129126
)
130127
endif()
131128

132-
if(CMAKE_COMPILER_IS_GNUCC)
133-
if(ASM686)
134-
set(ZLIB_ASMS contrib/asm686/match.S)
135-
elseif (AMD64)
136-
set(ZLIB_ASMS contrib/amd64/amd64-match.S)
137-
endif ()
138-
139-
if(ZLIB_ASMS)
140-
add_definitions(-DASMV)
141-
set_source_files_properties(${ZLIB_ASMS} PROPERTIES LANGUAGE C COMPILE_FLAGS -DNO_UNDERLINE)
142-
endif()
143-
endif()
144-
145-
if(MSVC)
146-
if(ASM686)
147-
ENABLE_LANGUAGE(ASM_MASM)
148-
set(ZLIB_ASMS
149-
contrib/masmx86/inffas32.asm
150-
contrib/masmx86/match686.asm
151-
)
152-
elseif (AMD64)
153-
ENABLE_LANGUAGE(ASM_MASM)
154-
set(ZLIB_ASMS
155-
contrib/masmx64/gvmat64.asm
156-
contrib/masmx64/inffasx64.asm
157-
)
158-
endif()
159-
160-
if(ZLIB_ASMS)
161-
add_definitions(-DASMV -DASMINF)
162-
endif()
163-
endif()
164-
165129
# parse the full version number from zlib.h and include in ZLIB_FULL_VERSION
166130
file(READ ${CMAKE_CURRENT_SOURCE_DIR}/zlib.h _zlib_h_contents)
167131
string(REGEX REPLACE ".*#define[ \t]+ZLIB_VERSION[ \t]+\"([-0-9A-Za-z.]+)\".*"
@@ -183,8 +147,8 @@ if(MINGW)
183147
set(ZLIB_DLL_SRCS ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj)
184148
endif(MINGW)
185149

186-
add_library(zlib SHARED ${ZLIB_SRCS} ${ZLIB_ASMS} ${ZLIB_DLL_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS})
187-
add_library(zlibstatic STATIC ${ZLIB_SRCS} ${ZLIB_ASMS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS})
150+
add_library(zlib SHARED ${ZLIB_SRCS} ${ZLIB_DLL_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS})
151+
add_library(zlibstatic STATIC ${ZLIB_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS})
188152
set_target_properties(zlib PROPERTIES DEFINE_SYMBOL ZLIB_DLL)
189153
set_target_properties(zlib PROPERTIES SOVERSION 1)
190154

ChangeLog

Lines changed: 130 additions & 55 deletions
Large diffs are not rendered by default.

LICENSE

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
Copyright notice:
2+
3+
(C) 1995-2022 Jean-loup Gailly and Mark Adler
4+
5+
This software is provided 'as-is', without any express or implied
6+
warranty. In no event will the authors be held liable for any damages
7+
arising from the use of this software.
8+
9+
Permission is granted to anyone to use this software for any purpose,
10+
including commercial applications, and to alter it and redistribute it
11+
freely, subject to the following restrictions:
12+
13+
1. The origin of this software must not be misrepresented; you must not
14+
claim that you wrote the original software. If you use this software
15+
in a product, an acknowledgment in the product documentation would be
16+
appreciated but is not required.
17+
2. Altered source versions must be plainly marked as such, and must not be
18+
misrepresented as being the original software.
19+
3. This notice may not be removed or altered from any source distribution.
20+
21+
Jean-loup Gailly Mark Adler
22+

Makefile.in

Lines changed: 15 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,6 @@
77
# Normally configure builds both a static and a shared library.
88
# If you want to build just a static library, use: ./configure --static
99

10-
# To use the asm code, type:
11-
# cp contrib/asm?86/match.S ./match.S
12-
# make LOC=-DASMV OBJA=match.o
13-
1410
# To install /usr/local/lib/libz.* and /usr/local/include/zlib.h, type:
1511
# make install
1612
# To install in $HOME instead of /usr/local, use:
@@ -26,13 +22,13 @@ CFLAGS=-O
2622

2723
SFLAGS=-O
2824
LDFLAGS=
29-
TEST_LDFLAGS=-L. libz.a
25+
TEST_LDFLAGS=$(LDFLAGS) -L. libz.a
3026
LDSHARED=$(CC)
3127
CPP=$(CC) -E
3228

3329
STATICLIB=libz.a
3430
SHAREDLIB=libz.so
35-
SHAREDLIBV=libz.so.1.2.11
31+
SHAREDLIBV=libz.so.1.2.13
3632
SHAREDLIBM=libz.so.1
3733
LIBS=$(STATICLIB) $(SHAREDLIBV)
3834

@@ -87,34 +83,34 @@ test: all teststatic testshared
8783

8884
teststatic: static
8985
@TMPST=tmpst_$$; \
90-
if echo hello world | ./minigzip | ./minigzip -d && ./example $$TMPST ; then \
86+
if echo hello world | ${QEMU_RUN} ./minigzip | ${QEMU_RUN} ./minigzip -d && ${QEMU_RUN} ./example $$TMPST ; then \
9187
echo ' *** zlib test OK ***'; \
9288
else \
9389
echo ' *** zlib test FAILED ***'; false; \
94-
fi; \
95-
rm -f $$TMPST
90+
fi
91+
@rm -f tmpst_$$
9692

9793
testshared: shared
9894
@LD_LIBRARY_PATH=`pwd`:$(LD_LIBRARY_PATH) ; export LD_LIBRARY_PATH; \
9995
LD_LIBRARYN32_PATH=`pwd`:$(LD_LIBRARYN32_PATH) ; export LD_LIBRARYN32_PATH; \
10096
DYLD_LIBRARY_PATH=`pwd`:$(DYLD_LIBRARY_PATH) ; export DYLD_LIBRARY_PATH; \
10197
SHLIB_PATH=`pwd`:$(SHLIB_PATH) ; export SHLIB_PATH; \
10298
TMPSH=tmpsh_$$; \
103-
if echo hello world | ./minigzipsh | ./minigzipsh -d && ./examplesh $$TMPSH; then \
99+
if echo hello world | ${QEMU_RUN} ./minigzipsh | ${QEMU_RUN} ./minigzipsh -d && ${QEMU_RUN} ./examplesh $$TMPSH; then \
104100
echo ' *** zlib shared test OK ***'; \
105101
else \
106102
echo ' *** zlib shared test FAILED ***'; false; \
107-
fi; \
108-
rm -f $$TMPSH
103+
fi
104+
@rm -f tmpsh_$$
109105

110106
test64: all64
111107
@TMP64=tmp64_$$; \
112-
if echo hello world | ./minigzip64 | ./minigzip64 -d && ./example64 $$TMP64; then \
108+
if echo hello world | ${QEMU_RUN} ./minigzip64 | ${QEMU_RUN} ./minigzip64 -d && ${QEMU_RUN} ./example64 $$TMP64; then \
113109
echo ' *** zlib 64-bit test OK ***'; \
114110
else \
115111
echo ' *** zlib 64-bit test FAILED ***'; false; \
116-
fi; \
117-
rm -f $$TMP64
112+
fi
113+
@rm -f tmp64_$$
118114

119115
infcover.o: $(SRCDIR)test/infcover.c $(SRCDIR)zlib.h zconf.h
120116
$(CC) $(CFLAGS) $(ZINCOUT) -c -o $@ $(SRCDIR)test/infcover.c
@@ -124,7 +120,7 @@ infcover: infcover.o libz.a
124120

125121
cover: infcover
126122
rm -f *.gcda
127-
./infcover
123+
${QEMU_RUN} ./infcover
128124
gcov inf*.c
129125

130126
libz.a: $(OBJS)
@@ -292,10 +288,10 @@ minigzip$(EXE): minigzip.o $(STATICLIB)
292288
$(CC) $(CFLAGS) -o $@ minigzip.o $(TEST_LDFLAGS)
293289

294290
examplesh$(EXE): example.o $(SHAREDLIBV)
295-
$(CC) $(CFLAGS) -o $@ example.o -L. $(SHAREDLIBV)
291+
$(CC) $(CFLAGS) -o $@ example.o $(LDFLAGS) -L. $(SHAREDLIBV)
296292

297293
minigzipsh$(EXE): minigzip.o $(SHAREDLIBV)
298-
$(CC) $(CFLAGS) -o $@ minigzip.o -L. $(SHAREDLIBV)
294+
$(CC) $(CFLAGS) -o $@ minigzip.o $(LDFLAGS) -L. $(SHAREDLIBV)
299295

300296
example64$(EXE): example64.o $(STATICLIB)
301297
$(CC) $(CFLAGS) -o $@ example64.o $(TEST_LDFLAGS)
@@ -376,15 +372,13 @@ clean:
376372
rm -f contrib/infback9/*.gcda contrib/infback9/*.gcno contrib/infback9/*.gcov
377373

378374
maintainer-clean: distclean
379-
distclean: clean zconf zconf.h.cmakein docs
375+
distclean: clean zconf zconf.h.cmakein
380376
rm -f Makefile zlib.pc configure.log
381377
-@rm -f .DS_Store
382378
@if [ -f Makefile.in ]; then \
383379
printf 'all:\n\t-@echo "Please use ./configure first. Thank you."\n' > Makefile ; \
384380
printf '\ndistclean:\n\tmake -f Makefile.in distclean\n' >> Makefile ; \
385381
touch -r $(SRCDIR)Makefile.in Makefile ; fi
386-
@if [ ! -f zconf.h.in ]; then rm -f zconf.h zconf.h.cmakein ; fi
387-
@if [ ! -f zlib.3 ]; then rm -f zlib.3.pdf ; fi
388382

389383
tags:
390384
etags $(SRCDIR)*.[ch]

README

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
ZLIB DATA COMPRESSION LIBRARY
22

3-
zlib 1.2.11 is a general purpose data compression library. All the code is
3+
zlib 1.2.13 is a general purpose data compression library. All the code is
44
thread safe. The data format used by the zlib library is described by RFCs
55
(Request for Comments) 1950 to 1952 in the files
66
http://tools.ietf.org/html/rfc1950 (zlib format), rfc1951 (deflate format) and
@@ -31,7 +31,7 @@ Mark Nelson <[email protected]> wrote an article about zlib for the Jan. 1997
3131
issue of Dr. Dobb's Journal; a copy of the article is available at
3232
http://marknelson.us/1997/01/01/zlib-engine/ .
3333

34-
The changes made in version 1.2.11 are documented in the file ChangeLog.
34+
The changes made in version 1.2.13 are documented in the file ChangeLog.
3535

3636
Unsupported third party contributions are provided in directory contrib/ .
3737

@@ -84,7 +84,7 @@ Acknowledgments:
8484

8585
Copyright notice:
8686

87-
(C) 1995-2017 Jean-loup Gailly and Mark Adler
87+
(C) 1995-2022 Jean-loup Gailly and Mark Adler
8888

8989
This software is provided 'as-is', without any express or implied
9090
warranty. In no event will the authors be held liable for any damages
@@ -108,7 +108,10 @@ Copyright notice:
108108
If you use the zlib library in a product, we would appreciate *not* receiving
109109
lengthy legal documents to sign. The sources are provided for free but without
110110
warranty of any kind. The library has been entirely written by Jean-loup
111-
Gailly and Mark Adler; it does not include third-party code.
111+
Gailly and Mark Adler; it does not include third-party code. We make all
112+
contributions to and distributions of this project solely in our personal
113+
capacity, and are not conveying any rights to any intellectual property of
114+
any third parties.
112115

113116
If you redistribute modified sources, we would appreciate that you include in
114117
the file ChangeLog history information documenting your changes. Please read

compress.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
memory, Z_BUF_ERROR if there was not enough room in the output buffer,
2020
Z_STREAM_ERROR if the level parameter is invalid.
2121
*/
22-
int ZEXPORT compress2 (dest, destLen, source, sourceLen, level)
22+
int ZEXPORT compress2(dest, destLen, source, sourceLen, level)
2323
Bytef *dest;
2424
uLongf *destLen;
2525
const Bytef *source;
@@ -65,7 +65,7 @@ int ZEXPORT compress2 (dest, destLen, source, sourceLen, level)
6565

6666
/* ===========================================================================
6767
*/
68-
int ZEXPORT compress (dest, destLen, source, sourceLen)
68+
int ZEXPORT compress(dest, destLen, source, sourceLen)
6969
Bytef *dest;
7070
uLongf *destLen;
7171
const Bytef *source;
@@ -78,7 +78,7 @@ int ZEXPORT compress (dest, destLen, source, sourceLen)
7878
If the default memLevel or windowBits for deflateInit() is changed, then
7979
this function needs to be updated.
8080
*/
81-
uLong ZEXPORT compressBound (sourceLen)
81+
uLong ZEXPORT compressBound(sourceLen)
8282
uLong sourceLen;
8383
{
8484
return sourceLen + (sourceLen >> 12) + (sourceLen >> 14) +

0 commit comments

Comments
 (0)