Skip to content

Commit 7301420

Browse files
committed
zlib 1.2.4.5
1 parent a7d7066 commit 7301420

31 files changed

+119
-106
lines changed

ChangeLog

+10-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,16 @@
11

22
ChangeLog file for zlib
33

4+
Changes in 1.2.4.5 (18 Apr 2010)
5+
- Set sharedlibdir in configure [Torok]
6+
- Set LDFLAGS in Makefile.in [Bar-Lev]
7+
- Avoid mkdir objs race condition in Makefile.in [Bowler]
8+
- Add ZLIB_INTERNAL in front of internal inter-module functions and arrays
9+
- Define ZLIB_INTERNAL to hide internal functions and arrays for GNU C
10+
- Don't use hidden attribute when it is a warning generator (e.g. Solaris)
11+
412
Changes in 1.2.4.4 (18 Apr 2010)
5-
- Fix CROSS_PREFIX executable testing, CHOST extract, mingw* [T�r�k]
13+
- Fix CROSS_PREFIX executable testing, CHOST extract, mingw* [Torok]
614
- Undefine _LARGEFILE64_SOURCE in zconf.h if it is zero, but not if empty
715
- Try to use bash or ksh regardless of functionality of /bin/sh
816
- Fix configure incompatibility with NetBSD sh
@@ -162,7 +170,7 @@ Changes in 1.2.3.6 (17 Jan 2010)
162170
- Correct email address in configure for system options
163171
- Update make_vms.com and add make_vms.com to contrib/minizip [Zinser]
164172
- Update zlib.map [Brown]
165-
- Fix Makefile.in for Solaris 10 make of example64 and minizip64 [T�r�k]
173+
- Fix Makefile.in for Solaris 10 make of example64 and minizip64 [Torok]
166174
- Apply various fixes to CMakeLists.txt [Lowman]
167175
- Add checks on len in gzread() and gzwrite()
168176
- Add error message for no more room for gzungetc()

Makefile.in

+3-3
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,14 @@ CFLAGS=-O
2525
# -Wstrict-prototypes -Wmissing-prototypes
2626

2727
SFLAGS=-O
28-
28+
LDFLAGS=
2929
TEST_LDFLAGS=-L. libz.a
3030
LDSHARED=$(CC)
3131
CPP=$(CC) -E
3232

3333
STATICLIB=libz.a
3434
SHAREDLIB=libz.so
35-
SHAREDLIBV=libz.so.1.2.4.4
35+
SHAREDLIBV=libz.so.1.2.4.5
3636
SHAREDLIBM=libz.so.1
3737
LIBS=$(STATICLIB) $(SHAREDLIBV)
3838

@@ -132,7 +132,7 @@ minigzip64.o: minigzip.c zlib.h zconf.h
132132
.SUFFIXES: .lo
133133

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

README

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
ZLIB DATA COMPRESSION LIBRARY
22

3-
zlib 1.2.4.4 is a general purpose data compression library. All the code is
3+
zlib 1.2.4.5 is a general purpose data compression library. All the code is
44
thread safe. The data format used by the zlib library is described by RFCs
55
(Request for Comments) 1950 to 1952 in the files
66
http://www.ietf.org/rfc/rfc1950.txt (zlib format), rfc1951.txt (deflate format)
@@ -31,7 +31,7 @@ Mark Nelson <[email protected]> wrote an article about zlib for the Jan. 1997
3131
issue of Dr. Dobb's Journal; a copy of the article is available at
3232
http://marknelson.us/1997/01/01/zlib-engine/ .
3333

34-
The changes made in version 1.2.4.4 are documented in the file ChangeLog.
34+
The changes made in version 1.2.4.5 are documented in the file ChangeLog.
3535

3636
Unsupported third party contributions are provided in directory contrib/ .
3737

configure

+18-11
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
# an error.
1515

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

@@ -49,6 +49,7 @@ LDSHAREDLIBC="${LDSHAREDLIBC--lc}"
4949
prefix=${prefix-/usr/local}
5050
exec_prefix=${exec_prefix-'${prefix}'}
5151
libdir=${libdir-'${exec_prefix}/lib'}
52+
sharedlibdir=${sharedlibdir-'${exec_prefix}/lib'}
5253
includedir=${includedir-'${prefix}/include'}
5354
mandir=${mandir-'${prefix}/share/man'}
5455
shared_ext='.so'
@@ -147,6 +148,7 @@ if test "$gcc" -eq 1 && ($cc -c $cflags $test.c) 2>/dev/null; then
147148
else
148149
# find system name and corresponding cc options
149150
CC=${CC-cc}
151+
gcc=0
150152
if test -z "$uname"; then
151153
uname=`(uname -sr || echo unknown) 2>/dev/null`
152154
fi
@@ -504,21 +506,26 @@ EOF
504506
fi
505507
fi
506508

507-
cat > $test.c <<EOF
508-
int foo __attribute__ ((visibility ("hidden")));
509+
if test "$gcc" -eq 1; then
510+
cat > $test.c <<EOF
511+
#if ((__GNUC__-0) * 10 + __GNUC_MINOR__-0 >= 33)
512+
# define ZLIB_INTERNAL __attribute__((visibility ("hidden")))
513+
#else
514+
# define ZLIB_INTERNAL
515+
#endif
516+
int ZLIB_INTERNAL foo;
509517
int main()
510518
{
511519
return 0;
512520
}
513521
EOF
514-
if test "`($CC -c -fvisibility=hidden $CFLAGS $test.c) 2>&1`" = ""; then
515-
CFLAGS="$CFLAGS -fvisibility=hidden"
516-
SFLAGS="$SFLAGS -fvisibility=hidden"
517-
echo "Checking for attribute(visibility) support... Yes."
518-
else
519-
CFLAGS="$CFLAGS -DNO_VIZ"
520-
SFLAGS="$SFLAGS -DNO_VIZ"
521-
echo "Checking for attribute(visibility) support... No."
522+
if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then
523+
echo "Checking for attribute(visibility) support... Yes."
524+
else
525+
CFLAGS="$CFLAGS -DNO_VIZ"
526+
SFLAGS="$SFLAGS -DNO_VIZ"
527+
echo "Checking for attribute(visibility) support... No."
528+
fi
522529
fi
523530

524531
CPP=${CPP-"$CC -E"}

contrib/delphi/ZLib.pas

+1-1
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ procedure DecompressToUserBuf(const InBuf: Pointer; InBytes: Integer;
152152
const OutBuf: Pointer; BufSize: Integer);
153153

154154
const
155-
zlib_version = '1.2.4.4';
155+
zlib_version = '1.2.4.5';
156156

157157
type
158158
EZlibError = class(Exception);

contrib/dotzlib/DotZLib/UnitTests.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ public class InfoTests
156156
public void Info_Version()
157157
{
158158
Info info = new Info();
159-
Assert.AreEqual("1.2.4.4", Info.Version);
159+
Assert.AreEqual("1.2.4.5", Info.Version);
160160
Assert.AreEqual(32, info.SizeOfUInt);
161161
Assert.AreEqual(32, info.SizeOfULong);
162162
Assert.AreEqual(32, info.SizeOfPointer);

contrib/infback9/inftree9.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#define MAXBITS 15
1010

1111
const char inflate9_copyright[] =
12-
" inflate9 1.2.4.4 Copyright 1995-2010 Mark Adler ";
12+
" inflate9 1.2.4.5 Copyright 1995-2010 Mark Adler ";
1313
/*
1414
If you use the zlib library in a product, an acknowledgment is welcome
1515
in the documentation of your product. If for some reason you cannot
@@ -64,7 +64,7 @@ unsigned short FAR *work;
6464
static const unsigned short lext[31] = { /* Length codes 257..285 extra */
6565
128, 128, 128, 128, 128, 128, 128, 128, 129, 129, 129, 129,
6666
130, 130, 130, 130, 131, 131, 131, 131, 132, 132, 132, 132,
67-
133, 133, 133, 133, 144, 74, 65};
67+
133, 133, 133, 133, 144, 75, 75};
6868
static const unsigned short dbase[32] = { /* Distance codes 0..31 base */
6969
1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49,
7070
65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073,

contrib/pascal/zlibpas.pas

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
interface
1111

1212
const
13-
ZLIB_VERSION = '1.2.4.4';
13+
ZLIB_VERSION = '1.2.4.5';
1414

1515
type
1616
alloc_func = function(opaque: Pointer; items, size: Integer): Pointer;

contrib/vstudio/vc10/zlib.rc

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
#define IDR_VERSION1 1
44
IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE
5-
FILEVERSION 1,2,4,4
6-
PRODUCTVERSION 1,2,4,4
5+
FILEVERSION 1,2,4,5
6+
PRODUCTVERSION 1,2,4,5
77
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
88
FILEFLAGS 0
99
FILEOS VOS_DOS_WINDOWS32
@@ -17,7 +17,7 @@ BEGIN
1717

1818
BEGIN
1919
VALUE "FileDescription", "zlib data compression and ZIP file I/O library\0"
20-
VALUE "FileVersion", "1.2.4.4\0"
20+
VALUE "FileVersion", "1.2.4.5\0"
2121
VALUE "InternalName", "zlib\0"
2222
VALUE "OriginalFilename", "zlib.dll\0"
2323
VALUE "ProductName", "ZLib.DLL\0"

contrib/vstudio/vc9/zlib.rc

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
#define IDR_VERSION1 1
44
IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE
5-
FILEVERSION 1,2,4,4
6-
PRODUCTVERSION 1,2,4,4
5+
FILEVERSION 1,2,4,5
6+
PRODUCTVERSION 1,2,4,5
77
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
88
FILEFLAGS 0
99
FILEOS VOS_DOS_WINDOWS32
@@ -17,7 +17,7 @@ BEGIN
1717

1818
BEGIN
1919
VALUE "FileDescription", "zlib data compression and ZIP file I/O library\0"
20-
VALUE "FileVersion", "1.2.4.4\0"
20+
VALUE "FileVersion", "1.2.4.5\0"
2121
VALUE "InternalName", "zlib\0"
2222
VALUE "OriginalFilename", "zlib.dll\0"
2323
VALUE "ProductName", "ZLib.DLL\0"

deflate.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
#include "deflate.h"
5353

5454
const char deflate_copyright[] =
55-
" deflate 1.2.4.4 Copyright 1995-2010 Jean-loup Gailly and Mark Adler ";
55+
" deflate 1.2.4.5 Copyright 1995-2010 Jean-loup Gailly and Mark Adler ";
5656
/*
5757
If you use the zlib library in a product, an acknowledgment is welcome
5858
in the documentation of your product. If for some reason you cannot

deflate.h

+11-11
Original file line numberDiff line numberDiff line change
@@ -290,13 +290,13 @@ typedef struct internal_state {
290290
memory checker errors from longest match routines */
291291

292292
/* in trees.c */
293-
void _tr_init OF((deflate_state *s));
294-
int _tr_tally OF((deflate_state *s, unsigned dist, unsigned lc));
295-
void _tr_flush_block OF((deflate_state *s, charf *buf, ulg stored_len,
296-
int last));
297-
void _tr_align OF((deflate_state *s));
298-
void _tr_stored_block OF((deflate_state *s, charf *buf, ulg stored_len,
299-
int last));
293+
void ZLIB_INTERNAL _tr_init OF((deflate_state *s));
294+
int ZLIB_INTERNAL _tr_tally OF((deflate_state *s, unsigned dist, unsigned lc));
295+
void ZLIB_INTERNAL _tr_flush_block OF((deflate_state *s, charf *buf,
296+
ulg stored_len, int last));
297+
void ZLIB_INTERNAL _tr_align OF((deflate_state *s));
298+
void ZLIB_INTERNAL _tr_stored_block OF((deflate_state *s, charf *buf,
299+
ulg stored_len, int last));
300300

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

311311
#if defined(GEN_TREES_H) || !defined(STDC)
312-
extern uch _length_code[];
313-
extern uch _dist_code[];
312+
extern uch ZLIB_INTERNAL _length_code[];
313+
extern uch ZLIB_INTERNAL _dist_code[];
314314
#else
315-
extern const uch _length_code[];
316-
extern const uch _dist_code[];
315+
extern const uch ZLIB_INTERNAL _length_code[];
316+
extern const uch ZLIB_INTERNAL _dist_code[];
317317
#endif
318318

319319
# define _tr_tally_lit(s, c, flush) \

gzguts.h

+8-4
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,11 @@
1212
# endif
1313
#endif
1414

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

1721
#include <stdio.h>
1822
#include "zlib.h"
@@ -112,9 +116,9 @@ typedef struct {
112116
typedef gz_state FAR *gz_statep;
113117

114118
/* shared functions */
115-
ZEXTERN void ZEXPORT gz_error OF((gz_statep, int, const char *));
119+
void ZLIB_INTERNAL gz_error OF((gz_statep, int, const char *));
116120
#if defined UNDER_CE
117-
ZEXTERN char ZEXPORT *gz_strwinerror OF((DWORD error));
121+
char ZLIB_INTERNAL *gz_strwinerror OF((DWORD error));
118122
#endif
119123

120124
/* GT_OFF(x), where x is an unsigned value, is true if x > maximum z_off64_t
@@ -123,6 +127,6 @@ ZEXTERN char ZEXPORT *gz_strwinerror OF((DWORD error));
123127
#ifdef INT_MAX
124128
# define GT_OFF(x) (sizeof(int) == sizeof(z_off64_t) && (x) > INT_MAX)
125129
#else
126-
ZEXTERN unsigned ZEXPORT gz_intmax OF((void));
130+
unsigned ZLIB_INTERNAL gz_intmax OF((void));
127131
# define GT_OFF(x) (sizeof(int) == sizeof(z_off64_t) && (x) > gz_intmax())
128132
#endif

gzlib.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ local gzFile gz_open OF((const char *, int, const char *));
2626
2727
The gz_strwinerror function does not change the current setting of
2828
GetLastError. */
29-
char ZEXPORT *gz_strwinerror (error)
29+
char ZLIB_INTERNAL *gz_strwinerror (error)
3030
DWORD error;
3131
{
3232
static char buf[1024];
@@ -482,7 +482,7 @@ void ZEXPORT gzclearerr(file)
482482
memory). Simply save the error message as a static string. If there is an
483483
allocation failure constructing the error message, then convert the error to
484484
out of memory. */
485-
void ZEXPORT gz_error(state, err, msg)
485+
void ZLIB_INTERNAL gz_error(state, err, msg)
486486
gz_statep state;
487487
int err;
488488
const char *msg;
@@ -522,7 +522,7 @@ void ZEXPORT gz_error(state, err, msg)
522522
available) -- we need to do this to cover cases where 2's complement not
523523
used, since C standard permits 1's complement and sign-bit representations,
524524
otherwise we could just use ((unsigned)-1) >> 1 */
525-
unsigned ZEXPORT gz_intmax()
525+
unsigned ZLIB_INTERNAL gz_intmax()
526526
{
527527
unsigned p, q;
528528

inffast.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
requires strm->avail_out >= 258 for each loop to avoid checking for
6565
output space.
6666
*/
67-
void inflate_fast(strm, start)
67+
void ZLIB_INTERNAL inflate_fast(strm, start)
6868
z_streamp strm;
6969
unsigned start; /* inflate()'s starting value for strm->avail_out */
7070
{

inffast.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@
88
subject to change. Applications should only use zlib.h.
99
*/
1010

11-
void inflate_fast OF((z_streamp strm, unsigned start));
11+
void ZLIB_INTERNAL inflate_fast OF((z_streamp strm, unsigned start));

inftrees.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#define MAXBITS 15
1010

1111
const char inflate_copyright[] =
12-
" inflate 1.2.4.4 Copyright 1995-2010 Mark Adler ";
12+
" inflate 1.2.4.5 Copyright 1995-2010 Mark Adler ";
1313
/*
1414
If you use the zlib library in a product, an acknowledgment is welcome
1515
in the documentation of your product. If for some reason you cannot
@@ -29,7 +29,7 @@ const char inflate_copyright[] =
2929
table index bits. It will differ if the request is greater than the
3030
longest code or if it is less than the shortest code.
3131
*/
32-
int inflate_table(type, lens, codes, table, bits, work)
32+
int ZLIB_INTERNAL inflate_table(type, lens, codes, table, bits, work)
3333
codetype type;
3434
unsigned short FAR *lens;
3535
unsigned codes;
@@ -62,7 +62,7 @@ unsigned short FAR *work;
6262
35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0};
6363
static const unsigned short lext[31] = { /* Length codes 257..285 extra */
6464
16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18,
65-
19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 74, 65};
65+
19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 75, 75};
6666
static const unsigned short dbase[32] = { /* Distance codes 0..29 base */
6767
1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193,
6868
257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145,

inftrees.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,6 @@ typedef enum {
5757
DISTS
5858
} codetype;
5959

60-
extern int inflate_table OF((codetype type, unsigned short FAR *lens,
60+
int ZLIB_INTERNAL inflate_table OF((codetype type, unsigned short FAR *lens,
6161
unsigned codes, code FAR * FAR *table,
6262
unsigned FAR *bits, unsigned short FAR *work));

qnx/package.qpg

+5-5
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@
2525
<QPG:Files>
2626
<QPG:Add file="../zconf.h" install="/opt/include/" user="root:sys" permission="644"/>
2727
<QPG:Add file="../zlib.h" install="/opt/include/" user="root:sys" permission="644"/>
28-
<QPG:Add file="../libz.so.1.2.4.4" install="/opt/lib/" user="root:bin" permission="644"/>
29-
<QPG:Add file="libz.so" install="/opt/lib/" component="dev" filetype="symlink" linkto="libz.so.1.2.4.4"/>
30-
<QPG:Add file="libz.so.1" install="/opt/lib/" filetype="symlink" linkto="libz.so.1.2.4.4"/>
31-
<QPG:Add file="../libz.so.1.2.4.4" install="/opt/lib/" component="slib"/>
28+
<QPG:Add file="../libz.so.1.2.4.5" install="/opt/lib/" user="root:bin" permission="644"/>
29+
<QPG:Add file="libz.so" install="/opt/lib/" component="dev" filetype="symlink" linkto="libz.so.1.2.4.5"/>
30+
<QPG:Add file="libz.so.1" install="/opt/lib/" filetype="symlink" linkto="libz.so.1.2.4.5"/>
31+
<QPG:Add file="../libz.so.1.2.4.5" install="/opt/lib/" component="slib"/>
3232
</QPG:Files>
3333

3434
<QPG:PackageFilter>
@@ -63,7 +63,7 @@
6363
</QPM:ProductDescription>
6464

6565
<QPM:ReleaseDescription>
66-
<QPM:ReleaseVersion>1.2.4.4</QPM:ReleaseVersion>
66+
<QPM:ReleaseVersion>1.2.4.5</QPM:ReleaseVersion>
6767
<QPM:ReleaseUrgency>Medium</QPM:ReleaseUrgency>
6868
<QPM:ReleaseStability>Stable</QPM:ReleaseStability>
6969
<QPM:ReleaseNoteMinor></QPM:ReleaseNoteMinor>

0 commit comments

Comments
 (0)