]> git.lizzy.rs Git - zlib.git/commitdiff
zlib 1.2.4.3 v1.2.4.3
authorMark Adler <madler@alumni.caltech.edu>
Sat, 10 Sep 2011 06:34:38 +0000 (23:34 -0700)
committerMark Adler <madler@alumni.caltech.edu>
Sat, 10 Sep 2011 06:34:38 +0000 (23:34 -0700)
24 files changed:
ChangeLog
Makefile.in
README
configure
contrib/delphi/ZLib.pas
contrib/dotzlib/DotZLib/UnitTests.cs
contrib/infback9/inftree9.c
contrib/pascal/zlibpas.pas
contrib/vstudio/vc10/zlib.rc
contrib/vstudio/vc9/zlib.rc
deflate.c
gzguts.h
gzlib.c
inftrees.c
minigzip.c
qnx/package.qpg
treebuild.xml
zconf.h
zconf.h.cmakein
zconf.h.in
zlib.3
zlib.3.pdf
zlib.h
zutil.h

index 33a740dbefe52ce1b24af09512a4712250084114..898c197f0cf9ad530d1bd146e0d99599d4a94732 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,17 @@
 
                 ChangeLog file for zlib
 
+Changes in 1.2.4.3 (10 Apr 2010)
+- Only use CROSS_PREFIX in configure for ar and ranlib if they exist
+- Use CROSS_PREFIX for nm [Bar-Lev]
+- Assume _LARGEFILE64_SOURCE defined is equivalent to true
+- Avoid use of undefined symbols in #if with && and ||
+- Make *64 prototypes in gzguts.h consistent with functions
+- Add -shared load option for MinGW in configure [Bowler]
+- Move z_off64_t to public interface, use instead of off64_t
+- Remove ! from shell test in configure (not portable to Solaris)
+- Change +0 macro tests to -0 for possibly increased portability
+
 Changes in 1.2.4.2 (9 Apr 2010)
 - Add consistent carriage returns to readme.txt's in masmx86 and masmx64
 - Really provide prototypes for *64 functions when building without LFS
index e5bc2a3c41f5b24611969565df7cb0a221edaef7..aca5924763a26b28d9854073cdde574f9700e2e6 100644 (file)
@@ -32,7 +32,7 @@ CPP=$(CC) -E
 
 STATICLIB=libz.a
 SHAREDLIB=libz.so
-SHAREDLIBV=libz.so.1.2.4.2
+SHAREDLIBV=libz.so.1.2.4.3
 SHAREDLIBM=libz.so.1
 LIBS=$(STATICLIB) $(SHAREDLIBV)
 
diff --git a/README b/README
index 3c4f36e228aadf5fe40bab54d08793277cbeda8c..68ff992369cb8a268b87b40174766e1ba6d7a8ea 100644 (file)
--- a/README
+++ b/README
@@ -1,6 +1,6 @@
 ZLIB DATA COMPRESSION LIBRARY
 
-zlib 1.2.4.2 is a general purpose data compression library.  All the code is
+zlib 1.2.4.3 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)
@@ -31,7 +31,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.2 are documented in the file ChangeLog.
+The changes made in version 1.2.4.3 are documented in the file ChangeLog.
 
 Unsupported third party contributions are provided in directory contrib/ .
 
index 577cba7000efc3f08169245611fd1a4fa2ae0cf5..7ff484bdbb100a239b37fbef97cdd1588eb04310 100755 (executable)
--- a/configure
+++ b/configure
 # 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)
+# make sure we are running under a compatible shell (stolen from ffmpeg and libnfo,
+# except their's wasn't portable enough due to ! usage, so this is better)
 if test "0$ZLIB_CONFIGURE_EXEC" -lt 1; then
   unset foo
-  (: ${foo%%bar}) 2>/dev/null && ! (: ${foo?}) 2>/dev/null
+  try=0
+  (: ${foo%%bar}) 2>/dev/null
   if test "$?" -ne 0; then
+    try=1
+  else
+    (: ${foo?}) 2>/dev/null
+    if test "$?" -eq 0; then
+      try=1
+    fi
+  fi
+  if test "$try" -eq 1; then
     ZLIB_CONFIGURE_EXEC=1
     export ZLIB_CONFIGURE_EXEC
     type "bash" > /dev/null 2>&1 && exec bash "$0" "$@"
@@ -29,6 +39,7 @@ if test "0$ZLIB_CONFIGURE_EXEC" -lt 1; then
 #    exit 1
 # we could give up here, but go ahead and give their old sh a try
   fi
+  unset try
 fi
 
 if [ -n "${CHOST}" ]; then
@@ -42,10 +53,22 @@ 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-"${CROSS_PREFIX}ar"}
+if [ -x "${CROSS_PREFIX}ar" ]; then
+    AR=${AR-"${CROSS_PREFIX}ar"}
+else
+    AR=${AR-"ar"}
+fi
 AR_RC="${AR} rc"
-RANLIB=${RANLIB-"${CROSS_PREFIX}ranlib"}
-NM=${NM-"nm"}
+if [ -x "${CROSS_PREFIX}ranlib" ]; then
+    RANLIB=${RANLIB-"${CROSS_PREFIX}ranlib"}
+else
+    RANLIB=${RANLIB-"ranlib"}
+fi
+if [ -x "${CROSS_PREFIX}nm" ]; then
+    NM=${NM-"${CROSS_PREFIX}nm"}
+else
+    NM=${NM-"nm"}
+fi
 LDCONFIG=${LDCONFIG-"ldconfig"}
 LDSHAREDLIBC="${LDSHAREDLIBC-"-lc"}"
 prefix=${prefix-/usr/local}
@@ -121,6 +144,7 @@ if test "$gcc" -eq 1 && ($cc -c $cflags $test.c) 2>/dev/null; then
   CYGWIN* | Cygwin* | cygwin* | OS/2*)
         EXE='.exe' ;;
   MINGW*)
+        LDSHARED=${LDSHARED-"$cc -shared"}
         LDSHAREDLIBC=""
         EXE='.exe' ;;
   QNX*)  # This is for QNX6. I suppose that the QNX rule below is for QNX2,QNX4
index 72ef99f39a18a287c9b2e64b1b9b24185bbde898..6ed89cecb391a5631e8f2a50ea5bab5b59b283d7 100644 (file)
@@ -152,7 +152,7 @@ procedure DecompressToUserBuf(const InBuf: Pointer; InBytes: Integer;
   const OutBuf: Pointer; BufSize: Integer);
 
 const
-  zlib_version = '1.2.4.2';
+  zlib_version = '1.2.4.3';
 
 type
   EZlibError = class(Exception);
index 6cfdaa706485415736449d579b33bb6991350332..0668c9fa8672dfaec945058831ad0672bd85bfbb 100644 (file)
@@ -156,7 +156,7 @@ namespace DotZLibTests
         public void Info_Version()\r
         {\r
             Info info = new Info();\r
-            Assert.AreEqual("1.2.4.2", Info.Version);\r
+            Assert.AreEqual("1.2.4.3", Info.Version);\r
             Assert.AreEqual(32, info.SizeOfUInt);\r
             Assert.AreEqual(32, info.SizeOfULong);\r
             Assert.AreEqual(32, info.SizeOfPointer);\r
@@ -271,4 +271,4 @@ namespace DotZLibTests
        }\r
 }\r
 \r
-#endif
\ No newline at end of file
+#endif\r
index 362008ccb6933c447525eb10d85f2481278f4d2b..a67f21dcd8b183db854aede027656319e8dde5c7 100644 (file)
@@ -9,7 +9,7 @@
 #define MAXBITS 15
 
 const char inflate9_copyright[] =
-   " inflate9 1.2.4.2 Copyright 1995-2010 Mark Adler ";
+   " inflate9 1.2.4.3 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, 202, 75};
+        133, 133, 133, 133, 144, 195, 66};
     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,
index e0bc74b5e206950a718995d4bd725b35cdd1b414..28383bcef5f28097ca5b1b5a9368b181c05f4222 100644 (file)
@@ -10,7 +10,7 @@ unit zlibpas;
 interface
 
 const
-  ZLIB_VERSION = '1.2.4.2';
+  ZLIB_VERSION = '1.2.4.3';
 
 type
   alloc_func = function(opaque: Pointer; items, size: Integer): Pointer;
index 38615f02aeeaa19108246699debb7756aed629d2..6d8cd3cff46d7d28c2348edffe2f4d51d236908a 100644 (file)
@@ -2,8 +2,8 @@
 \r
 #define IDR_VERSION1  1\r
 IDR_VERSION1   VERSIONINFO     MOVEABLE IMPURE LOADONCALL DISCARDABLE\r
-  FILEVERSION   1,2,4,2\r
-  PRODUCTVERSION 1,2,4,2\r
+  FILEVERSION   1,2,4,3\r
+  PRODUCTVERSION 1,2,4,3\r
   FILEFLAGSMASK        VS_FFI_FILEFLAGSMASK\r
   FILEFLAGS    0\r
   FILEOS       VOS_DOS_WINDOWS32\r
@@ -17,7 +17,7 @@ BEGIN
 \r
     BEGIN\r
       VALUE "FileDescription", "zlib data compression and ZIP file I/O library\0"\r
-      VALUE "FileVersion",     "1.2.4.2\0"\r
+      VALUE "FileVersion",     "1.2.4.3\0"\r
       VALUE "InternalName",    "zlib\0"\r
       VALUE "OriginalFilename",        "zlib.dll\0"\r
       VALUE "ProductName",     "ZLib.DLL\0"\r
index 38615f02aeeaa19108246699debb7756aed629d2..6d8cd3cff46d7d28c2348edffe2f4d51d236908a 100644 (file)
@@ -2,8 +2,8 @@
 \r
 #define IDR_VERSION1  1\r
 IDR_VERSION1   VERSIONINFO     MOVEABLE IMPURE LOADONCALL DISCARDABLE\r
-  FILEVERSION   1,2,4,2\r
-  PRODUCTVERSION 1,2,4,2\r
+  FILEVERSION   1,2,4,3\r
+  PRODUCTVERSION 1,2,4,3\r
   FILEFLAGSMASK        VS_FFI_FILEFLAGSMASK\r
   FILEFLAGS    0\r
   FILEOS       VOS_DOS_WINDOWS32\r
@@ -17,7 +17,7 @@ BEGIN
 \r
     BEGIN\r
       VALUE "FileDescription", "zlib data compression and ZIP file I/O library\0"\r
-      VALUE "FileVersion",     "1.2.4.2\0"\r
+      VALUE "FileVersion",     "1.2.4.3\0"\r
       VALUE "InternalName",    "zlib\0"\r
       VALUE "OriginalFilename",        "zlib.dll\0"\r
       VALUE "ProductName",     "ZLib.DLL\0"\r
index 70255287790f0f25610f5e9d8f2fa67cdf08fce6..efb26bf5d9148d3f3751c708c02485f5626ea97c 100644 (file)
--- a/deflate.c
+++ b/deflate.c
@@ -52,7 +52,7 @@
 #include "deflate.h"
 
 const char deflate_copyright[] =
-   " deflate 1.2.4.2 Copyright 1995-2010 Jean-loup Gailly and Mark Adler ";
+   " deflate 1.2.4.3 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
index a0e71198e0ded362d2ede1f7e4ea0ff3e71f7774..b0a4cbdc3366b53e7b35e2484d7f6d5fa4c8dceb 100644 (file)
--- a/gzguts.h
+++ b/gzguts.h
@@ -3,7 +3,7 @@
  * For conditions of distribution and use, see copyright notice in zlib.h
  */
 
-#if _LARGEFILE64_SOURCE
+#ifdef _LARGEFILE64_SOURCE
 #  ifndef _LARGEFILE_SOURCE
 #    define _LARGEFILE_SOURCE 1
 #  endif
 #  endif
 #endif
 
-#if _LARGEFILE64_SOURCE
-#  define z_off64_t off64_t
-#else
-#  define z_off64_t z_off_t
-#endif
-
 /* provide prototypes for these when building zlib without LFS */
-#if _LARGEFILE64_SOURCE+0 != 1 || _LFS64_LARGEFILE+0 != 1
+#if !defined(_LARGEFILE64_SOURCE) || _LFS64_LARGEFILE-0 == 0
     ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *));
-    ZEXTERN z_off_t ZEXPORT gzseek64 OF((gzFile, off_t, int));
-    ZEXTERN z_off_t ZEXPORT gztell64 OF((gzFile));
-    ZEXTERN z_off_t ZEXPORT gzoffset64 OF((gzFile));
+    ZEXTERN z_off64_t ZEXPORT gzseek64 OF((gzFile, z_off64_t, int));
+    ZEXTERN z_off64_t ZEXPORT gztell64 OF((gzFile));
+    ZEXTERN z_off64_t ZEXPORT gzoffset64 OF((gzFile));
 #endif
 
 /* default i/o buffer size -- double this for output when reading */
diff --git a/gzlib.c b/gzlib.c
index d1b625342a4d683c5282d9b4120aaaae4016dec6..1839002690599bec63b023365b6f11c0a708a64c 100644 (file)
--- a/gzlib.c
+++ b/gzlib.c
@@ -5,7 +5,7 @@
 
 #include "gzguts.h"
 
-#if _LARGEFILE64_SOURCE && _LFS64_LARGEFILE
+#if defined(_LARGEFILE64_SOURCE) && _LFS64_LARGEFILE-0
 #  define LSEEK lseek64
 #else
 #  define LSEEK lseek
index 1ea90f79e7c1bde45856897a07705bf5a0f9e98c..430b1741585712e8ba23fe0c12ecc52c6e328fcd 100644 (file)
@@ -9,7 +9,7 @@
 #define MAXBITS 15
 
 const char inflate_copyright[] =
-   " inflate 1.2.4.2 Copyright 1995-2010 Mark Adler ";
+   " inflate 1.2.4.3 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
@@ -62,7 +62,7 @@ unsigned short FAR *work;
         35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0};
     static const unsigned short lext[31] = { /* Length codes 257..285 extra */
         16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18,
-        19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 202, 75};
+        19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 195, 66};
     static const unsigned short dbase[32] = { /* Distance codes 0..29 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, 4097, 6145,
index f43cb544db7e586c320d3502be5a7a7e5ceac574..9825ccc3a712e19fe8bccb52214f9da823a6757f 100644 (file)
@@ -53,7 +53,7 @@
 #  include <unix.h> /* for fileno */
 #endif
 
-#if !defined(Z_HAVE_UNISTD_H) && _LARGEFILE64_SOURCE+0 != 1
+#if !defined(Z_HAVE_UNISTD_H) && !defined(_LARGEFILE64_SOURCE)
 #ifndef WIN32 /* unlink already in stdio.h for WIN32 */
   extern int unlink OF((const char *));
 #endif
index 99d3701a877cc37c596f209167114cdd26bf7302..55cb3e11cb4cd6fea80232bb86fc824d036ea14c 100644 (file)
       <QPG:Files>
          <QPG:Add file="../zconf.h" install="/opt/include/" user="root:sys" permission="644"/>
          <QPG:Add file="../zlib.h" install="/opt/include/" user="root:sys" permission="644"/>
-         <QPG:Add file="../libz.so.1.2.4.2" install="/opt/lib/" user="root:bin" permission="644"/>
-         <QPG:Add file="libz.so" install="/opt/lib/" component="dev" filetype="symlink" linkto="libz.so.1.2.4.2"/>
-         <QPG:Add file="libz.so.1" install="/opt/lib/" filetype="symlink" linkto="libz.so.1.2.4.2"/>
-         <QPG:Add file="../libz.so.1.2.4.2" install="/opt/lib/" component="slib"/>
+         <QPG:Add file="../libz.so.1.2.4.3" install="/opt/lib/" user="root:bin" permission="644"/>
+         <QPG:Add file="libz.so" install="/opt/lib/" component="dev" filetype="symlink" linkto="libz.so.1.2.4.3"/>
+         <QPG:Add file="libz.so.1" install="/opt/lib/" filetype="symlink" linkto="libz.so.1.2.4.3"/>
+         <QPG:Add file="../libz.so.1.2.4.3" install="/opt/lib/" component="slib"/>
       </QPG:Files>
 
       <QPG:PackageFilter>
@@ -63,7 +63,7 @@
             </QPM:ProductDescription>
 
             <QPM:ReleaseDescription>
-               <QPM:ReleaseVersion>1.2.4.2</QPM:ReleaseVersion>
+               <QPM:ReleaseVersion>1.2.4.3</QPM:ReleaseVersion>
                <QPM:ReleaseUrgency>Medium</QPM:ReleaseUrgency>
                <QPM:ReleaseStability>Stable</QPM:ReleaseStability>
                <QPM:ReleaseNoteMinor></QPM:ReleaseNoteMinor>
index d2c6a259276735bb4dcf6b0ff76e1362a635ecda..616ed3fd9ed8d98e4abe401fc3e5feaacd8733ab 100644 (file)
@@ -1,6 +1,6 @@
 <?xml version="1.0" ?>
-<package name="zlib" version="1.2.4.2">
-    <library name="zlib" dlversion="1.2.4.2" dlname="z">
+<package name="zlib" version="1.2.4.3">
+    <library name="zlib" dlversion="1.2.4.3" dlname="z">
        <property name="description"> zip compression library </property>
        <property name="include-target-dir" value="$(@PACKAGE/install-includedir)" />
 
diff --git a/zconf.h b/zconf.h
index d3eaf9187e63bb7477f4fea87781a91837208c04..1988920109fdf633e3f316160ad91923eaeb0d6b 100644 (file)
--- a/zconf.h
+++ b/zconf.h
@@ -368,7 +368,7 @@ typedef uLong FAR uLongf;
 #  include <sys/types.h>    /* for off_t */
 #endif
 
-#if defined(Z_HAVE_UNISTD_H) || _LARGEFILE64_SOURCE
+#if defined(Z_HAVE_UNISTD_H) || defined(_LARGEFILE64_SOURCE)
 #  include <unistd.h>       /* for SEEK_* and off_t */
 #  ifdef VMS
 #    include <unixio.h>     /* for off_t */
@@ -388,6 +388,12 @@ typedef uLong FAR uLongf;
 #  define z_off_t long
 #endif
 
+#if defined(_LARGEFILE64_SOURCE) && _LFS64_LARGEFILE-0
+#  define z_off64_t off64_t
+#else
+#  define z_off64_t z_off_t
+#endif
+
 #if defined(__OS400__)
 #  define NO_vsnprintf
 #endif
index bbe25a7d4c2e616ce137e6a89458685cc38dbab7..cf9cc24026afebc311423bc0cecb7527147e4863 100644 (file)
@@ -370,7 +370,7 @@ typedef uLong FAR uLongf;
 #  include <sys/types.h>    /* for off_t */
 #endif
 
-#if defined(Z_HAVE_UNISTD_H) || _LARGEFILE64_SOURCE
+#if defined(Z_HAVE_UNISTD_H) || defined(_LARGEFILE64_SOURCE)
 #  include <unistd.h>       /* for SEEK_* and off_t */
 #  ifdef VMS
 #    include <unixio.h>     /* for off_t */
@@ -390,6 +390,12 @@ typedef uLong FAR uLongf;
 #  define z_off_t long
 #endif
 
+#if defined(_LARGEFILE64_SOURCE) && _LFS64_LARGEFILE-0
+#  define z_off64_t off64_t
+#else
+#  define z_off64_t z_off_t
+#endif
+
 #if defined(__OS400__)
 #  define NO_vsnprintf
 #endif
index d3eaf9187e63bb7477f4fea87781a91837208c04..1988920109fdf633e3f316160ad91923eaeb0d6b 100644 (file)
@@ -368,7 +368,7 @@ typedef uLong FAR uLongf;
 #  include <sys/types.h>    /* for off_t */
 #endif
 
-#if defined(Z_HAVE_UNISTD_H) || _LARGEFILE64_SOURCE
+#if defined(Z_HAVE_UNISTD_H) || defined(_LARGEFILE64_SOURCE)
 #  include <unistd.h>       /* for SEEK_* and off_t */
 #  ifdef VMS
 #    include <unixio.h>     /* for off_t */
@@ -388,6 +388,12 @@ typedef uLong FAR uLongf;
 #  define z_off_t long
 #endif
 
+#if defined(_LARGEFILE64_SOURCE) && _LFS64_LARGEFILE-0
+#  define z_off64_t off64_t
+#else
+#  define z_off64_t z_off_t
+#endif
+
 #if defined(__OS400__)
 #  define NO_vsnprintf
 #endif
diff --git a/zlib.3 b/zlib.3
index 552318d4aad7cc7f393af196678ae119eaef131c..b5346168d0ee089545eb1a84fb12c8dfd4961847 100644 (file)
--- a/zlib.3
+++ b/zlib.3
@@ -1,4 +1,4 @@
-.TH ZLIB 3 "9 Apr 2010"
+.TH ZLIB 3 "10 Apr 2010"
 .SH NAME
 zlib \- compression/decompression library
 .SH SYNOPSIS
@@ -125,7 +125,7 @@ before asking for help.
 Send questions and/or comments to zlib@gzip.org,
 or (for the Windows DLL version) to Gilles Vollant (info@winimage.com).
 .SH AUTHORS
-Version 1.2.4.2
+Version 1.2.4.3
 Copyright (C) 1995-2010 Jean-loup Gailly (jloup@gzip.org)
 and Mark Adler (madler@alumni.caltech.edu).
 .LP
index abbbb7ffef0c21d31491cdea2b916a283ade57c6..584f7930e8eee594a12f64a127593de69e6f7307 100644 (file)
Binary files a/zlib.3.pdf and b/zlib.3.pdf differ
diff --git a/zlib.h b/zlib.h
index 25535f9ab690ae8a776aa4342d9879e79892d9e6..699630c1ddc1d66d506b14fd514d4a94c27554e9 100644 (file)
--- a/zlib.h
+++ b/zlib.h
@@ -1,5 +1,5 @@
 /* zlib.h -- interface of the 'zlib' general purpose compression library
-  version 1.2.4.2, April 9th, 2010
+  version 1.2.4.3, April 10th, 2010
 
   Copyright (C) 1995-2010 Jean-loup Gailly and Mark Adler
 
 extern "C" {
 #endif
 
-#define ZLIB_VERSION "1.2.4.2"
-#define ZLIB_VERNUM 0x1241
+#define ZLIB_VERSION "1.2.4.3"
+#define ZLIB_VERNUM 0x1243
 #define ZLIB_VER_MAJOR 1
 #define ZLIB_VER_MINOR 2
 #define ZLIB_VER_REVISION 4
-#define ZLIB_VER_SUBREVISION 2
+#define ZLIB_VER_SUBREVISION 3
 
 /*
     The 'zlib' compression library provides in-memory compression and
@@ -1556,29 +1556,35 @@ ZEXTERN int ZEXPORT inflateBackInit_ OF((z_streamp strm, int windowBits,
         inflateBackInit_((strm), (windowBits), (window), \
                                             ZLIB_VERSION, sizeof(z_stream))
 
-#if _LARGEFILE64_SOURCE && _LFS64_LARGEFILE
+/* provide 64-bit offset functions if _LARGEFILE64_SOURCE defined, and/or
+ * change the regular functions to 64 bits if _FILE_OFFSET_BITS is 64 (if
+ * both are true, the application gets the *64 functions, and the regular
+ * functions are changed to 64 bits) -- in case these are set on systems
+ * without large file support, _LFS64_LARGEFILE must also be true
+ */
+#if defined(_LARGEFILE64_SOURCE) && _LFS64_LARGEFILE-0
    ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *));
-   ZEXTERN off64_t ZEXPORT gzseek64 OF((gzFile, off64_t, int));
-   ZEXTERN off64_t ZEXPORT gztell64 OF((gzFile));
-   ZEXTERN off64_t ZEXPORT gzoffset64 OF((gzFile));
-   ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, off64_t));
-   ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, off64_t));
+   ZEXTERN z_off64_t ZEXPORT gzseek64 OF((gzFile, z_off64_t, int));
+   ZEXTERN z_off64_t ZEXPORT gztell64 OF((gzFile));
+   ZEXTERN z_off64_t ZEXPORT gzoffset64 OF((gzFile));
+   ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off64_t));
+   ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off64_t));
 #endif
 
-#if !defined(ZLIB_INTERNAL) && _FILE_OFFSET_BITS+0 == 64 && _LFS64_LARGEFILE
+#if !defined(ZLIB_INTERNAL) && _FILE_OFFSET_BITS-0 == 64 && _LFS64_LARGEFILE-0
 #  define gzopen gzopen64
 #  define gzseek gzseek64
 #  define gztell gztell64
 #  define gzoffset gzoffset64
 #  define adler32_combine adler32_combine64
 #  define crc32_combine crc32_combine64
-#  if _LARGEFILE64_SOURCE
+#  ifdef _LARGEFILE64_SOURCE
      ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *));
-     ZEXTERN off_t ZEXPORT gzseek64 OF((gzFile, off_t, int));
-     ZEXTERN off_t ZEXPORT gztell64 OF((gzFile));
-     ZEXTERN off_t ZEXPORT gzoffset64 OF((gzFile));
-     ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, off_t));
-     ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, off_t));
+     ZEXTERN z_off_t ZEXPORT gzseek64 OF((gzFile, z_off_t, int));
+     ZEXTERN z_off_t ZEXPORT gztell64 OF((gzFile));
+     ZEXTERN z_off_t ZEXPORT gzoffset64 OF((gzFile));
+     ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off_t));
+     ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off_t));
 #  endif
 #else
    ZEXTERN gzFile ZEXPORT gzopen OF((const char *, const char *));
@@ -1589,10 +1595,12 @@ ZEXTERN int ZEXPORT inflateBackInit_ OF((z_streamp strm, int windowBits,
    ZEXTERN uLong ZEXPORT crc32_combine OF((uLong, uLong, z_off_t));
 #endif
 
+/* hack for buggy compilers */
 #if !defined(ZUTIL_H) && !defined(NO_DUMMY_DECL)
-    struct internal_state {int dummy;}; /* hack for buggy compilers */
+    struct internal_state {int dummy;};
 #endif
 
+/* undocumented functions */
 ZEXTERN const char   * ZEXPORT zError           OF((int));
 ZEXTERN int            ZEXPORT inflateSyncPoint OF((z_streamp));
 ZEXTERN const uLongf * ZEXPORT get_crc_table    OF((void));
diff --git a/zutil.h b/zutil.h
index 850f1ece16f2b59be8ae45d0e1eb41048795a971..a250088640a6ec387c3fe1e341307f17a0b1ef2d 100644 (file)
--- a/zutil.h
+++ b/zutil.h
@@ -154,14 +154,8 @@ extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
   #pragma warn -8066
 #endif
 
-#if _LARGEFILE64_SOURCE && _LFS64_LARGEFILE
-#  define z_off64_t off64_t
-#else
-#  define z_off64_t z_off_t
-#endif
-
 /* provide prototypes for these when building zlib without LFS */
-#if _LARGEFILE64_SOURCE+0 != 1 || _LFS64_LARGEFILE+0 != 1
+#if !defined(_LARGEFILE64_SOURCE) || _LFS64_LARGEFILE-0 == 0
     ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off_t));
     ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off_t));
 #endif