Skip to content

Commit

Permalink
Merge commit '21767c654d31d2dccdde4330529775c6c5fd5389'
Browse files Browse the repository at this point in the history
  • Loading branch information
Sibras committed Apr 2, 2022
2 parents 3190fad + 21767c6 commit dd62a8b
Show file tree
Hide file tree
Showing 86 changed files with 12,197 additions and 7,854 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS ON)

project(zlib C)

set(VERSION "1.2.11")
set(VERSION "1.2.12")

option(ASM686 "Enable building i686 assembly implementation")
option(AMD64 "Enable building amd64 assembly implementation")
Expand Down
161 changes: 112 additions & 49 deletions ChangeLog

Large diffs are not rendered by default.

18 changes: 8 additions & 10 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ CPP=$(CC) -E

STATICLIB=libz.a
SHAREDLIB=libz.so
SHAREDLIBV=libz.so.1.2.11
SHAREDLIBV=libz.so.1.2.12
SHAREDLIBM=libz.so.1
LIBS=$(STATICLIB) $(SHAREDLIBV)

Expand Down Expand Up @@ -91,8 +91,8 @@ teststatic: static
echo ' *** zlib test OK ***'; \
else \
echo ' *** zlib test FAILED ***'; false; \
fi; \
rm -f $$TMPST
fi
@rm -f tmpst_$$

testshared: shared
@LD_LIBRARY_PATH=`pwd`:$(LD_LIBRARY_PATH) ; export LD_LIBRARY_PATH; \
Expand All @@ -104,17 +104,17 @@ testshared: shared
echo ' *** zlib shared test OK ***'; \
else \
echo ' *** zlib shared test FAILED ***'; false; \
fi; \
rm -f $$TMPSH
fi
@rm -f tmpsh_$$

test64: all64
@TMP64=tmp64_$$; \
if echo hello world | ./minigzip64 | ./minigzip64 -d && ./example64 $$TMP64; then \
echo ' *** zlib 64-bit test OK ***'; \
else \
echo ' *** zlib 64-bit test FAILED ***'; false; \
fi; \
rm -f $$TMP64
fi
@rm -f tmp64_$$

infcover.o: $(SRCDIR)test/infcover.c $(SRCDIR)zlib.h zconf.h
$(CC) $(CFLAGS) $(ZINCOUT) -c -o $@ $(SRCDIR)test/infcover.c
Expand Down Expand Up @@ -376,15 +376,13 @@ clean:
rm -f contrib/infback9/*.gcda contrib/infback9/*.gcno contrib/infback9/*.gcov

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

tags:
etags $(SRCDIR)*.[ch]
Expand Down
11 changes: 7 additions & 4 deletions README
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ZLIB DATA COMPRESSION LIBRARY

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

The changes made in version 1.2.11 are documented in the file ChangeLog.
The changes made in version 1.2.12 are documented in the file ChangeLog.

Unsupported third party contributions are provided in directory contrib/ .

Expand Down Expand Up @@ -84,7 +84,7 @@ Acknowledgments:

Copyright notice:

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

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

If you redistribute modified sources, we would appreciate that you include in
the file ChangeLog history information documenting your changes. Please read
Expand Down
48 changes: 27 additions & 21 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ build64=0
gcc=0
warn=0
debug=0
sanitize=0
old_cc="$CC"
old_cflags="$CFLAGS"
OBJC='$(OBJZ) $(OBJG)'
Expand Down Expand Up @@ -137,6 +138,7 @@ case "$1" in
-c* | --const) zconst=1; shift ;;
-w* | --warn) warn=1; shift ;;
-d* | --debug) debug=1; shift ;;
--sanitize) sanitize=1; shift ;;
*)
echo "unknown option: $1" | tee -a configure.log
echo "$0 --help for help" | tee -a configure.log
Expand Down Expand Up @@ -165,8 +167,14 @@ extern int getchar();
int hello() {return getchar();}
EOF

test -z "$CC" && echo Checking for ${CROSS_PREFIX}gcc... | tee -a configure.log
cc=${CC-${CROSS_PREFIX}gcc}
if test -z "$CC"; then
echo Checking for ${CROSS_PREFIX}gcc... | tee -a configure.log
if ${CROSS_PREFIX}gcc -v >/dev/null 2>&1; then
cc=${CROSS_PREFIX}gcc
else
cc=${CROSS_PREFIX}cc
fi
fi
cflags=${CFLAGS-"-O3"}
# to force the asm version use: CFLAGS="-O3 -DASMV" ./configure
case "$cc" in
Expand Down Expand Up @@ -199,6 +207,9 @@ if test "$gcc" -eq 1 && ($cc -c $test.c) >> configure.log 2>&1; then
CFLAGS="${CFLAGS} -Wall -Wextra -pedantic"
fi
fi
if test $sanitize -eq 1; then
CFLAGS="${CFLAGS} -fsanitize=address"
fi
if test $debug -eq 1; then
CFLAGS="${CFLAGS} -DZLIB_DEBUG"
SFLAGS="${SFLAGS} -DZLIB_DEBUG"
Expand Down Expand Up @@ -367,8 +378,11 @@ else
try()
{
show $*
( $* ) >> configure.log 2>&1
got=`( $* ) 2>&1`
ret=$?
if test "$got" != ""; then
printf "%s\n" "$got" >> configure.log
fi
if test $ret -ne 0; then
echo "(exit code "$ret")" >> configure.log
fi
Expand All @@ -381,8 +395,11 @@ tryboth()
show $*
got=`( $* ) 2>&1`
ret=$?
printf %s "$got" >> configure.log
if test "$got" != ""; then
printf "%s\n" "$got" >> configure.log
fi
if test $ret -ne 0; then
echo "(exit code "$ret")" >> configure.log
return $ret
fi
test "$got" = ""
Expand Down Expand Up @@ -457,17 +474,11 @@ size_t dummy = 0;
EOF
if try $CC -c $CFLAGS $test.c; then
echo "Checking for size_t... Yes." | tee -a configure.log
need_sizet=0
else
echo "Checking for size_t... No." | tee -a configure.log
need_sizet=1
fi

echo >> configure.log

# find the size_t integer type, if needed
if test $need_sizet -eq 1; then
cat > $test.c <<EOF
# find a size_t integer type
# check for long long
cat > $test.c << EOF
long long dummy = 0;
EOF
if try $CC -c $CFLAGS $test.c; then
Expand Down Expand Up @@ -495,17 +506,13 @@ EOF
if try $CC $CFLAGS -o $test $test.c; then
sizet=`./$test`
echo "Checking for a pointer-size integer type..." $sizet"." | tee -a configure.log
CFLAGS="${CFLAGS} -DNO_SIZE_T=${sizet}"
SFLAGS="${SFLAGS} -DNO_SIZE_T=${sizet}"
else
echo "Failed to find a pointer-size integer type." | tee -a configure.log
leave 1
echo "Checking for a pointer-size integer type... not found." | tee -a configure.log
fi
fi

if test $need_sizet -eq 1; then
CFLAGS="${CFLAGS} -DNO_SIZE_T=${sizet}"
SFLAGS="${SFLAGS} -DNO_SIZE_T=${sizet}"
fi

echo >> configure.log

# check for large file support, and if none, check for fseeko()
Expand Down Expand Up @@ -849,7 +856,6 @@ echo SHAREDLIBV = $SHAREDLIBV >> configure.log
echo STATICLIB = $STATICLIB >> configure.log
echo TEST = $TEST >> configure.log
echo VER = $VER >> configure.log
echo Z_U4 = $Z_U4 >> configure.log
echo SRCDIR = $SRCDIR >> configure.log
echo exec_prefix = $exec_prefix >> configure.log
echo includedir = $includedir >> configure.log
Expand Down
21 changes: 0 additions & 21 deletions contrib/README.contrib
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,6 @@ ada/ by Dmitriy Anisimkov <[email protected]>
Support for Ada
See http://zlib-ada.sourceforge.net/

amd64/ by Mikhail Teterin <[email protected]>
asm code for AMD64
See patch at http://www.freebsd.org/cgi/query-pr.cgi?pr=bin/96393

asm686/ by Brian Raiter <[email protected]>
asm code for Pentium and PPro/PII, using the AT&T (GNU as) syntax
See http://www.muppetlabs.com/~breadbox/software/assembly.html

blast/ by Mark Adler <[email protected]>
Decompressor for output of PKWare Data Compression Library (DCL)

Expand All @@ -32,9 +24,6 @@ gcc_gvmat64/by Gilles Vollant <[email protected]>
infback9/ by Mark Adler <[email protected]>
Unsupported diffs to infback to decode the deflate64 format

inflate86/ by Chris Anderson <[email protected]>
Tuned x86 gcc asm code to replace inflate_fast()

iostream/ by Kevin Ruland <[email protected]>
A C++ I/O streams interface to the zlib gz* functions

Expand All @@ -45,16 +34,6 @@ iostream3/ by Ludwig Schwardt <[email protected]>
and Kevin Ruland <[email protected]>
Yet another C++ I/O streams interface

masmx64/ by Gilles Vollant <[email protected]>
x86 64-bit (AMD64 and Intel EM64t) code for x64 assembler to
replace longest_match() and inflate_fast(), also masm x86
64-bits translation of Chris Anderson inflate_fast()

masmx86/ by Gilles Vollant <[email protected]>
x86 asm code to replace longest_match() and inflate_fast(),
for Visual C++ and MASM (32 bits).
Based on Brian Raiter (asm686) and Chris Anderson (inflate86)

minizip/ by Gilles Vollant <[email protected]>
Mini zip and unzip based on zlib
Includes Zip64 support by Mathias Svensson <[email protected]>
Expand Down
Loading

0 comments on commit dd62a8b

Please sign in to comment.