aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXin LI <delphij@FreeBSD.org>2010-03-31 17:13:59 +0000
committerXin LI <delphij@FreeBSD.org>2010-03-31 17:13:59 +0000
commita665426b03b0f88ddb21074e5f760c8d3ba25fd1 (patch)
tree316b75ef2f36568188dd097567fff7d4adc0ba2f
parentdb6fdb68ea8eaad189c4fd5bb521cb68b27e53a8 (diff)
downloadsrc-a665426b03b0f88ddb21074e5f760c8d3ba25fd1.tar.gz
src-a665426b03b0f88ddb21074e5f760c8d3ba25fd1.zip
Import zlib 1.2.4.1 beta (trimmed)vendor/zlib/1.2.4.1
Notes
Notes: svn path=/vendor/libz/dist/; revision=205990 svn path=/vendor/libz/1.2.4.1/; revision=205991; tag=vendor/zlib/1.2.4.1
-rw-r--r--ChangeLog24
-rw-r--r--README4
-rw-r--r--crc32.c2
-rw-r--r--deflate.c2
-rw-r--r--gzguts.h16
-rw-r--r--gzlib.c10
-rw-r--r--gzread.c3
-rw-r--r--inftrees.c4
-rw-r--r--minigzip.c4
-rw-r--r--zconf.h7
-rw-r--r--zlib.34
-rw-r--r--zlib.h14
-rw-r--r--zutil.c2
-rw-r--r--zutil.h31
14 files changed, 67 insertions, 60 deletions
diff --git a/ChangeLog b/ChangeLog
index 6d046ee44b86..9817f59b7a16 100644
--- a/ChangeLog
+++ b/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/README b/README
index f24aeee110f1..a3302675ec2b 100644
--- a/README
+++ b/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/crc32.c b/crc32.c
index 1acc7ed8e49f..6b81fb4a1ca6 100644
--- a/crc32.c
+++ b/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/deflate.c b/deflate.c
index fcd698cc62f8..b7fb9fc69823 100644
--- a/deflate.c
+++ b/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/gzguts.h b/gzguts.h
index 0e7ed4330a50..53857e0a42b2 100644
--- a/gzguts.h
+++ b/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/gzlib.c b/gzlib.c
index 6fdb08a81453..15999aee8b5a 100644
--- a/gzlib.c
+++ b/gzlib.c
@@ -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, 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/gzread.c b/gzread.c
index 434ef023e0a7..548201ab0099 100644
--- a/gzread.c
+++ b/gzread.c
@@ -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;
}
diff --git a/inftrees.c b/inftrees.c
index ccf7fa965f61..90de8b87f25a 100644
--- a/inftrees.c
+++ b/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/minigzip.c b/minigzip.c
index 84d823b72f9c..9677fa07f630 100644
--- a/minigzip.c
+++ b/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/zconf.h b/zconf.h
index 58880245c1e7..6ad8a04edaee 100644
--- a/zconf.h
+++ b/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,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
diff --git a/zlib.3 b/zlib.3
index 52999c70493b..2c1679d7b27c 100644
--- a/zlib.3
+++ b/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/zlib.h b/zlib.h
index f5785be7e0be..1fcf6300cc2b 100644
--- a/zlib.h
+++ b/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,7 +1556,7 @@ 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));
@@ -1565,14 +1565,14 @@ ZEXTERN int ZEXPORT inflateBackInit_ OF((z_streamp strm, int windowBits,
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));
diff --git a/zutil.c b/zutil.c
index 98a55a883844..6ba16f68c234 100644
--- a/zutil.c
+++ b/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/zutil.h b/zutil.h
index 025035dbe9c7..b21a19cc0439 100644
--- a/zutil.h
+++ b/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)