Skip to content

Commit

Permalink
zlib 1.2.3.8
Browse files Browse the repository at this point in the history
  • Loading branch information
madler committed Sep 10, 2011
1 parent 7df877e commit e0ff940
Show file tree
Hide file tree
Showing 87 changed files with 4,936 additions and 1,455 deletions.
17 changes: 16 additions & 1 deletion ChangeLog
Original file line number Diff line number Diff line change
@@ -1,6 +1,21 @@

ChangeLog file for zlib

Changes in 1.2.3.8 (13 Feb 2010)
- Clean up text files (tabs, trailing whitespace, etc.) [Oberhumer]
- Use z_off64_t in gz_zero() and gz_skip() to match state->skip
- Avoid comparison problem when sizeof(int) == sizeof(z_off64_t)
- Revert to Makefile.in from 1.2.3.6 (live with the clutter)
- Fix missing error return in gzflush(), add zlib.h note
- Add *64 functions to zlib.map [Levin]
- Fix signed/unsigned comparison in gz_comp()
- Use SFLAGS when testing shared linking in configure
- Add --64 option to ./configure to use -m64 with gcc
- Fix ./configure --help to correctly name options
- Have make fail if a test fails [Levin]
- Avoid buffer overrun in contrib/masmx64/gvmat64.asm [Simpson]
- Remove assembler object files from contrib

Changes in 1.2.3.7 (24 Jan 2010)
- Always gzopen() with O_LARGEFILE if available
- Fix gzdirect() to work immediately after gzopen() or gzdopen()
Expand Down Expand Up @@ -191,7 +206,7 @@ Changes in 1.2.3.1 (16 August 2006)
- Synchronize FAQ with website
- Fix compressBound(), was low for some pathological cases [Fearnley]
- Take into account wrapper variations in deflateBound()
- Set examples/zpipe.c input and output to binary mode for Windows
- Set examples/zpipe.c input and output to binary mode for Windows
- Update examples/zlib_how.html with new zpipe.c (also web site)
- Fix some warnings in examples/gzlog.c and examples/zran.c (it seems
that gcc became pickier in 4.0)
Expand Down
24 changes: 12 additions & 12 deletions INDEX
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,26 @@ INDEX this file
Makefile.in template for Unix Makefile
README guess what
configure configure script for Unix
make_vms.com makefile for VMS
treebuild.xml XML description of source file dependencies
zconf.in.h zconf.h template for configure
zlib.3 Man page for zlib
zlib.map Linux symbol information
zlib.pc.in Template for pkg-config descriptor
zlib2ansi perl script to convert source files for C++ compilation
make_vms.com makefile for VMS
treebuild.xml XML description of source file dependencies
zconf.in.h zconf.h template for configure
zlib.3 Man page for zlib
zlib.map Linux symbol information
zlib.pc.in Template for pkg-config descriptor
zlib2ansi perl script to convert source files for C++ compilation

amiga/ makefiles for Amiga SAS C
as400/ makefiles for IBM AS/400
doc/ documentation for formats and algorithms
doc/ documentation for formats and algorithms
msdos/ makefiles for MSDOS
nintendods/ makefile for Nintendo DS
objs/ destination for object files
nintendods/ makefile for Nintendo DS
objs/ destination for object files
old/ makefiles for various architectures and zlib documentation
files that have not yet been updated for zlib 1.2.x
pics/ destination for position-independent-code object files
pics/ destination for position-independent-code object files
projects/ projects for various Integrated Development Environments
qnx/ makefiles for QNX
watcom/ makefiles for OpenWatcom
watcom/ makefiles for OpenWatcom
win32/ makefiles for Windows

zlib public header files (required for library use):
Expand Down
96 changes: 53 additions & 43 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.3.7
SHAREDLIBV=libz.so.1.2.3.8
SHAREDLIBM=libz.so.1
LIBS=$(STATICLIB) $(SHAREDLIB) $(SHAREDLIBV)

Expand All @@ -53,15 +53,16 @@ pkgconfigdir = ${libdir}/pkgconfig
OBJC = adler32.o compress.o crc32.o deflate.o gzclose.o gzio.o gzlib.o gzread.o \
gzwrite.o infback.o inffast.o inflate.o inftrees.o trees.o uncompr.o zutil.o

# to use the asm code: make OBJA=match.o
OBJA =
PIC_OBJC = adler32.lo compress.lo crc32.lo deflate.lo gzclose.lo gzio.lo gzlib.lo gzread.lo \
gzwrite.lo infback.lo inffast.lo inflate.lo inftrees.lo trees.lo uncompr.lo zutil.lo

objdir = objs/
picdir = pics/
# to use the asm code: make OBJA=match.o, PIC_OBJA=match.lo
OBJA =
PIC_OBJA =

OBJS = $(addprefix $(objdir), $(OBJC) $(OBJA))
OBJS = $(OBJC) $(OBJA)

PIC_OBJS = $(addprefix $(picdir), $(OBJC) $(OBJA))
PIC_OBJS = $(PIC_OBJC) $(PIC_OBJA)

all: static shared

Expand All @@ -76,12 +77,10 @@ check: test
test: all teststatic testshared

teststatic: static
@echo hello world | ./minigzip | ./minigzip -d || \
echo ' *** minigzip test FAILED ***' ; \
if ./example; then \
@if echo hello world | ./minigzip | ./minigzip -d && ./example; then \
echo ' *** zlib test OK ***'; \
else \
echo ' *** zlib test FAILED ***'; \
echo ' *** zlib test FAILED ***'; false; \
fi
-@rm -f foo.gz

Expand All @@ -90,74 +89,74 @@ testshared: shared
LD_LIBRARYN32_PATH=`pwd`:$(LD_LIBRARYN32_PATH) ; export LD_LIBRARYN32_PATH; \
DYLD_LIBRARY_PATH=`pwd`:$(DYLD_LIBRARY_PATH) ; export DYLD_LIBRARY_PATH; \
SHLIB_PATH=`pwd`:$(SHLIB_PATH) ; export SHLIB_PATH; \
echo hello world | ./minigzipsh | ./minigzipsh -d || \
echo ' *** minigzip shared test FAILED ***' ; \
if ./examplesh; then \
if echo hello world | ./minigzipsh | ./minigzipsh -d && ./examplesh; then \
echo ' *** zlib shared test OK ***'; \
else \
echo ' *** zlib shared test FAILED ***'; \
echo ' *** zlib shared test FAILED ***'; false; \
fi
-@rm -f foo.gz

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

libz.a: $(OBJS)
$(AR) $@ $(OBJS)
-@ ($(RANLIB) $@ || true) >/dev/null 2>&1

objs/match.o: match.S
match.o: match.S
$(CPP) match.S > _match.s
$(CC) -c -o $@ _match.s
$(CC) -c _match.s
mv _match.o match.o
rm -f _match.s

pics/match.o: match.S
match.lo: match.S
$(CPP) match.S > _match.s
$(CC) -c -o $@ -fPIC _match.s
$(CC) -c -fPIC _match.s
mv _match.o match.lo
rm -f _match.s

objs/example64.o: example.c zlib.h zconf.h
example64.o: example.c zlib.h zconf.h
$(CC) $(CFLAGS) -D_FILE_OFFSET_BITS=64 -c -o $@ example.c

objs/minigzip64.o: minigzip.c zlib.h zconf.h
minigzip64.o: minigzip.c zlib.h zconf.h
$(CC) $(CFLAGS) -D_FILE_OFFSET_BITS=64 -c -o $@ minigzip.c

$(objdir)%.o: %.c
$(CC) $(CFLAGS) -c -o $@ $<
.SUFFIXES: .lo

$(picdir)%.o: %.c
$(CC) $(SFLAGS) -DPIC -c -o $@ $<
.c.lo:
-@if [ ! -d objs ]; then mkdir objs; fi
$(CC) $(SFLAGS) -DPIC -c -o objs/$*.o $<
-@mv objs/$*.o $@

$(SHAREDLIBV): $(PIC_OBJS)
$(LDSHARED) $(SFLAGS) -o $@ $(PIC_OBJS) -lc
rm -f $(SHAREDLIB) $(SHAREDLIBM)
ln -s $@ $(SHAREDLIB)
ln -s $@ $(SHAREDLIBM)
-@rmdir objs

example$(EXE): objs/example.o $(STATICLIB)
$(CC) $(CFLAGS) -o $@ objs/example.o $(LDFLAGS)
example$(EXE): example.o $(STATICLIB)
$(CC) $(CFLAGS) -o $@ example.o $(LDFLAGS)

minigzip$(EXE): objs/minigzip.o $(STATICLIB)
$(CC) $(CFLAGS) -o $@ objs/minigzip.o $(LDFLAGS)
minigzip$(EXE): minigzip.o $(STATICLIB)
$(CC) $(CFLAGS) -o $@ minigzip.o $(LDFLAGS)

examplesh$(EXE): objs/example.o $(SHAREDLIBV)
$(CC) $(CFLAGS) -o $@ objs/example.o -L. $(SHAREDLIBV)
examplesh$(EXE): example.o $(SHAREDLIBV)
$(CC) $(CFLAGS) -o $@ example.o -L. $(SHAREDLIBV)

minigzipsh$(EXE): objs/minigzip.o $(SHAREDLIBV)
$(CC) $(CFLAGS) -o $@ objs/minigzip.o -L. $(SHAREDLIBV)
minigzipsh$(EXE): minigzip.o $(SHAREDLIBV)
$(CC) $(CFLAGS) -o $@ minigzip.o -L. $(SHAREDLIBV)

example64$(EXE): objs/example64.o $(STATICLIB)
$(CC) $(CFLAGS) -o $@ objs/example64.o $(LDFLAGS)
example64$(EXE): example64.o $(STATICLIB)
$(CC) $(CFLAGS) -o $@ example64.o $(LDFLAGS)

minigzip64$(EXE): objs/minigzip64.o $(STATICLIB)
$(CC) $(CFLAGS) -o $@ objs/minigzip64.o $(LDFLAGS)
minigzip64$(EXE): minigzip64.o $(STATICLIB)
$(CC) $(CFLAGS) -o $@ minigzip64.o $(LDFLAGS)

install-libs: $(LIBS)
-@if [ ! -d $(DESTDIR)$(exec_prefix) ]; then mkdir -p $(DESTDIR)$(exec_prefix); fi
Expand Down Expand Up @@ -196,18 +195,19 @@ uninstall:

mostlyclean: clean
clean:
rm -f $(objdir)* $(picdir)* *~ \
rm -f *.o *.lo *~ \
example$(EXE) minigzip$(EXE) examplesh$(EXE) minigzipsh$(EXE) \
example64$(EXE) minigzip64$(EXE) \
libz.* foo.gz so_locations \
_match.s maketree contrib/infback9/*.o
rm -rf objs

maintainer-clean: distclean
distclean: clean
cp -p zconf.in.h zconf.h
rm -f zlib.pc .DS_Store
-@printf 'all:\n\t-@echo "Use ./configure first. Thank you."\n' > Makefile
-@ touch -r Makefile.in Makefile objs pics
-@touch -r Makefile.in Makefile

tags:
etags *.[ch]
Expand All @@ -226,3 +226,13 @@ infback.o inflate.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h inffi
inffast.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h
inftrees.o: zutil.h zlib.h zconf.h inftrees.h
trees.o: deflate.h zutil.h zlib.h zconf.h trees.h

adler32.lo gzio.lo zutil.lo: zutil.h zlib.h zconf.h
gzclose.lo gzlib.lo gzread.lo gzwrite.lo: zlib.h zconf.h gzguts.h
compress.lo example.lo minigzip.lo uncompr.lo: zlib.h zconf.h
crc32.lo: zutil.h zlib.h zconf.h crc32.h
deflate.lo: deflate.h zutil.h zlib.h zconf.h
infback.lo inflate.lo: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h inffixed.h
inffast.lo: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h
inftrees.lo: zutil.h zlib.h zconf.h inftrees.h
trees.lo: deflate.h zutil.h zlib.h zconf.h trees.h
4 changes: 2 additions & 2 deletions README
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ZLIB DATA COMPRESSION LIBRARY

zlib 1.2.3.7 is a general purpose data compression library. All the code is
zlib 1.2.3.8 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://www.ietf.org/rfc/rfc1950.txt (zlib format), rfc1951.txt (deflate format)
Expand Down Expand Up @@ -33,7 +33,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 in
http://dogma.net/markn/articles/zlibtool/zlibtool.htm

The changes made in version 1.2.3.7 are documented in the file ChangeLog.
The changes made in version 1.2.3.8 are documented in the file ChangeLog.

Unsupported third party contributions are provided in directory "contrib".

Expand Down
6 changes: 3 additions & 3 deletions as400/zlib.inc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
* ZLIB.INC - Interface to the general purpose compression library
*
* ILE RPG400 version by Patrick Monnerat, DATASPHERE.
* Version 1.2.3.7
* Version 1.2.3.8
*
*
* WARNING:
Expand All @@ -22,8 +22,8 @@
*
* Versioning information.
*
D ZLIB_VERSION C '1.2.3.7'
D ZLIB_VERNUM C X'1237'
D ZLIB_VERSION C '1.2.3.8'
D ZLIB_VERNUM C X'1238'
*
* Other equates.
*
Expand Down
16 changes: 11 additions & 5 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ mandir=${mandir-'${prefix}/share/man'}
shared_ext='.so'
shared=1
zprefix=0
build64=0
gcc=0
old_cc="$CC"
old_cflags="$CFLAGS"
Expand All @@ -39,8 +40,8 @@ do
case "$1" in
-h* | --help)
echo 'usage:'
echo ' configure [--shared] [--prefix=PREFIX] [--exec_prefix=EXPREFIX]'
echo ' [--libdir=LIBDIR] [--includedir=INCLUDEDIR] [--zprefix]'
echo ' configure [--zprefix] [--prefix=PREFIX] [--eprefix=EXPREFIX]'
echo ' [--static] [--64] [--libdir=LIBDIR] [--includedir=INCLUDEDIR]'
exit 0 ;;
-p*=* | --prefix=*) prefix=`echo $1 | sed 's/[-a-z_]*=//'`; shift ;;
-e*=* | --eprefix=*) exec_prefix=`echo $1 | sed 's/[-a-z_]*=//'`; shift ;;
Expand All @@ -54,6 +55,7 @@ case "$1" in
-s* | --shared | --enable-shared) shared=1; shift ;;
-t | --static) shared=0; shift ;;
-z* | --zprefix) zprefix=1; shift ;;
-6* | --64) build64=1; shift ;;
--sysconfdir=*) echo "ignored option: --sysconfdir"; shift ;;
--localstatedir=*) echo "ignored option: --localstatedir"; shift ;;
*) echo "unknown option: $1"; echo "$0 --help for help"; exit 1 ;;
Expand All @@ -78,6 +80,10 @@ if test "$gcc" -eq 1 && ($cc -c $cflags $test.c) 2>/dev/null; then
CC="$cc"
SFLAGS="${CFLAGS-"-O3"} -fPIC"
CFLAGS="${CFLAGS-"-O3"}"
if test $build64 -eq 1; then
CFLAGS="${CFLAGS} -m64"
SFLAGS="${SFLAGS} -m64"
fi
if test "${ZLIBGCCWARN}" = "YES"; then
CFLAGS="${CFLAGS} -Wall -Wextra -pedantic"
fi
Expand Down Expand Up @@ -191,16 +197,16 @@ if test $shared -eq 1; then
echo Checking for shared library support...
# we must test in two steps (cc then ld), required at least on SunOS 4.x
if test "`($CC -w -c $SFLAGS $test.c) 2>&1`" = "" &&
test "`($LDSHARED -o $test$shared_ext $test.o) 2>&1`" = ""; then
test "`($LDSHARED $SFLAGS -o $test$shared_ext $test.o) 2>&1`" = ""; then
echo Building shared library $SHAREDLIBV with $CC.
elif test -z "$old_cc" -a -z "$old_cflags"; then
echo No shared library support.
shared=0;
else
echo Tested $CC -w -c $SFLAGS $test.c
$CC -w -c $SFLAGS $test.c
echo Tested $LDSHARED -o $test$shared_ext $test.o
$LDSHARED -o $test$shared_ext $test.o
echo Tested $LDSHARED $SFLAGS -o $test$shared_ext $test.o
$LDSHARED $SFLAGS -o $test$shared_ext $test.o
echo 'No shared library support; try without defining CC and CFLAGS'
shared=0;
fi
Expand Down
Loading

0 comments on commit e0ff940

Please sign in to comment.