Permalink
Browse files

zlib 1.2.4.1

  • Loading branch information...
1 parent a114116 commit 05d47d2627a68a15ba23fb10b17fbc73551aeec1 @madler committed Sep 10, 2011
View
@@ -20,7 +20,7 @@ check_include_file(stddef.h HAVE_STDDEF_H)
#
# Check to see if we have large file support
#
-set(CMAKE_REQUIRED_DEFINITIONS -D_LARGEFILE64_SOURCE)
+set(CMAKE_REQUIRED_DEFINITIONS -D_LARGEFILE64_SOURCE=1)
# We add these other definitions here because CheckTypeSize.cmake
# in CMake 2.4.x does not automatically do so and we want
# compatibility with CMake 2.4.x.
@@ -35,7 +35,7 @@ if(HAVE_STDDEF_H)
endif()
check_type_size(off64_t OFF64_T)
if(HAVE_OFF64_T)
- add_definitions(-D_LARGEFILE64_SOURCE)
+ add_definitions(-D_LARGEFILE64_SOURCE=1)
endif()
set(CMAKE_REQUIRED_DEFINITIONS) # clear variable
@@ -52,13 +52,6 @@ endif()
#
check_include_file(unistd.h Z_HAVE_UNISTD_H)
-#
-# Check for errno.h
-check_include_file(errno.h HAVE_ERRNO_H)
-if(NOT HAVE_ERRNO_H)
- add_definitions(-DNO_ERRNO_H)
-endif()
-
if(MSVC)
set(CMAKE_DEBUG_POSTFIX "d")
add_definitions(-D_CRT_SECURE_NO_DEPRECATE)
View
@@ -1,6 +1,30 @@
ChangeLog file for zlib
+Changes in 1.2.4.1 (28 Mar 2010)
+- Remove the use of [a-z] constructs for sed in configure [gentoo 310225]
+- Remove $(SHAREDLIB) from LIBS in Makefile.in [Creech]
+- Restore "for debugging" comment on sprintf() in gzlib.c
+- Remove fdopen for MVS from gzguts.h
+- Put new README-WIN32.txt in win32 [Rowe]
+- Add check for shell to configure and invoke another shell if needed
+- Fix big fat stinking bug in gzseek() on uncompressed files
+- Remove vestigial F_OPEN64 define in zutil.h
+- Set and check the value of _LARGEFILE_SOURCE and _LARGEFILE64_SOURCE
+- Avoid errors on non-LFS systems when applications define LFS macros
+- Set EXE to ".exe" in configure for MINGW [Kahle]
+- Match crc32() in crc32.c exactly to the prototype in zlib.h [Sherrill]
+- Add prefix for cross-compilation in win32/makefile.gcc [Bar-Lev]
+- Add DLL install in win32/makefile.gcc [Bar-Lev]
+- Allow Linux* or linux* from uname in configure [Bar-Lev]
+- Allow ldconfig to be redefined in configure and Makefile.in [Bar-Lev]
+- Add cross-compilation prefixes to configure [Bar-Lev]
+- Match type exactly in gz_load() invocation in gzread.c
+- Match type exactly of zcalloc() in zutil.c to zlib.h alloc_func
+- Provide prototypes for *64 functions when building zlib without LFS
+- Don't use -lc when linking shared library on MinGW
+- Remove errno.h check in configure and vestigial errno code in zutil.h
+
Changes in 1.2.4 (14 Mar 2010)
- Fix VER3 extraction in configure for no fourth subversion
- Update zlib.3, add docs to Makefile.in to make .pdf out of it
View
@@ -32,12 +32,14 @@ CPP=$(CC) -E
STATICLIB=libz.a
SHAREDLIB=libz.so
-SHAREDLIBV=libz.so.1.2.4
+SHAREDLIBV=libz.so.1.2.4.1
SHAREDLIBM=libz.so.1
-LIBS=$(STATICLIB) $(SHAREDLIB) $(SHAREDLIBV)
+LIBS=$(STATICLIB) $(SHAREDLIBV)
AR=ar rc
RANLIB=ranlib
+LDCONFIG=ldconfig
+LDSHAREDLIBC=-lc
TAR=tar
SHELL=/bin/sh
EXE=
@@ -134,7 +136,7 @@ minigzip64.o: minigzip.c zlib.h zconf.h
-@mv objs/$*.o $@
$(SHAREDLIBV): $(PIC_OBJS)
- $(LDSHARED) $(SFLAGS) -o $@ $(PIC_OBJS) -lc
+ $(LDSHARED) $(SFLAGS) -o $@ $(PIC_OBJS) $(LDSHAREDLIBC)
rm -f $(SHAREDLIB) $(SHAREDLIBM)
ln -s $@ $(SHAREDLIB)
ln -s $@ $(SHAREDLIBM)
@@ -171,7 +173,7 @@ install-libs: $(LIBS)
rm -f $(SHAREDLIB) $(SHAREDLIBM); \
ln -s $(SHAREDLIBV) $(SHAREDLIB); \
ln -s $(SHAREDLIBV) $(SHAREDLIBM); \
- (ldconfig || true) >/dev/null 2>&1; \
+ ($(LDCONFIG) || true) >/dev/null 2>&1; \
fi
cp zlib.3 $(DESTDIR)$(man3dir)
chmod 644 $(DESTDIR)$(man3dir)/zlib.3
View
4 README
@@ -1,6 +1,6 @@
ZLIB DATA COMPRESSION LIBRARY
-zlib 1.2.4 is a general purpose data compression library. All the code is
+zlib 1.2.4.1 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)
@@ -30,7 +30,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 at
http://marknelson.us/1997/01/01/zlib-engine/ .
-The changes made in version 1.2.4 are documented in the file ChangeLog.
+The changes made in version 1.2.4.1 are documented in the file ChangeLog.
Unsupported third party contributions are provided in directory contrib/ .
View
@@ -13,15 +13,40 @@
# If you have problems, try without defining CC and CFLAGS before reporting
# an error.
+# make sure we are running under a compatible shell (stolen from ffmpeg and libnfo)
+if test "0$ZLIB_CONFIGURE_EXEC" -lt 1; then
+ unset foo
+ (: ${foo%%bar}) 2>/dev/null && ! (: ${foo?}) 2>/dev/null
+ if test "$?" -ne 0; then
+ ZLIB_CONFIGURE_EXEC=1
+ export ZLIB_CONFIGURE_EXEC
+ type "bash" > /dev/null 2>&1 && exec bash "$0" "$@"
+ type "ksh" > /dev/null 2>&1 && exec ksh "$0" "$@"
+ if test -x /usr/xpg4/bin/sh; then
+ exec /usr/xpg4/bin/sh "$0" "$@"
+ fi
+# echo "No compatible shell script interpreter found."
+# exit 1
+# we could give up here, but go ahead and give their old sh a try
+ fi
+fi
+
+if [ -n "${CHOST}" ]; then
+ uname="$(echo "${CHOST}" | sed 's/.*-.*-\(.*\)-.*/\1/')"
+ CROSS_PREFIX="${CHOST}-"
+fi
+
STATICLIB=libz.a
LDFLAGS="${LDFLAGS} -L. ${STATICLIB}"
VER=`sed -n -e '/VERSION "/s/.*"\(.*\)".*/\1/p' < zlib.h`
VER3=`sed -n -e '/VERSION "/s/.*"\([0-9]*\\.[0-9]*\\.[0-9]*\).*/\1/p' < zlib.h`
VER2=`sed -n -e '/VERSION "/s/.*"\([0-9]*\\.[0-9]*\)\\..*/\1/p' < zlib.h`
VER1=`sed -n -e '/VERSION "/s/.*"\([0-9]*\)\\..*/\1/p' < zlib.h`
-AR=${AR-"ar"}
+AR=${AR-"${CROSS_PREFIX}ar"}
AR_RC="${AR} rc"
-RANLIB=${RANLIB-"ranlib"}
+RANLIB=${RANLIB-"${CROSS_PREFIX}ranlib"}
+LDCONFIG=${LDCONFIG-"ldconfig"}
+LDSHAREDLIBC="${LDSHAREDLIBC-"-lc"}"
prefix=${prefix-/usr/local}
exec_prefix=${exec_prefix-'${prefix}'}
libdir=${libdir-'${exec_prefix}/lib'}
@@ -43,11 +68,11 @@ case "$1" in
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 ;;
- -l*=* | --libdir=*) libdir=`echo $1 | sed 's/[-a-z_]*=//'`; shift ;;
- -i*=* | --includedir=*) includedir=`echo $1 | sed 's/[-a-z_]*=//'`;shift ;;
- -u*=* | --uname=*) uname=`echo $1 | sed 's/[-a-z_]*=//'`;shift ;;
+ -p*=* | --prefix=*) prefix=`echo $1 | sed 's/.*=//'`; shift ;;
+ -e*=* | --eprefix=*) exec_prefix=`echo $1 | sed 's/.*=//'`; shift ;;
+ -l*=* | --libdir=*) libdir=`echo $1 | sed 's/.*=//'`; shift ;;
+ -i*=* | --includedir=*) includedir=`echo $1 | sed 's/.*=//'`;shift ;;
+ -u*=* | --uname=*) uname=`echo $1 | sed 's/.*=//'`;shift ;;
-p* | --prefix) prefix="$2"; shift; shift ;;
-e* | --eprefix) exec_prefix="$2"; shift; shift ;;
-l* | --libdir) libdir="$2"; shift; shift ;;
@@ -69,7 +94,7 @@ int hello() {return getchar();}
EOF
test -z "$CC" && echo Checking for gcc...
-cc=${CC-gcc}
+cc=${CC-${CROSS_PREFIX}gcc}
cflags=${CFLAGS-"-O3"}
# to force the asm version use: CFLAGS="-O3 -DASMV" ./configure
case "$cc" in
@@ -91,9 +116,12 @@ if test "$gcc" -eq 1 && ($cc -c $cflags $test.c) 2>/dev/null; then
uname=`(uname -s || echo unknown) 2>/dev/null`
fi
case "$uname" in
- Linux | linux | GNU | GNU/* | *BSD | DragonFly) LDSHARED=${LDSHARED-"$cc -shared -Wl,-soname,libz.so.1,--version-script,zlib.map"} ;;
- CYGWIN* | Cygwin* | cygwin* | OS/2* )
- EXE='.exe' ;;
+ Linux* | linux* | GNU | GNU/* | *BSD | DragonFly) LDSHARED=${LDSHARED-"$cc -shared -Wl,-soname,libz.so.1,--version-script,zlib.map"} ;;
+ CYGWIN* | Cygwin* | cygwin* | OS/2*)
+ EXE='.exe' ;;
+ MINGW*)
+ LDSHAREDLIBC=""
+ EXE='.exe' ;;
QNX*) # This is for QNX6. I suppose that the QNX rule below is for QNX2,QNX4
# (alain.bonnefoy@icbt.com)
LDSHARED=${LDSHARED-"$cc -shared -Wl,-hlibz.so.1"} ;;
@@ -474,18 +502,6 @@ EOF
fi
fi
-cat >$test.c <<EOF
-#include <errno.h>
-int main() { return 0; }
-EOF
-if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then
- echo "Checking for errno.h... Yes."
-else
- echo "Checking for errno.h... No."
- CFLAGS="$CFLAGS -DNO_ERRNO_H"
- SFLAGS="$SFLAGS -DNO_ERRNO_H"
-fi
-
CPP=${CPP-"$CC -E"}
case $CFLAGS in
*ASMV*)
@@ -513,6 +529,8 @@ sed < Makefile.in "
/^SHAREDLIBM *=/s#=.*#=$SHAREDLIBM#
/^AR *=/s#=.*#=$AR_RC#
/^RANLIB *=/s#=.*#=$RANLIB#
+/^LDCONFIG *=/s#=.*#=$LDCONFIG#
+/^LDSHAREDLIBC *=/s#=.*#=$LDSHAREDLIBC#
/^EXE *=/s#=.*#=$EXE#
/^prefix *=/s#=.*#=$prefix#
/^exec_prefix *=/s#=.*#=$exec_prefix#
View
@@ -152,7 +152,7 @@ procedure DecompressToUserBuf(const InBuf: Pointer; InBytes: Integer;
const OutBuf: Pointer; BufSize: Integer);
const
- zlib_version = '1.2.4';
+ zlib_version = '1.2.4.1';
type
EZlibError = class(Exception);
@@ -156,7 +156,7 @@ public class InfoTests
public void Info_Version()
{
Info info = new Info();
- Assert.AreEqual("1.2.4", Info.Version);
+ Assert.AreEqual("1.2.4.1", Info.Version);
Assert.AreEqual(32, info.SizeOfUInt);
Assert.AreEqual(32, info.SizeOfULong);
Assert.AreEqual(32, info.SizeOfPointer);
@@ -9,7 +9,7 @@
#define MAXBITS 15
const char inflate9_copyright[] =
- " inflate9 1.2.4 Copyright 1995-2010 Mark Adler ";
+ " inflate9 1.2.4.1 Copyright 1995-2010 Mark Adler ";
/*
If you use the zlib library in a product, an acknowledgment is welcome
in the documentation of your product. If for some reason you cannot
@@ -64,7 +64,7 @@ unsigned short FAR *work;
static const unsigned short lext[31] = { /* Length codes 257..285 extra */
128, 128, 128, 128, 128, 128, 128, 128, 129, 129, 129, 129,
130, 130, 130, 130, 131, 131, 131, 131, 132, 132, 132, 132,
- 133, 133, 133, 133, 144, 64, 195};
+ 133, 133, 133, 133, 144, 67, 206};
static const unsigned short dbase[32] = { /* Distance codes 0..31 base */
1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49,
65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073,
@@ -10,7 +10,7 @@
interface
const
- ZLIB_VERSION = '1.2.4';
+ ZLIB_VERSION = '1.2.4.1';
type
alloc_func = function(opaque: Pointer; items, size: Integer): Pointer;
@@ -2,8 +2,8 @@
#define IDR_VERSION1 1
IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE
- FILEVERSION 1,2,4,0
- PRODUCTVERSION 1,2,4,0
+ FILEVERSION 1,2,4,1
+ PRODUCTVERSION 1,2,4,1
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
FILEFLAGS 0
FILEOS VOS_DOS_WINDOWS32
@@ -17,7 +17,7 @@ BEGIN
BEGIN
VALUE "FileDescription", "zlib data compression and ZIP file I/O library\0"
- VALUE "FileVersion", "1.2.4.0\0"
+ VALUE "FileVersion", "1.2.4.1\0"
VALUE "InternalName", "zlib\0"
VALUE "OriginalFilename", "zlib.dll\0"
VALUE "ProductName", "ZLib.DLL\0"
@@ -2,8 +2,8 @@
#define IDR_VERSION1 1
IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE
- FILEVERSION 1,2,4,0
- PRODUCTVERSION 1,2,4,0
+ FILEVERSION 1,2,4,1
+ PRODUCTVERSION 1,2,4,1
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
FILEFLAGS 0
FILEOS VOS_DOS_WINDOWS32
@@ -17,7 +17,7 @@ BEGIN
BEGIN
VALUE "FileDescription", "zlib data compression and ZIP file I/O library\0"
- VALUE "FileVersion", "1.2.4.0\0"
+ VALUE "FileVersion", "1.2.4.1\0"
VALUE "InternalName", "zlib\0"
VALUE "OriginalFilename", "zlib.dll\0"
VALUE "ProductName", "ZLib.DLL\0"
View
@@ -221,7 +221,7 @@ const unsigned long FAR * ZEXPORT get_crc_table()
unsigned long ZEXPORT crc32(crc, buf, len)
unsigned long crc;
const unsigned char FAR *buf;
- unsigned len;
+ uInt len;
{
if (buf == Z_NULL) return 0UL;
View
@@ -52,7 +52,7 @@
#include "deflate.h"
const char deflate_copyright[] =
- " deflate 1.2.4 Copyright 1995-2010 Jean-loup Gailly and Mark Adler ";
+ " deflate 1.2.4.1 Copyright 1995-2010 Jean-loup Gailly and Mark Adler ";
/*
If you use the zlib library in a product, an acknowledgment is welcome
in the documentation of your product. If for some reason you cannot
View
@@ -3,9 +3,9 @@
* For conditions of distribution and use, see copyright notice in zlib.h
*/
-#ifdef _LARGEFILE64_SOURCE
+#if _LARGEFILE64_SOURCE == 1
# ifndef _LARGEFILE_SOURCE
-# define _LARGEFILE_SOURCE
+# define _LARGEFILE_SOURCE 1
# endif
# ifdef _FILE_OFFSET_BITS
# undef _FILE_OFFSET_BITS
@@ -44,7 +44,7 @@
#endif
/* get errno and strerror definition */
-#if defined UNDER_CE && defined NO_ERRNO_H
+#if defined UNDER_CE
# include <windows.h>
# define zstrerror() gz_strwinerror((DWORD)GetLastError())
#else
@@ -56,13 +56,7 @@
# endif
#endif
-/* MVS fdopen() */
-#ifdef __MVS__
- #pragma map (fdopen , "\174\174FDOPEN")
- FILE *fdopen(int, const char *);
-#endif
-
-#ifdef _LARGEFILE64_SOURCE
+#if _LARGEFILE64_SOURCE == 1
# define z_off64_t off64_t
#else
# define z_off64_t z_off_t
@@ -117,7 +111,7 @@ typedef gz_state FAR *gz_statep;
/* shared functions */
ZEXTERN void ZEXPORT gz_error OF((gz_statep, int, const char *));
-#if defined UNDER_CE && defined NO_ERRNO_H
+#if defined UNDER_CE
ZEXTERN char ZEXPORT *gz_strwinerror OF((DWORD error));
#endif
Oops, something went wrong.

0 comments on commit 05d47d2

Please sign in to comment.