Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 31 Mar 2010 17:13:59 +0000 (UTC)
From:      Xin LI <delphij@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org
Subject:   svn commit: r205990 - vendor/libz/dist
Message-ID:  <201003311713.o2VHDxoH070467@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: delphij
Date: Wed Mar 31 17:13:59 2010
New Revision: 205990
URL: http://svn.freebsd.org/changeset/base/205990

Log:
  Import zlib 1.2.4.1 beta (trimmed)

Modified:
  vendor/libz/dist/ChangeLog
  vendor/libz/dist/README
  vendor/libz/dist/crc32.c
  vendor/libz/dist/deflate.c
  vendor/libz/dist/gzguts.h
  vendor/libz/dist/gzlib.c
  vendor/libz/dist/gzread.c
  vendor/libz/dist/inftrees.c
  vendor/libz/dist/minigzip.c
  vendor/libz/dist/zconf.h
  vendor/libz/dist/zlib.3
  vendor/libz/dist/zlib.h
  vendor/libz/dist/zutil.c
  vendor/libz/dist/zutil.h

Modified: vendor/libz/dist/ChangeLog
==============================================================================
--- vendor/libz/dist/ChangeLog	Wed Mar 31 17:05:30 2010	(r205989)
+++ vendor/libz/dist/ChangeLog	Wed Mar 31 17:13:59 2010	(r205990)
@@ -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

Modified: vendor/libz/dist/README
==============================================================================
--- vendor/libz/dist/README	Wed Mar 31 17:05:30 2010	(r205989)
+++ vendor/libz/dist/README	Wed Mar 31 17:13:59 2010	(r205990)
@@ -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 ar
 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/ .
 

Modified: vendor/libz/dist/crc32.c
==============================================================================
--- vendor/libz/dist/crc32.c	Wed Mar 31 17:05:30 2010	(r205989)
+++ vendor/libz/dist/crc32.c	Wed Mar 31 17:13:59 2010	(r205990)
@@ -221,7 +221,7 @@ const unsigned long FAR * ZEXPORT get_cr
 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;
 

Modified: vendor/libz/dist/deflate.c
==============================================================================
--- vendor/libz/dist/deflate.c	Wed Mar 31 17:05:30 2010	(r205989)
+++ vendor/libz/dist/deflate.c	Wed Mar 31 17:13:59 2010	(r205990)
@@ -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

Modified: vendor/libz/dist/gzguts.h
==============================================================================
--- vendor/libz/dist/gzguts.h	Wed Mar 31 17:05:30 2010	(r205989)
+++ vendor/libz/dist/gzguts.h	Wed Mar 31 17:13:59 2010	(r205990)
@@ -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
 

Modified: vendor/libz/dist/gzlib.c
==============================================================================
--- vendor/libz/dist/gzlib.c	Wed Mar 31 17:05:30 2010	(r205989)
+++ vendor/libz/dist/gzlib.c	Wed Mar 31 17:13:59 2010	(r205990)
@@ -5,7 +5,7 @@
 
 #include "gzguts.h"
 
-#ifdef _LARGEFILE64_SOURCE
+#if _LARGEFILE64_SOURCE == 1 && _LFS64_LARGEFILE == 1
 #  define LSEEK lseek64
 #else
 #  define LSEEK lseek
@@ -15,7 +15,7 @@
 local void gz_reset OF((gz_statep));
 local gzFile gz_open OF((const char *, int, const char *));
 
-#if defined UNDER_CE && defined NO_ERRNO_H
+#if defined UNDER_CE
 
 /* Map the Windows error number in ERROR to a locale-dependent error message
    string and return a pointer to it.  Typically, the values for ERROR come
@@ -65,7 +65,7 @@ char ZEXPORT *gz_strwinerror (error)
     return buf;
 }
 
-#endif /* UNDER_CE && NO_ERRNO_H */
+#endif /* UNDER_CE */
 
 /* Reset gzip file state */
 local void gz_reset(state)
@@ -217,7 +217,7 @@ gzFile ZEXPORT gzdopen(fd, mode)
 
     if (fd == -1 || (path = malloc(7 + 3 * sizeof(int))) == NULL)
         return NULL;
-    sprintf(path, "<fd:%d>", fd);
+    sprintf(path, "<fd:%d>", fd);   /* for debugging */
     gz = gz_open(path, fd, mode);
     free(path);
     return gz;
@@ -305,7 +305,7 @@ z_off64_t ZEXPORT gzseek64(file, offset,
     /* if within raw area while reading, just go there */
     if (state->mode == GZ_READ && state->how == COPY &&
         state->pos + offset >= state->raw) {
-        ret = LSEEK(state->fd, offset, SEEK_CUR);
+        ret = LSEEK(state->fd, offset - state->have, SEEK_CUR);
         if (ret == -1)
             return -1;
         state->have = 0;

Modified: vendor/libz/dist/gzread.c
==============================================================================
--- vendor/libz/dist/gzread.c	Wed Mar 31 17:05:30 2010	(r205989)
+++ vendor/libz/dist/gzread.c	Wed Mar 31 17:13:59 2010	(r205990)
@@ -55,7 +55,8 @@ local int gz_avail(state)
     if (state->err != Z_OK)
         return -1;
     if (state->eof == 0) {
-        if (gz_load(state, state->in, state->size, &(strm->avail_in)) == -1)
+        if (gz_load(state, state->in, state->size,
+                (unsigned *)&(strm->avail_in)) == -1)
             return -1;
         strm->next_in = state->in;
     }

Modified: vendor/libz/dist/inftrees.c
==============================================================================
--- vendor/libz/dist/inftrees.c	Wed Mar 31 17:05:30 2010	(r205989)
+++ vendor/libz/dist/inftrees.c	Wed Mar 31 17:13:59 2010	(r205990)
@@ -9,7 +9,7 @@
 #define MAXBITS 15
 
 const char inflate_copyright[] =
-   " inflate 1.2.4 Copyright 1995-2010 Mark Adler ";
+   " inflate 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
@@ -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, 64, 195};
+        19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 67, 206};
     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,

Modified: vendor/libz/dist/minigzip.c
==============================================================================
--- vendor/libz/dist/minigzip.c	Wed Mar 31 17:05:30 2010	(r205989)
+++ vendor/libz/dist/minigzip.c	Wed Mar 31 17:13:59 2010	(r205990)
@@ -54,7 +54,7 @@
   extern int unlink OF((const char *));
 #endif
 
-#if defined(UNDER_CE) && defined(NO_ERRNO_H)
+#if defined(UNDER_CE)
 #  include <windows.h>
 #  define perror(s) pwinerror(s)
 
@@ -116,7 +116,7 @@ static void pwinerror (s)
         fprintf(stderr, "%s\n", strwinerror(GetLastError ()));
 }
 
-#endif /* UNDER_CE && NO_ERRNO_H */
+#endif /* UNDER_CE */
 
 #ifndef GZ_SUFFIX
 #  define GZ_SUFFIX ".gz"

Modified: vendor/libz/dist/zconf.h
==============================================================================
--- vendor/libz/dist/zconf.h	Wed Mar 31 17:05:30 2010	(r205989)
+++ vendor/libz/dist/zconf.h	Wed Mar 31 17:13:59 2010	(r205990)
@@ -364,7 +364,7 @@ typedef uLong FAR uLongf;
 #  define Z_HAVE_UNISTD_H
 #endif
 
-#ifdef Z_HAVE_UNISTD_H
+#if defined(Z_HAVE_UNISTD_H) || _LARGEFILE64_SOURCE == 1
 #  include <sys/types.h>    /* for off_t */
 #  include <unistd.h>       /* for SEEK_* and off_t */
 #  ifdef VMS
@@ -375,15 +375,12 @@ typedef uLong FAR uLongf;
 #  endif
 #endif
 
-#ifdef _LARGEFILE64_SOURCE
-#  include <sys/types.h>
-#endif
-
 #ifndef SEEK_SET
 #  define SEEK_SET        0       /* Seek from beginning of file.  */
 #  define SEEK_CUR        1       /* Seek from current position.  */
 #  define SEEK_END        2       /* Set file pointer to EOF plus "offset" */
 #endif
+
 #ifndef z_off_t
 #  define z_off_t long
 #endif

Modified: vendor/libz/dist/zlib.3
==============================================================================
--- vendor/libz/dist/zlib.3	Wed Mar 31 17:05:30 2010	(r205989)
+++ vendor/libz/dist/zlib.3	Wed Mar 31 17:13:59 2010	(r205990)
@@ -1,4 +1,4 @@
-.TH ZLIB 3 "14 March 2010"
+.TH ZLIB 3 "28 Mar 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
+Version 1.2.4.1
 Copyright (C) 1995-2010 Jean-loup Gailly (jloup@gzip.org)
 and Mark Adler (madler@alumni.caltech.edu).
 .LP

Modified: vendor/libz/dist/zlib.h
==============================================================================
--- vendor/libz/dist/zlib.h	Wed Mar 31 17:05:30 2010	(r205989)
+++ vendor/libz/dist/zlib.h	Wed Mar 31 17:13:59 2010	(r205990)
@@ -1,5 +1,5 @@
 /* zlib.h -- interface of the 'zlib' general purpose compression library
-  version 1.2.4, Mar 14th, 2010
+  version 1.2.4.1, March 28th, 2010
 
   Copyright (C) 1995-2010 Jean-loup Gailly and Mark Adler
 
@@ -37,12 +37,12 @@
 extern "C" {
 #endif
 
-#define ZLIB_VERSION "1.2.4"
-#define ZLIB_VERNUM 0x1240
+#define ZLIB_VERSION "1.2.4.1"
+#define ZLIB_VERNUM 0x1241
 #define ZLIB_VER_MAJOR 1
 #define ZLIB_VER_MINOR 2
 #define ZLIB_VER_REVISION 4
-#define ZLIB_VER_SUBREVISION 0
+#define ZLIB_VER_SUBREVISION 1
 
 /*
     The 'zlib' compression library provides in-memory compression and
@@ -1556,7 +1556,7 @@ ZEXTERN int ZEXPORT inflateBackInit_ OF(
         inflateBackInit_((strm), (windowBits), (window), \
                                             ZLIB_VERSION, sizeof(z_stream))
 
-#ifdef _LARGEFILE64_SOURCE
+#if _LARGEFILE64_SOURCE == 1 && _LFS64_LARGEFILE == 1
    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));
@@ -1565,14 +1565,14 @@ ZEXTERN int ZEXPORT inflateBackInit_ OF(
    ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, off64_t));
 #endif
 
-#if !defined(ZLIB_INTERNAL) && _FILE_OFFSET_BITS == 64
+#if !defined(ZLIB_INTERNAL) && _FILE_OFFSET_BITS == 64 && _LFS64_LARGEFILE == 1
 #  define gzopen gzopen64
 #  define gzseek gzseek64
 #  define gztell gztell64
 #  define gzoffset gzoffset64
 #  define adler32_combine adler32_combine64
 #  define crc32_combine crc32_combine64
-#  ifndef _LARGEFILE64_SOURCE
+#  if _LARGEFILE64_SOURCE != 1
      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));

Modified: vendor/libz/dist/zutil.c
==============================================================================
--- vendor/libz/dist/zutil.c	Wed Mar 31 17:05:30 2010	(r205989)
+++ vendor/libz/dist/zutil.c	Wed Mar 31 17:13:59 2010	(r205990)
@@ -272,7 +272,7 @@ void  zcfree (voidpf opaque, voidpf ptr)
 #  define _hfree   hfree
 #endif
 
-voidpf zcalloc (voidpf opaque, unsigned items, unsigned size)
+voidpf zcalloc (voidpf opaque, uInt items, uInt size)
 {
     if (opaque) opaque = 0; /* to make compiler happy */
     return _halloc((long)items, size);

Modified: vendor/libz/dist/zutil.h
==============================================================================
--- vendor/libz/dist/zutil.h	Wed Mar 31 17:05:30 2010	(r205989)
+++ vendor/libz/dist/zutil.h	Wed Mar 31 17:13:59 2010	(r205990)
@@ -24,19 +24,6 @@
 #  include <stdlib.h>
 #endif
 
-#if defined(UNDER_CE) && defined(NO_ERRNO_H)
-#  define zseterrno(ERR) SetLastError((DWORD)(ERR))
-#  define zerrno() ((int)GetLastError())
-#else
-#  ifdef NO_ERRNO_H
-     extern int errno;
-#  else
-#    include <errno.h>
-#  endif
-#  define zseterrno(ERR) do { errno = (ERR); } while (0)
-#  define zerrno() errno
-#endif
-
 #ifndef local
 #  define local static
 #endif
@@ -167,12 +154,22 @@ extern const char * const z_errmsg[10]; 
   #pragma warn -8066
 #endif
 
-#ifdef _LARGEFILE64_SOURCE
+#if _LARGEFILE64_SOURCE == 1 && _LFS64_LARGEFILE == 1
 #  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 != 1 || _LFS64_LARGEFILE != 1
+    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));
+#endif
+
         /* common defaults */
 
 #ifndef OS_CODE
@@ -183,12 +180,6 @@ extern const char * const z_errmsg[10]; 
 #  define F_OPEN(name, mode) fopen((name), (mode))
 #endif
 
-#ifdef _LARGEFILE64_SOURCE
-#  define F_OPEN64(name, mode) fopen64((name), (mode))
-#else
-#  define F_OPEN64(name, mode) fopen((name), (mode))
-#endif
-
          /* functions */
 
 #if defined(STDC99) || (defined(__TURBOC__) && __TURBOC__ >= 0x550)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201003311713.o2VHDxoH070467>