Skip to content
This repository has been archived by the owner on Mar 1, 2024. It is now read-only.

Commit

Permalink
zlib 1.2.3.9
Browse files Browse the repository at this point in the history
  • Loading branch information
madler committed Sep 10, 2011
1 parent e0ff940 commit 7751bd4
Show file tree
Hide file tree
Showing 102 changed files with 3,820 additions and 7,399 deletions.
18 changes: 16 additions & 2 deletions CMakeLists.txt
Expand Up @@ -50,7 +50,7 @@ endif()
#
# Check for unistd.h
#
check_include_file(unistd.h HAVE_UNISTD_H)
check_include_file(unistd.h Z_HAVE_UNISTD_H)

#
# Check for errno.h
Expand All @@ -65,6 +65,21 @@ if(MSVC)
add_definitions(-D_CRT_NONSTDC_NO_DEPRECATE)
endif()

if(NOT CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_CURRENT_BINARY_DIR)
# If we're doing an out of source build and the user has a zconf.h
# in their source tree...
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/zconf.h)
message(FATAL_ERROR "You must remove zconf.h from the source tree. This f
ile is generated by the ./configure script shipped with zlib. CMake generates t
his file for you automatically in the build directory")
endif()
endif()

configure_file(${CMAKE_CURRENT_SOURCE_DIR}/zconf.h.in
${CMAKE_CURRENT_SOURCE_DIR}/zconf.h @ONLY)
include_directories(${CMAKE_CURRENT_BINARY_DIR})


#============================================================================
# zlib
#============================================================================
Expand All @@ -90,7 +105,6 @@ set(ZLIB_SRCS
crc32.c
deflate.c
gzclose.c
gzio.c
gzlib.c
gzread.c
gzwrite.c
Expand Down
19 changes: 19 additions & 0 deletions ChangeLog
@@ -1,6 +1,25 @@

ChangeLog file for zlib

Changes in 1.2.3.9 (21 Feb 2010)
- Expunge gzio.c
- Move as400 build information to old
- Fix updates in contrib/minizip and contrib/vstudio
- Add const to vsnprintf test in configure to avoid warnings [Weigelt]
- Delete zconf.h (made by configure) [Weigelt]
- Change zconf.in.h to zconf.h.in per convention [Weigelt]
- Check for NULL buf in gzgets()
- Return empty string for gzgets() with len == 1 (like fgets())
- Fix description of gzgets() in zlib.h for end-of-file, NULL return
- Update minizip to 1.1 [Vollant]
- Avoid MSVC loss of data warnings in gzread.c, gzwrite.c
- Note in zlib.h that gzerror() should be used to distinguish from EOF
- Remove use of snprintf() from gzlib.c
- Fix bug in gzseek()
- Update contrib/vstudio, adding vc9 and vc10 [Kuno, Vollant]
- Fix zconf.h generation in CMakeLists.txt [Lowman]
- Improve comments in zconf.h where modified by configure

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
Expand Down
5 changes: 2 additions & 3 deletions INDEX
Expand Up @@ -7,7 +7,7 @@ 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
zconf.h.in zconf.h template for configure
zlib.3 Man page for zlib
zlib.map Linux symbol information
zlib.pc.in Template for pkg-config descriptor
Expand All @@ -28,7 +28,7 @@ watcom/ makefiles for OpenWatcom
win32/ makefiles for Windows

zlib public header files (required for library use):
zconf.h
zconf.h (made by configure)
zlib.h

private source files used to build the zlib library:
Expand All @@ -40,7 +40,6 @@ deflate.c
deflate.h
gzclose.c
gzguts.h
gzio.c
gzlib.c
gzread.c
gzwrite.c
Expand Down
14 changes: 7 additions & 7 deletions Makefile.in
Expand Up @@ -32,7 +32,7 @@ CPP=$(CC) -E

STATICLIB=libz.a
SHAREDLIB=libz.so
SHAREDLIBV=libz.so.1.2.3.8
SHAREDLIBV=libz.so.1.2.3.9
SHAREDLIBM=libz.so.1
LIBS=$(STATICLIB) $(SHAREDLIB) $(SHAREDLIBV)

Expand All @@ -50,10 +50,10 @@ mandir = ${prefix}/share/man
man3dir = ${mandir}/man3
pkgconfigdir = ${libdir}/pkgconfig

OBJC = adler32.o compress.o crc32.o deflate.o gzclose.o gzio.o gzlib.o gzread.o \
OBJC = adler32.o compress.o crc32.o deflate.o gzclose.o gzlib.o gzread.o \
gzwrite.o infback.o inffast.o inflate.o inftrees.o trees.o uncompr.o zutil.o

PIC_OBJC = adler32.lo compress.lo crc32.lo deflate.lo gzclose.lo gzio.lo gzlib.lo gzread.lo \
PIC_OBJC = adler32.lo compress.lo crc32.lo deflate.lo gzclose.lo gzlib.lo gzread.lo \
gzwrite.lo infback.lo inffast.lo inflate.lo inftrees.lo trees.lo uncompr.lo zutil.lo

# to use the asm code: make OBJA=match.o, PIC_OBJA=match.lo
Expand Down Expand Up @@ -204,8 +204,8 @@ clean:

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

Expand All @@ -217,7 +217,7 @@ depend:

# DO NOT DELETE THIS LINE -- make depend depends on it.

adler32.o gzio.o zutil.o: zutil.h zlib.h zconf.h
adler32.o zutil.o: zutil.h zlib.h zconf.h
gzclose.o gzlib.o gzread.o gzwrite.o: zlib.h zconf.h gzguts.h
compress.o example.o minigzip.o uncompr.o: zlib.h zconf.h
crc32.o: zutil.h zlib.h zconf.h crc32.h
Expand All @@ -227,7 +227,7 @@ 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
adler32.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
Expand Down
4 changes: 2 additions & 2 deletions README
@@ -1,6 +1,6 @@
ZLIB DATA COMPRESSION LIBRARY

zlib 1.2.3.8 is a general purpose data compression library. All the code is
zlib 1.2.3.9 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 <markn@ieee.org> 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.8 are documented in the file ChangeLog.
The changes made in version 1.2.3.9 are documented in the file ChangeLog.

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

Expand Down
3 changes: 1 addition & 2 deletions amiga/Makefile.pup
Expand Up @@ -14,7 +14,7 @@ LDFLAGS = -o
LDLIBS = LIB:scppc.a LIB:end.o
RM = delete quiet

OBJS = adler32.o compress.o crc32.o gzclose.o gzio.o gzlib.o gzread.o gzwrite.o \
OBJS = adler32.o compress.o crc32.o gzclose.o gzlib.o gzread.o gzwrite.o \
uncompr.o deflate.o trees.o zutil.o inflate.o infback.o inftrees.o inffast.o

TEST_OBJS = example.o minigzip.o
Expand Down Expand Up @@ -56,7 +56,6 @@ crc32.o: crc32.h zlib.h zconf.h
deflate.o: deflate.h zutil.h zlib.h zconf.h
example.o: zlib.h zconf.h
gzclose.o: zlib.h zconf.h gzguts.h
gzio.o: zutil.h zlib.h zconf.h
gzlib.o: zlib.h zconf.h gzguts.h
gzread.o: zlib.h zconf.h gzguts.h
gzwrite.o: zlib.h zconf.h gzguts.h
Expand Down
3 changes: 1 addition & 2 deletions amiga/Makefile.sas
Expand Up @@ -13,7 +13,7 @@ SCOPTIONS=OPTSCHED OPTINLINE OPTALIAS OPTTIME OPTINLOCAL STRMERGE \
NOICONS PARMS=BOTH NOSTACKCHECK UTILLIB NOVERSION ERRORREXX \
DEF=POSTINC

OBJS = adler32.o compress.o crc32.o gzclose.o gzio.o gzlib.o gzread.o gzwrite.o \
OBJS = adler32.o compress.o crc32.o gzclose.o gzlib.o gzread.o gzwrite.o \
uncompr.o deflate.o trees.o zutil.o inflate.o infback.o inftrees.o inffast.o

TEST_OBJS = example.o minigzip.o
Expand Down Expand Up @@ -55,7 +55,6 @@ crc32.o: crc32.h zlib.h zconf.h
deflate.o: deflate.h zutil.h zlib.h zconf.h
example.o: zlib.h zconf.h
gzclose.o: zlib.h zconf.h gzguts.h
gzio.o: zutil.h zlib.h zconf.h
gzlib.o: zlib.h zconf.h gzguts.h
gzread.o: zlib.h zconf.h gzguts.h
gzwrite.o: zlib.h zconf.h gzguts.h
Expand Down
8 changes: 4 additions & 4 deletions configure
Expand Up @@ -250,22 +250,22 @@ EOF
fi
fi

cp -p zconf.in.h zconf.h
sed "/^#cmakedefine/D" < zconf.h.in > zconf.h

cat > $test.c <<EOF
#include <unistd.h>
int main() { return 0; }
EOF
if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then
sed < zconf.h "/#ifdef HAVE_UNISTD_H/s/def HAVE_UNISTD_H/ 1/" > zconf.temp.h
sed < zconf.h "/^#ifdef HAVE_UNISTD_H.* may be/s/def HAVE_UNISTD_H\(.*\) may be/ 1\1 was/" > zconf.temp.h
mv zconf.temp.h zconf.h
echo "Checking for unistd.h... Yes."
else
echo "Checking for unistd.h... No."
fi

if test $zprefix -eq 1; then
sed < zconf.h "/#ifdef Z_PREFIX/s/def Z_PREFIX/ 1/" > zconf.temp.h
sed < zconf.h "/#ifdef Z_PREFIX.* may be/s/def Z_PREFIX\(.*\) may be/ 1\1 was/" > zconf.temp.h
mv zconf.temp.h zconf.h
echo "Using z_ prefix on all symbols."
fi
Expand Down Expand Up @@ -316,7 +316,7 @@ EOF
#include <stdio.h>
#include <stdarg.h>
int mytest(char *fmt, ...)
int mytest(const char *fmt, ...)
{
int n;
char buf[20];
Expand Down

0 comments on commit 7751bd4

Please sign in to comment.