Skip to content

Commit

Permalink
zlib 1.2.4.5
Browse files Browse the repository at this point in the history
  • Loading branch information
madler committed Sep 10, 2011
1 parent a7d7066 commit 7301420
Show file tree
Hide file tree
Showing 31 changed files with 119 additions and 106 deletions.
12 changes: 10 additions & 2 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@

ChangeLog file for zlib

Changes in 1.2.4.5 (18 Apr 2010)
- Set sharedlibdir in configure [Torok]
- Set LDFLAGS in Makefile.in [Bar-Lev]
- Avoid mkdir objs race condition in Makefile.in [Bowler]
- Add ZLIB_INTERNAL in front of internal inter-module functions and arrays
- Define ZLIB_INTERNAL to hide internal functions and arrays for GNU C
- Don't use hidden attribute when it is a warning generator (e.g. Solaris)

Changes in 1.2.4.4 (18 Apr 2010)
- Fix CROSS_PREFIX executable testing, CHOST extract, mingw* [T�r�k]
- Fix CROSS_PREFIX executable testing, CHOST extract, mingw* [Torok]
- Undefine _LARGEFILE64_SOURCE in zconf.h if it is zero, but not if empty
- Try to use bash or ksh regardless of functionality of /bin/sh
- Fix configure incompatibility with NetBSD sh
Expand Down Expand Up @@ -162,7 +170,7 @@ Changes in 1.2.3.6 (17 Jan 2010)
- Correct email address in configure for system options
- Update make_vms.com and add make_vms.com to contrib/minizip [Zinser]
- Update zlib.map [Brown]
- Fix Makefile.in for Solaris 10 make of example64 and minizip64 [T�r�k]
- Fix Makefile.in for Solaris 10 make of example64 and minizip64 [Torok]
- Apply various fixes to CMakeLists.txt [Lowman]
- Add checks on len in gzread() and gzwrite()
- Add error message for no more room for gzungetc()
Expand Down
6 changes: 3 additions & 3 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ CFLAGS=-O
# -Wstrict-prototypes -Wmissing-prototypes

SFLAGS=-O

LDFLAGS=
TEST_LDFLAGS=-L. libz.a
LDSHARED=$(CC)
CPP=$(CC) -E

STATICLIB=libz.a
SHAREDLIB=libz.so
SHAREDLIBV=libz.so.1.2.4.4
SHAREDLIBV=libz.so.1.2.4.5
SHAREDLIBM=libz.so.1
LIBS=$(STATICLIB) $(SHAREDLIBV)

Expand Down Expand Up @@ -132,7 +132,7 @@ minigzip64.o: minigzip.c zlib.h zconf.h
.SUFFIXES: .lo

.c.lo:
-@if [ ! -d objs ]; then mkdir objs; fi
-@mkdir objs 2>/dev/null || test -d objs
$(CC) $(SFLAGS) -DPIC -c -o objs/$*.o $<
-@mv objs/$*.o $@

Expand Down
4 changes: 2 additions & 2 deletions README
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ZLIB DATA COMPRESSION LIBRARY

zlib 1.2.4.4 is a general purpose data compression library. All the code is
zlib 1.2.4.5 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)
Expand Down Expand Up @@ -31,7 +31,7 @@ Mark Nelson <[email protected]> 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.4 are documented in the file ChangeLog.
The changes made in version 1.2.4.5 are documented in the file ChangeLog.

Unsupported third party contributions are provided in directory contrib/ .

Expand Down
29 changes: 18 additions & 11 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# an error.

if [ -n "${CHOST}" ]; then
uname="$(echo "${CHOST}" | sed -e 's/.*-.*-\(.*\)-.*$/\1/' -e 's/.*-\(.*\)-.*/\1/' -e 's/.*-\(.*\)$/\1/')"
uname="$(echo "${CHOST}" | sed -e 's/^[^-]*-\([^-]*\)$/\1/' -e 's/^[^-]*-[^-]*-\([^-]*\)$/\1/' -e 's/^[^-]*-[^-]*-\([^-]*\)-.*$/\1/')"
CROSS_PREFIX="${CHOST}-"
fi

Expand Down Expand Up @@ -49,6 +49,7 @@ LDSHAREDLIBC="${LDSHAREDLIBC--lc}"
prefix=${prefix-/usr/local}
exec_prefix=${exec_prefix-'${prefix}'}
libdir=${libdir-'${exec_prefix}/lib'}
sharedlibdir=${sharedlibdir-'${exec_prefix}/lib'}
includedir=${includedir-'${prefix}/include'}
mandir=${mandir-'${prefix}/share/man'}
shared_ext='.so'
Expand Down Expand Up @@ -147,6 +148,7 @@ if test "$gcc" -eq 1 && ($cc -c $cflags $test.c) 2>/dev/null; then
else
# find system name and corresponding cc options
CC=${CC-cc}
gcc=0
if test -z "$uname"; then
uname=`(uname -sr || echo unknown) 2>/dev/null`
fi
Expand Down Expand Up @@ -504,21 +506,26 @@ EOF
fi
fi

cat > $test.c <<EOF
int foo __attribute__ ((visibility ("hidden")));
if test "$gcc" -eq 1; then
cat > $test.c <<EOF
#if ((__GNUC__-0) * 10 + __GNUC_MINOR__-0 >= 33)
# define ZLIB_INTERNAL __attribute__((visibility ("hidden")))
#else
# define ZLIB_INTERNAL
#endif
int ZLIB_INTERNAL foo;
int main()
{
return 0;
}
EOF
if test "`($CC -c -fvisibility=hidden $CFLAGS $test.c) 2>&1`" = ""; then
CFLAGS="$CFLAGS -fvisibility=hidden"
SFLAGS="$SFLAGS -fvisibility=hidden"
echo "Checking for attribute(visibility) support... Yes."
else
CFLAGS="$CFLAGS -DNO_VIZ"
SFLAGS="$SFLAGS -DNO_VIZ"
echo "Checking for attribute(visibility) support... No."
if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then
echo "Checking for attribute(visibility) support... Yes."
else
CFLAGS="$CFLAGS -DNO_VIZ"
SFLAGS="$SFLAGS -DNO_VIZ"
echo "Checking for attribute(visibility) support... No."
fi
fi

CPP=${CPP-"$CC -E"}
Expand Down
2 changes: 1 addition & 1 deletion contrib/delphi/ZLib.pas
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ procedure DecompressToUserBuf(const InBuf: Pointer; InBytes: Integer;
const OutBuf: Pointer; BufSize: Integer);

const
zlib_version = '1.2.4.4';
zlib_version = '1.2.4.5';

type
EZlibError = class(Exception);
Expand Down
2 changes: 1 addition & 1 deletion contrib/dotzlib/DotZLib/UnitTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ public class InfoTests
public void Info_Version()
{
Info info = new Info();
Assert.AreEqual("1.2.4.4", Info.Version);
Assert.AreEqual("1.2.4.5", Info.Version);
Assert.AreEqual(32, info.SizeOfUInt);
Assert.AreEqual(32, info.SizeOfULong);
Assert.AreEqual(32, info.SizeOfPointer);
Expand Down
4 changes: 2 additions & 2 deletions contrib/infback9/inftree9.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#define MAXBITS 15

const char inflate9_copyright[] =
" inflate9 1.2.4.4 Copyright 1995-2010 Mark Adler ";
" inflate9 1.2.4.5 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
Expand Down Expand Up @@ -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, 74, 65};
133, 133, 133, 133, 144, 75, 75};
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,
Expand Down
2 changes: 1 addition & 1 deletion contrib/pascal/zlibpas.pas
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
interface

const
ZLIB_VERSION = '1.2.4.4';
ZLIB_VERSION = '1.2.4.5';

type
alloc_func = function(opaque: Pointer; items, size: Integer): Pointer;
Expand Down
6 changes: 3 additions & 3 deletions contrib/vstudio/vc10/zlib.rc
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

#define IDR_VERSION1 1
IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE
FILEVERSION 1,2,4,4
PRODUCTVERSION 1,2,4,4
FILEVERSION 1,2,4,5
PRODUCTVERSION 1,2,4,5
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
FILEFLAGS 0
FILEOS VOS_DOS_WINDOWS32
Expand All @@ -17,7 +17,7 @@ BEGIN

BEGIN
VALUE "FileDescription", "zlib data compression and ZIP file I/O library\0"
VALUE "FileVersion", "1.2.4.4\0"
VALUE "FileVersion", "1.2.4.5\0"
VALUE "InternalName", "zlib\0"
VALUE "OriginalFilename", "zlib.dll\0"
VALUE "ProductName", "ZLib.DLL\0"
Expand Down
6 changes: 3 additions & 3 deletions contrib/vstudio/vc9/zlib.rc
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

#define IDR_VERSION1 1
IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE
FILEVERSION 1,2,4,4
PRODUCTVERSION 1,2,4,4
FILEVERSION 1,2,4,5
PRODUCTVERSION 1,2,4,5
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
FILEFLAGS 0
FILEOS VOS_DOS_WINDOWS32
Expand All @@ -17,7 +17,7 @@ BEGIN

BEGIN
VALUE "FileDescription", "zlib data compression and ZIP file I/O library\0"
VALUE "FileVersion", "1.2.4.4\0"
VALUE "FileVersion", "1.2.4.5\0"
VALUE "InternalName", "zlib\0"
VALUE "OriginalFilename", "zlib.dll\0"
VALUE "ProductName", "ZLib.DLL\0"
Expand Down
2 changes: 1 addition & 1 deletion deflate.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
#include "deflate.h"

const char deflate_copyright[] =
" deflate 1.2.4.4 Copyright 1995-2010 Jean-loup Gailly and Mark Adler ";
" deflate 1.2.4.5 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
Expand Down
22 changes: 11 additions & 11 deletions deflate.h
Original file line number Diff line number Diff line change
Expand Up @@ -290,13 +290,13 @@ typedef struct internal_state {
memory checker errors from longest match routines */

/* in trees.c */
void _tr_init OF((deflate_state *s));
int _tr_tally OF((deflate_state *s, unsigned dist, unsigned lc));
void _tr_flush_block OF((deflate_state *s, charf *buf, ulg stored_len,
int last));
void _tr_align OF((deflate_state *s));
void _tr_stored_block OF((deflate_state *s, charf *buf, ulg stored_len,
int last));
void ZLIB_INTERNAL _tr_init OF((deflate_state *s));
int ZLIB_INTERNAL _tr_tally OF((deflate_state *s, unsigned dist, unsigned lc));
void ZLIB_INTERNAL _tr_flush_block OF((deflate_state *s, charf *buf,
ulg stored_len, int last));
void ZLIB_INTERNAL _tr_align OF((deflate_state *s));
void ZLIB_INTERNAL _tr_stored_block OF((deflate_state *s, charf *buf,
ulg stored_len, int last));

#define d_code(dist) \
((dist) < 256 ? _dist_code[dist] : _dist_code[256+((dist)>>7)])
Expand All @@ -309,11 +309,11 @@ void _tr_stored_block OF((deflate_state *s, charf *buf, ulg stored_len,
/* Inline versions of _tr_tally for speed: */

#if defined(GEN_TREES_H) || !defined(STDC)
extern uch _length_code[];
extern uch _dist_code[];
extern uch ZLIB_INTERNAL _length_code[];
extern uch ZLIB_INTERNAL _dist_code[];
#else
extern const uch _length_code[];
extern const uch _dist_code[];
extern const uch ZLIB_INTERNAL _length_code[];
extern const uch ZLIB_INTERNAL _dist_code[];
#endif

# define _tr_tally_lit(s, c, flush) \
Expand Down
12 changes: 8 additions & 4 deletions gzguts.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@
# endif
#endif

#define ZLIB_INTERNAL
#if ((__GNUC__-0) * 10 + __GNUC_MINOR__-0 >= 33) && !defined(NO_VIZ)
# define ZLIB_INTERNAL __attribute__((visibility ("hidden")))
#else
# define ZLIB_INTERNAL
#endif

#include <stdio.h>
#include "zlib.h"
Expand Down Expand Up @@ -112,9 +116,9 @@ typedef struct {
typedef gz_state FAR *gz_statep;

/* shared functions */
ZEXTERN void ZEXPORT gz_error OF((gz_statep, int, const char *));
void ZLIB_INTERNAL gz_error OF((gz_statep, int, const char *));
#if defined UNDER_CE
ZEXTERN char ZEXPORT *gz_strwinerror OF((DWORD error));
char ZLIB_INTERNAL *gz_strwinerror OF((DWORD error));
#endif

/* GT_OFF(x), where x is an unsigned value, is true if x > maximum z_off64_t
Expand All @@ -123,6 +127,6 @@ ZEXTERN char ZEXPORT *gz_strwinerror OF((DWORD error));
#ifdef INT_MAX
# define GT_OFF(x) (sizeof(int) == sizeof(z_off64_t) && (x) > INT_MAX)
#else
ZEXTERN unsigned ZEXPORT gz_intmax OF((void));
unsigned ZLIB_INTERNAL gz_intmax OF((void));
# define GT_OFF(x) (sizeof(int) == sizeof(z_off64_t) && (x) > gz_intmax())
#endif
6 changes: 3 additions & 3 deletions gzlib.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ local gzFile gz_open OF((const char *, int, const char *));
The gz_strwinerror function does not change the current setting of
GetLastError. */
char ZEXPORT *gz_strwinerror (error)
char ZLIB_INTERNAL *gz_strwinerror (error)
DWORD error;
{
static char buf[1024];
Expand Down Expand Up @@ -482,7 +482,7 @@ void ZEXPORT gzclearerr(file)
memory). Simply save the error message as a static string. If there is an
allocation failure constructing the error message, then convert the error to
out of memory. */
void ZEXPORT gz_error(state, err, msg)
void ZLIB_INTERNAL gz_error(state, err, msg)
gz_statep state;
int err;
const char *msg;
Expand Down Expand Up @@ -522,7 +522,7 @@ void ZEXPORT gz_error(state, err, msg)
available) -- we need to do this to cover cases where 2's complement not
used, since C standard permits 1's complement and sign-bit representations,
otherwise we could just use ((unsigned)-1) >> 1 */
unsigned ZEXPORT gz_intmax()
unsigned ZLIB_INTERNAL gz_intmax()
{
unsigned p, q;

Expand Down
2 changes: 1 addition & 1 deletion inffast.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
requires strm->avail_out >= 258 for each loop to avoid checking for
output space.
*/
void inflate_fast(strm, start)
void ZLIB_INTERNAL inflate_fast(strm, start)
z_streamp strm;
unsigned start; /* inflate()'s starting value for strm->avail_out */
{
Expand Down
2 changes: 1 addition & 1 deletion inffast.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@
subject to change. Applications should only use zlib.h.
*/

void inflate_fast OF((z_streamp strm, unsigned start));
void ZLIB_INTERNAL inflate_fast OF((z_streamp strm, unsigned start));
6 changes: 3 additions & 3 deletions inftrees.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#define MAXBITS 15

const char inflate_copyright[] =
" inflate 1.2.4.4 Copyright 1995-2010 Mark Adler ";
" inflate 1.2.4.5 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
Expand All @@ -29,7 +29,7 @@ const char inflate_copyright[] =
table index bits. It will differ if the request is greater than the
longest code or if it is less than the shortest code.
*/
int inflate_table(type, lens, codes, table, bits, work)
int ZLIB_INTERNAL inflate_table(type, lens, codes, table, bits, work)
codetype type;
unsigned short FAR *lens;
unsigned codes;
Expand Down Expand Up @@ -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, 74, 65};
19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 75, 75};
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,
Expand Down
2 changes: 1 addition & 1 deletion inftrees.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,6 @@ typedef enum {
DISTS
} codetype;

extern int inflate_table OF((codetype type, unsigned short FAR *lens,
int ZLIB_INTERNAL inflate_table OF((codetype type, unsigned short FAR *lens,
unsigned codes, code FAR * FAR *table,
unsigned FAR *bits, unsigned short FAR *work));
10 changes: 5 additions & 5 deletions qnx/package.qpg
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@
<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.4" 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.4"/>
<QPG:Add file="libz.so.1" install="/opt/lib/" filetype="symlink" linkto="libz.so.1.2.4.4"/>
<QPG:Add file="../libz.so.1.2.4.4" install="/opt/lib/" component="slib"/>
<QPG:Add file="../libz.so.1.2.4.5" 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.5"/>
<QPG:Add file="libz.so.1" install="/opt/lib/" filetype="symlink" linkto="libz.so.1.2.4.5"/>
<QPG:Add file="../libz.so.1.2.4.5" install="/opt/lib/" component="slib"/>
</QPG:Files>

<QPG:PackageFilter>
Expand Down Expand Up @@ -63,7 +63,7 @@
</QPM:ProductDescription>

<QPM:ReleaseDescription>
<QPM:ReleaseVersion>1.2.4.4</QPM:ReleaseVersion>
<QPM:ReleaseVersion>1.2.4.5</QPM:ReleaseVersion>
<QPM:ReleaseUrgency>Medium</QPM:ReleaseUrgency>
<QPM:ReleaseStability>Stable</QPM:ReleaseStability>
<QPM:ReleaseNoteMinor></QPM:ReleaseNoteMinor>
Expand Down
Loading

0 comments on commit 7301420

Please sign in to comment.