summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/libz/ChangeLog24
-rw-r--r--lib/libz/README4
-rw-r--r--lib/libz/crc32.c2
-rw-r--r--lib/libz/deflate.c2
-rw-r--r--lib/libz/gzguts.h16
-rw-r--r--lib/libz/gzlib.c13
-rw-r--r--lib/libz/gzread.c5
-rw-r--r--lib/libz/inftrees.c4
-rw-r--r--lib/libz/minigzip.c4
-rw-r--r--lib/libz/zconf.h6
-rw-r--r--lib/libz/zlib.34
-rw-r--r--lib/libz/zlib.h27
-rw-r--r--lib/libz/zutil.c2
-rw-r--r--lib/libz/zutil.h31
14 files changed, 78 insertions, 66 deletions
diff --git a/lib/libz/ChangeLog b/lib/libz/ChangeLog
index 6d046ee..9817f59 100644
--- a/lib/libz/ChangeLog
+++ b/lib/libz/ChangeLog
@@ -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
diff --git a/lib/libz/README b/lib/libz/README
index f24aeee..a330267 100644
--- a/lib/libz/README
+++ b/lib/libz/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/ .
diff --git a/lib/libz/crc32.c b/lib/libz/crc32.c
index 1acc7ed..6b81fb4 100644
--- a/lib/libz/crc32.c
+++ b/lib/libz/crc32.c
@@ -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;
diff --git a/lib/libz/deflate.c b/lib/libz/deflate.c
index fcd698c..b7fb9fc 100644
--- a/lib/libz/deflate.c
+++ b/lib/libz/deflate.c
@@ -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
diff --git a/lib/libz/gzguts.h b/lib/libz/gzguts.h
index 0e7ed43..53857e0 100644
--- a/lib/libz/gzguts.h
+++ b/lib/libz/gzguts.h
@@ -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
diff --git a/lib/libz/gzlib.c b/lib/libz/gzlib.c
index 6fdb08a..88f27a8 100644
--- a/lib/libz/gzlib.c
+++ b/lib/libz/gzlib.c
@@ -3,9 +3,12 @@
* For conditions of distribution and use, see copyright notice in zlib.h
*/
+/* $FreeBSD$ */
+
#include "gzguts.h"
+#include "zutil.h"
-#ifdef _LARGEFILE64_SOURCE
+#if _LARGEFILE64_SOURCE == 1 && _LFS64_LARGEFILE == 1
# define LSEEK lseek64
#else
# define LSEEK lseek
@@ -15,7 +18,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 +68,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 +220,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 +308,7 @@ z_off64_t ZEXPORT gzseek64(file, offset, whence)
/* 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;
diff --git a/lib/libz/gzread.c b/lib/libz/gzread.c
index fecc36b..5c37bab 100644
--- a/lib/libz/gzread.c
+++ b/lib/libz/gzread.c
@@ -3,6 +3,8 @@
* For conditions of distribution and use, see copyright notice in zlib.h
*/
+/* $FreeBSD$ */
+
#include "gzguts.h"
#include <unistd.h>
@@ -56,7 +58,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;
}
diff --git a/lib/libz/inftrees.c b/lib/libz/inftrees.c
index ccf7fa9..90de8b8 100644
--- a/lib/libz/inftrees.c
+++ b/lib/libz/inftrees.c
@@ -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,
diff --git a/lib/libz/minigzip.c b/lib/libz/minigzip.c
index 84d823b..9677fa0 100644
--- a/lib/libz/minigzip.c
+++ b/lib/libz/minigzip.c
@@ -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"
diff --git a/lib/libz/zconf.h b/lib/libz/zconf.h
index 82d3af8..e9f968c 100644
--- a/lib/libz/zconf.h
+++ b/lib/libz/zconf.h
@@ -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,10 +375,6 @@ 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. */
diff --git a/lib/libz/zlib.3 b/lib/libz/zlib.3
index 52999c7..2c1679d 100644
--- a/lib/libz/zlib.3
+++ b/lib/libz/zlib.3
@@ -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
diff --git a/lib/libz/zlib.h b/lib/libz/zlib.h
index 9012168..1fcf630 100644
--- a/lib/libz/zlib.h
+++ b/lib/libz/zlib.h
@@ -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,29 +1556,30 @@ ZEXTERN int ZEXPORT inflateBackInit_ OF((z_streamp strm, int windowBits,
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));
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));
-#elif _FILE_OFFSET_BITS == 64
- 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
-#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
+# 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));
+ 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
#else
ZEXTERN gzFile ZEXPORT gzopen OF((const char *, const char *));
ZEXTERN z_off_t ZEXPORT gzseek OF((gzFile, z_off_t, int));
diff --git a/lib/libz/zutil.c b/lib/libz/zutil.c
index 98a55a8..6ba16f6 100644
--- a/lib/libz/zutil.c
+++ b/lib/libz/zutil.c
@@ -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);
diff --git a/lib/libz/zutil.h b/lib/libz/zutil.h
index 025035d..b21a19c 100644
--- a/lib/libz/zutil.h
+++ b/lib/libz/zutil.h
@@ -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]; /* indexed by 2-zlib_error */
#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]; /* indexed by 2-zlib_error */
# 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)
OpenPOWER on IntegriCloud