summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Adler <madler@alumni.caltech.edu>2011-09-09 23:34:55 -0700
committerMark Adler <madler@alumni.caltech.edu>2011-09-09 23:34:55 -0700
commit73014202489f913dbffc91d22089ea8a8920c054 (patch)
tree0d86e58ff1445b54be2a04939903f0b6b51f4184
parenta7d70663cf4a7d4013ff7d285da01a164ed9b207 (diff)
downloadzlib-73014202489f913dbffc91d22089ea8a8920c054.tar.gz
zlib-73014202489f913dbffc91d22089ea8a8920c054.tar.bz2
zlib-73014202489f913dbffc91d22089ea8a8920c054.zip
zlib 1.2.4.5v1.2.4.5
-rw-r--r--ChangeLog12
-rw-r--r--Makefile.in6
-rw-r--r--README4
-rwxr-xr-xconfigure29
-rw-r--r--contrib/delphi/ZLib.pas2
-rw-r--r--contrib/dotzlib/DotZLib/UnitTests.cs2
-rw-r--r--contrib/infback9/inftree9.c4
-rw-r--r--contrib/pascal/zlibpas.pas2
-rw-r--r--contrib/vstudio/vc10/zlib.rc6
-rw-r--r--contrib/vstudio/vc9/zlib.rc6
-rw-r--r--deflate.c2
-rw-r--r--deflate.h22
-rw-r--r--gzguts.h12
-rw-r--r--gzlib.c6
-rw-r--r--inffast.c2
-rw-r--r--inffast.h2
-rw-r--r--inftrees.c6
-rw-r--r--inftrees.h2
-rw-r--r--qnx/package.qpg10
-rw-r--r--treebuild.xml4
-rw-r--r--trees.c10
-rw-r--r--trees.h4
-rw-r--r--win32/Makefile.gcc4
-rw-r--r--zconf.h4
-rw-r--r--zconf.h.cmakein4
-rw-r--r--zconf.h.in4
-rw-r--r--zlib.32
-rw-r--r--zlib.3.pdfbin8680 -> 8680 bytes
-rw-r--r--zlib.h8
-rw-r--r--zutil.c22
-rw-r--r--zutil.h22
31 files changed, 119 insertions, 106 deletions
diff --git a/ChangeLog b/ChangeLog
index 3a2b2e5..490c7cd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,8 +1,16 @@
1 1
2 ChangeLog file for zlib 2 ChangeLog file for zlib
3 3
4Changes 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
4Changes in 1.2.4.4 (18 Apr 2010) 12Changes 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]
6- Undefine _LARGEFILE64_SOURCE in zconf.h if it is zero, but not if empty 14- Undefine _LARGEFILE64_SOURCE in zconf.h if it is zero, but not if empty
7- Try to use bash or ksh regardless of functionality of /bin/sh 15- Try to use bash or ksh regardless of functionality of /bin/sh
8- Fix configure incompatibility with NetBSD sh 16- Fix configure incompatibility with NetBSD sh
@@ -162,7 +170,7 @@ Changes in 1.2.3.6 (17 Jan 2010)
162- Correct email address in configure for system options 170- Correct email address in configure for system options
163- Update make_vms.com and add make_vms.com to contrib/minizip [Zinser] 171- Update make_vms.com and add make_vms.com to contrib/minizip [Zinser]
164- Update zlib.map [Brown] 172- 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]
166- Apply various fixes to CMakeLists.txt [Lowman] 174- Apply various fixes to CMakeLists.txt [Lowman]
167- Add checks on len in gzread() and gzwrite() 175- Add checks on len in gzread() and gzwrite()
168- Add error message for no more room for gzungetc() 176- Add error message for no more room for gzungetc()
diff --git a/Makefile.in b/Makefile.in
index f932d9f..00e109f 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -25,14 +25,14 @@ CFLAGS=-O
25# -Wstrict-prototypes -Wmissing-prototypes 25# -Wstrict-prototypes -Wmissing-prototypes
26 26
27SFLAGS=-O 27SFLAGS=-O
28 28LDFLAGS=
29TEST_LDFLAGS=-L. libz.a 29TEST_LDFLAGS=-L. libz.a
30LDSHARED=$(CC) 30LDSHARED=$(CC)
31CPP=$(CC) -E 31CPP=$(CC) -E
32 32
33STATICLIB=libz.a 33STATICLIB=libz.a
34SHAREDLIB=libz.so 34SHAREDLIB=libz.so
35SHAREDLIBV=libz.so.1.2.4.4 35SHAREDLIBV=libz.so.1.2.4.5
36SHAREDLIBM=libz.so.1 36SHAREDLIBM=libz.so.1
37LIBS=$(STATICLIB) $(SHAREDLIBV) 37LIBS=$(STATICLIB) $(SHAREDLIBV)
38 38
@@ -132,7 +132,7 @@ minigzip64.o: minigzip.c zlib.h zconf.h
132.SUFFIXES: .lo 132.SUFFIXES: .lo
133 133
134.c.lo: 134.c.lo:
135 -@if [ ! -d objs ]; then mkdir objs; fi 135 -@mkdir objs 2>/dev/null || test -d objs
136 $(CC) $(SFLAGS) -DPIC -c -o objs/$*.o $< 136 $(CC) $(SFLAGS) -DPIC -c -o objs/$*.o $<
137 -@mv objs/$*.o $@ 137 -@mv objs/$*.o $@
138 138
diff --git a/README b/README
index d909ba6..049b873 100644
--- a/README
+++ b/README
@@ -1,6 +1,6 @@
1ZLIB DATA COMPRESSION LIBRARY 1ZLIB DATA COMPRESSION LIBRARY
2 2
3zlib 1.2.4.4 is a general purpose data compression library. All the code is 3zlib 1.2.4.5 is a general purpose data compression library. All the code is
4thread safe. The data format used by the zlib library is described by RFCs 4thread safe. The data format used by the zlib library is described by RFCs
5(Request for Comments) 1950 to 1952 in the files 5(Request for Comments) 1950 to 1952 in the files
6http://www.ietf.org/rfc/rfc1950.txt (zlib format), rfc1951.txt (deflate format) 6http://www.ietf.org/rfc/rfc1950.txt (zlib format), rfc1951.txt (deflate format)
@@ -31,7 +31,7 @@ Mark Nelson <markn@ieee.org> wrote an article about zlib for the Jan. 1997
31issue of Dr. Dobb's Journal; a copy of the article is available at 31issue of Dr. Dobb's Journal; a copy of the article is available at
32http://marknelson.us/1997/01/01/zlib-engine/ . 32http://marknelson.us/1997/01/01/zlib-engine/ .
33 33
34The changes made in version 1.2.4.4 are documented in the file ChangeLog. 34The changes made in version 1.2.4.5 are documented in the file ChangeLog.
35 35
36Unsupported third party contributions are provided in directory contrib/ . 36Unsupported third party contributions are provided in directory contrib/ .
37 37
diff --git a/configure b/configure
index e729c6c..0344eb4 100755
--- a/configure
+++ b/configure
@@ -14,7 +14,7 @@
14# an error. 14# an error.
15 15
16if [ -n "${CHOST}" ]; then 16if [ -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/')"
18 CROSS_PREFIX="${CHOST}-" 18 CROSS_PREFIX="${CHOST}-"
19fi 19fi
20 20
@@ -49,6 +49,7 @@ LDSHAREDLIBC="${LDSHAREDLIBC--lc}"
49prefix=${prefix-/usr/local} 49prefix=${prefix-/usr/local}
50exec_prefix=${exec_prefix-'${prefix}'} 50exec_prefix=${exec_prefix-'${prefix}'}
51libdir=${libdir-'${exec_prefix}/lib'} 51libdir=${libdir-'${exec_prefix}/lib'}
52sharedlibdir=${sharedlibdir-'${exec_prefix}/lib'}
52includedir=${includedir-'${prefix}/include'} 53includedir=${includedir-'${prefix}/include'}
53mandir=${mandir-'${prefix}/share/man'} 54mandir=${mandir-'${prefix}/share/man'}
54shared_ext='.so' 55shared_ext='.so'
@@ -147,6 +148,7 @@ if test "$gcc" -eq 1 && ($cc -c $cflags $test.c) 2>/dev/null; then
147else 148else
148 # find system name and corresponding cc options 149 # find system name and corresponding cc options
149 CC=${CC-cc} 150 CC=${CC-cc}
151 gcc=0
150 if test -z "$uname"; then 152 if test -z "$uname"; then
151 uname=`(uname -sr || echo unknown) 2>/dev/null` 153 uname=`(uname -sr || echo unknown) 2>/dev/null`
152 fi 154 fi
@@ -504,21 +506,26 @@ EOF
504 fi 506 fi
505fi 507fi
506 508
507cat > $test.c <<EOF 509if test "$gcc" -eq 1; then
508int foo __attribute__ ((visibility ("hidden"))); 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
516int ZLIB_INTERNAL foo;
509int main() 517int main()
510{ 518{
511 return 0; 519 return 0;
512} 520}
513EOF 521EOF
514if test "`($CC -c -fvisibility=hidden $CFLAGS $test.c) 2>&1`" = ""; then 522 if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then
515 CFLAGS="$CFLAGS -fvisibility=hidden" 523 echo "Checking for attribute(visibility) support... Yes."
516 SFLAGS="$SFLAGS -fvisibility=hidden" 524 else
517 echo "Checking for attribute(visibility) support... Yes." 525 CFLAGS="$CFLAGS -DNO_VIZ"
518else 526 SFLAGS="$SFLAGS -DNO_VIZ"
519 CFLAGS="$CFLAGS -DNO_VIZ" 527 echo "Checking for attribute(visibility) support... No."
520 SFLAGS="$SFLAGS -DNO_VIZ" 528 fi
521 echo "Checking for attribute(visibility) support... No."
522fi 529fi
523 530
524CPP=${CPP-"$CC -E"} 531CPP=${CPP-"$CC -E"}
diff --git a/contrib/delphi/ZLib.pas b/contrib/delphi/ZLib.pas
index c1094c6..0496ee4 100644
--- a/contrib/delphi/ZLib.pas
+++ b/contrib/delphi/ZLib.pas
@@ -152,7 +152,7 @@ procedure DecompressToUserBuf(const InBuf: Pointer; InBytes: Integer;
152 const OutBuf: Pointer; BufSize: Integer); 152 const OutBuf: Pointer; BufSize: Integer);
153 153
154const 154const
155 zlib_version = '1.2.4.4'; 155 zlib_version = '1.2.4.5';
156 156
157type 157type
158 EZlibError = class(Exception); 158 EZlibError = class(Exception);
diff --git a/contrib/dotzlib/DotZLib/UnitTests.cs b/contrib/dotzlib/DotZLib/UnitTests.cs
index fe1061f..4531408 100644
--- a/contrib/dotzlib/DotZLib/UnitTests.cs
+++ b/contrib/dotzlib/DotZLib/UnitTests.cs
@@ -156,7 +156,7 @@ namespace DotZLibTests
156 public void Info_Version() 156 public void Info_Version()
157 { 157 {
158 Info info = new Info(); 158 Info info = new Info();
159 Assert.AreEqual("1.2.4.4", Info.Version); 159 Assert.AreEqual("1.2.4.5", Info.Version);
160 Assert.AreEqual(32, info.SizeOfUInt); 160 Assert.AreEqual(32, info.SizeOfUInt);
161 Assert.AreEqual(32, info.SizeOfULong); 161 Assert.AreEqual(32, info.SizeOfULong);
162 Assert.AreEqual(32, info.SizeOfPointer); 162 Assert.AreEqual(32, info.SizeOfPointer);
diff --git a/contrib/infback9/inftree9.c b/contrib/infback9/inftree9.c
index 1847d22..c01cc1e 100644
--- a/contrib/infback9/inftree9.c
+++ b/contrib/infback9/inftree9.c
@@ -9,7 +9,7 @@
9#define MAXBITS 15 9#define MAXBITS 15
10 10
11const char inflate9_copyright[] = 11const 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 ";
13/* 13/*
14 If you use the zlib library in a product, an acknowledgment is welcome 14 If you use the zlib library in a product, an acknowledgment is welcome
15 in the documentation of your product. If for some reason you cannot 15 in the documentation of your product. If for some reason you cannot
@@ -64,7 +64,7 @@ unsigned short FAR *work;
64 static const unsigned short lext[31] = { /* Length codes 257..285 extra */ 64 static const unsigned short lext[31] = { /* Length codes 257..285 extra */
65 128, 128, 128, 128, 128, 128, 128, 128, 129, 129, 129, 129, 65 128, 128, 128, 128, 128, 128, 128, 128, 129, 129, 129, 129,
66 130, 130, 130, 130, 131, 131, 131, 131, 132, 132, 132, 132, 66 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};
68 static const unsigned short dbase[32] = { /* Distance codes 0..31 base */ 68 static const unsigned short dbase[32] = { /* Distance codes 0..31 base */
69 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 69 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49,
70 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 70 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073,
diff --git a/contrib/pascal/zlibpas.pas b/contrib/pascal/zlibpas.pas
index 0b2153d..2bbf956 100644
--- a/contrib/pascal/zlibpas.pas
+++ b/contrib/pascal/zlibpas.pas
@@ -10,7 +10,7 @@ unit zlibpas;
10interface 10interface
11 11
12const 12const
13 ZLIB_VERSION = '1.2.4.4'; 13 ZLIB_VERSION = '1.2.4.5';
14 14
15type 15type
16 alloc_func = function(opaque: Pointer; items, size: Integer): Pointer; 16 alloc_func = function(opaque: Pointer; items, size: Integer): Pointer;
diff --git a/contrib/vstudio/vc10/zlib.rc b/contrib/vstudio/vc10/zlib.rc
index 6127143..b2196d9 100644
--- a/contrib/vstudio/vc10/zlib.rc
+++ b/contrib/vstudio/vc10/zlib.rc
@@ -2,8 +2,8 @@
2 2
3#define IDR_VERSION1 1 3#define IDR_VERSION1 1
4IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE 4IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE
5 FILEVERSION 1,2,4,4 5 FILEVERSION 1,2,4,5
6 PRODUCTVERSION 1,2,4,4 6 PRODUCTVERSION 1,2,4,5
7 FILEFLAGSMASK VS_FFI_FILEFLAGSMASK 7 FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
8 FILEFLAGS 0 8 FILEFLAGS 0
9 FILEOS VOS_DOS_WINDOWS32 9 FILEOS VOS_DOS_WINDOWS32
@@ -17,7 +17,7 @@ BEGIN
17 17
18 BEGIN 18 BEGIN
19 VALUE "FileDescription", "zlib data compression and ZIP file I/O library\0" 19 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"
21 VALUE "InternalName", "zlib\0" 21 VALUE "InternalName", "zlib\0"
22 VALUE "OriginalFilename", "zlib.dll\0" 22 VALUE "OriginalFilename", "zlib.dll\0"
23 VALUE "ProductName", "ZLib.DLL\0" 23 VALUE "ProductName", "ZLib.DLL\0"
diff --git a/contrib/vstudio/vc9/zlib.rc b/contrib/vstudio/vc9/zlib.rc
index 6127143..b2196d9 100644
--- a/contrib/vstudio/vc9/zlib.rc
+++ b/contrib/vstudio/vc9/zlib.rc
@@ -2,8 +2,8 @@
2 2
3#define IDR_VERSION1 1 3#define IDR_VERSION1 1
4IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE 4IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE
5 FILEVERSION 1,2,4,4 5 FILEVERSION 1,2,4,5
6 PRODUCTVERSION 1,2,4,4 6 PRODUCTVERSION 1,2,4,5
7 FILEFLAGSMASK VS_FFI_FILEFLAGSMASK 7 FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
8 FILEFLAGS 0 8 FILEFLAGS 0
9 FILEOS VOS_DOS_WINDOWS32 9 FILEOS VOS_DOS_WINDOWS32
@@ -17,7 +17,7 @@ BEGIN
17 17
18 BEGIN 18 BEGIN
19 VALUE "FileDescription", "zlib data compression and ZIP file I/O library\0" 19 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"
21 VALUE "InternalName", "zlib\0" 21 VALUE "InternalName", "zlib\0"
22 VALUE "OriginalFilename", "zlib.dll\0" 22 VALUE "OriginalFilename", "zlib.dll\0"
23 VALUE "ProductName", "ZLib.DLL\0" 23 VALUE "ProductName", "ZLib.DLL\0"
diff --git a/deflate.c b/deflate.c
index b4ed49d..9d467b7 100644
--- a/deflate.c
+++ b/deflate.c
@@ -52,7 +52,7 @@
52#include "deflate.h" 52#include "deflate.h"
53 53
54const char deflate_copyright[] = 54const 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 ";
56/* 56/*
57 If you use the zlib library in a product, an acknowledgment is welcome 57 If you use the zlib library in a product, an acknowledgment is welcome
58 in the documentation of your product. If for some reason you cannot 58 in the documentation of your product. If for some reason you cannot
diff --git a/deflate.h b/deflate.h
index f53deba..01cc9b4 100644
--- a/deflate.h
+++ b/deflate.h
@@ -290,13 +290,13 @@ typedef struct internal_state {
290 memory checker errors from longest match routines */ 290 memory checker errors from longest match routines */
291 291
292 /* in trees.c */ 292 /* in trees.c */
293void _tr_init OF((deflate_state *s)); 293void ZLIB_INTERNAL _tr_init OF((deflate_state *s));
294int _tr_tally OF((deflate_state *s, unsigned dist, unsigned lc)); 294int ZLIB_INTERNAL _tr_tally OF((deflate_state *s, unsigned dist, unsigned lc));
295void _tr_flush_block OF((deflate_state *s, charf *buf, ulg stored_len, 295void ZLIB_INTERNAL _tr_flush_block OF((deflate_state *s, charf *buf,
296 int last)); 296 ulg stored_len, int last));
297void _tr_align OF((deflate_state *s)); 297void ZLIB_INTERNAL _tr_align OF((deflate_state *s));
298void _tr_stored_block OF((deflate_state *s, charf *buf, ulg stored_len, 298void ZLIB_INTERNAL _tr_stored_block OF((deflate_state *s, charf *buf,
299 int last)); 299 ulg stored_len, int last));
300 300
301#define d_code(dist) \ 301#define d_code(dist) \
302 ((dist) < 256 ? _dist_code[dist] : _dist_code[256+((dist)>>7)]) 302 ((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,
309/* Inline versions of _tr_tally for speed: */ 309/* Inline versions of _tr_tally for speed: */
310 310
311#if defined(GEN_TREES_H) || !defined(STDC) 311#if defined(GEN_TREES_H) || !defined(STDC)
312 extern uch _length_code[]; 312 extern uch ZLIB_INTERNAL _length_code[];
313 extern uch _dist_code[]; 313 extern uch ZLIB_INTERNAL _dist_code[];
314#else 314#else
315 extern const uch _length_code[]; 315 extern const uch ZLIB_INTERNAL _length_code[];
316 extern const uch _dist_code[]; 316 extern const uch ZLIB_INTERNAL _dist_code[];
317#endif 317#endif
318 318
319# define _tr_tally_lit(s, c, flush) \ 319# define _tr_tally_lit(s, c, flush) \
diff --git a/gzguts.h b/gzguts.h
index b0a4cbd..0f8fb79 100644
--- a/gzguts.h
+++ b/gzguts.h
@@ -12,7 +12,11 @@
12# endif 12# endif
13#endif 13#endif
14 14
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
16 20
17#include <stdio.h> 21#include <stdio.h>
18#include "zlib.h" 22#include "zlib.h"
@@ -112,9 +116,9 @@ typedef struct {
112typedef gz_state FAR *gz_statep; 116typedef gz_state FAR *gz_statep;
113 117
114/* shared functions */ 118/* shared functions */
115ZEXTERN void ZEXPORT gz_error OF((gz_statep, int, const char *)); 119void ZLIB_INTERNAL gz_error OF((gz_statep, int, const char *));
116#if defined UNDER_CE 120#if defined UNDER_CE
117ZEXTERN char ZEXPORT *gz_strwinerror OF((DWORD error)); 121char ZLIB_INTERNAL *gz_strwinerror OF((DWORD error));
118#endif 122#endif
119 123
120/* GT_OFF(x), where x is an unsigned value, is true if x > maximum z_off64_t 124/* 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));
123#ifdef INT_MAX 127#ifdef INT_MAX
124# define GT_OFF(x) (sizeof(int) == sizeof(z_off64_t) && (x) > INT_MAX) 128# define GT_OFF(x) (sizeof(int) == sizeof(z_off64_t) && (x) > INT_MAX)
125#else 129#else
126ZEXTERN unsigned ZEXPORT gz_intmax OF((void)); 130unsigned ZLIB_INTERNAL gz_intmax OF((void));
127# define GT_OFF(x) (sizeof(int) == sizeof(z_off64_t) && (x) > gz_intmax()) 131# define GT_OFF(x) (sizeof(int) == sizeof(z_off64_t) && (x) > gz_intmax())
128#endif 132#endif
diff --git a/gzlib.c b/gzlib.c
index 1839002..603e60e 100644
--- a/gzlib.c
+++ b/gzlib.c
@@ -26,7 +26,7 @@ local gzFile gz_open OF((const char *, int, const char *));
26 26
27 The gz_strwinerror function does not change the current setting of 27 The gz_strwinerror function does not change the current setting of
28 GetLastError. */ 28 GetLastError. */
29char ZEXPORT *gz_strwinerror (error) 29char ZLIB_INTERNAL *gz_strwinerror (error)
30 DWORD error; 30 DWORD error;
31{ 31{
32 static char buf[1024]; 32 static char buf[1024];
@@ -482,7 +482,7 @@ void ZEXPORT gzclearerr(file)
482 memory). Simply save the error message as a static string. If there is an 482 memory). Simply save the error message as a static string. If there is an
483 allocation failure constructing the error message, then convert the error to 483 allocation failure constructing the error message, then convert the error to
484 out of memory. */ 484 out of memory. */
485void ZEXPORT gz_error(state, err, msg) 485void ZLIB_INTERNAL gz_error(state, err, msg)
486 gz_statep state; 486 gz_statep state;
487 int err; 487 int err;
488 const char *msg; 488 const char *msg;
@@ -522,7 +522,7 @@ void ZEXPORT gz_error(state, err, msg)
522 available) -- we need to do this to cover cases where 2's complement not 522 available) -- we need to do this to cover cases where 2's complement not
523 used, since C standard permits 1's complement and sign-bit representations, 523 used, since C standard permits 1's complement and sign-bit representations,
524 otherwise we could just use ((unsigned)-1) >> 1 */ 524 otherwise we could just use ((unsigned)-1) >> 1 */
525unsigned ZEXPORT gz_intmax() 525unsigned ZLIB_INTERNAL gz_intmax()
526{ 526{
527 unsigned p, q; 527 unsigned p, q;
528 528
diff --git a/inffast.c b/inffast.c
index 0a0761f..6c2c361 100644
--- a/inffast.c
+++ b/inffast.c
@@ -64,7 +64,7 @@
64 requires strm->avail_out >= 258 for each loop to avoid checking for 64 requires strm->avail_out >= 258 for each loop to avoid checking for
65 output space. 65 output space.
66 */ 66 */
67void inflate_fast(strm, start) 67void ZLIB_INTERNAL inflate_fast(strm, start)
68z_streamp strm; 68z_streamp strm;
69unsigned start; /* inflate()'s starting value for strm->avail_out */ 69unsigned start; /* inflate()'s starting value for strm->avail_out */
70{ 70{
diff --git a/inffast.h b/inffast.h
index 1e88d2d..191e5e7 100644
--- a/inffast.h
+++ b/inffast.h
@@ -8,4 +8,4 @@
8 subject to change. Applications should only use zlib.h. 8 subject to change. Applications should only use zlib.h.
9 */ 9 */
10 10
11void inflate_fast OF((z_streamp strm, unsigned start)); 11void ZLIB_INTERNAL inflate_fast OF((z_streamp strm, unsigned start));
diff --git a/inftrees.c b/inftrees.c
index ed32632..7afe665 100644
--- a/inftrees.c
+++ b/inftrees.c
@@ -9,7 +9,7 @@
9#define MAXBITS 15 9#define MAXBITS 15
10 10
11const char inflate_copyright[] = 11const 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 ";
13/* 13/*
14 If you use the zlib library in a product, an acknowledgment is welcome 14 If you use the zlib library in a product, an acknowledgment is welcome
15 in the documentation of your product. If for some reason you cannot 15 in the documentation of your product. If for some reason you cannot
@@ -29,7 +29,7 @@ const char inflate_copyright[] =
29 table index bits. It will differ if the request is greater than the 29 table index bits. It will differ if the request is greater than the
30 longest code or if it is less than the shortest code. 30 longest code or if it is less than the shortest code.
31 */ 31 */
32int inflate_table(type, lens, codes, table, bits, work) 32int ZLIB_INTERNAL inflate_table(type, lens, codes, table, bits, work)
33codetype type; 33codetype type;
34unsigned short FAR *lens; 34unsigned short FAR *lens;
35unsigned codes; 35unsigned codes;
@@ -62,7 +62,7 @@ unsigned short FAR *work;
62 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0}; 62 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0};
63 static const unsigned short lext[31] = { /* Length codes 257..285 extra */ 63 static const unsigned short lext[31] = { /* Length codes 257..285 extra */
64 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, 64 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};
66 static const unsigned short dbase[32] = { /* Distance codes 0..29 base */ 66 static const unsigned short dbase[32] = { /* Distance codes 0..29 base */
67 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 67 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193,
68 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 68 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145,
diff --git a/inftrees.h b/inftrees.h
index 67461da..31a609b 100644
--- a/inftrees.h
+++ b/inftrees.h
@@ -57,6 +57,6 @@ typedef enum {
57 DISTS 57 DISTS
58} codetype; 58} codetype;
59 59
60extern int inflate_table OF((codetype type, unsigned short FAR *lens, 60int ZLIB_INTERNAL inflate_table OF((codetype type, unsigned short FAR *lens,
61 unsigned codes, code FAR * FAR *table, 61 unsigned codes, code FAR * FAR *table,
62 unsigned FAR *bits, unsigned short FAR *work)); 62 unsigned FAR *bits, unsigned short FAR *work));
diff --git a/qnx/package.qpg b/qnx/package.qpg
index 4ee3ad3..2cf9bb9 100644
--- a/qnx/package.qpg
+++ b/qnx/package.qpg
@@ -25,10 +25,10 @@
25 <QPG:Files> 25 <QPG:Files>
26 <QPG:Add file="../zconf.h" install="/opt/include/" user="root:sys" permission="644"/> 26 <QPG:Add file="../zconf.h" install="/opt/include/" user="root:sys" permission="644"/>
27 <QPG:Add file="../zlib.h" install="/opt/include/" user="root:sys" permission="644"/> 27 <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"/> 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.4"/> 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.4"/> 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.4" install="/opt/lib/" component="slib"/> 31 <QPG:Add file="../libz.so.1.2.4.5" install="/opt/lib/" component="slib"/>
32 </QPG:Files> 32 </QPG:Files>
33 33
34 <QPG:PackageFilter> 34 <QPG:PackageFilter>
@@ -63,7 +63,7 @@
63 </QPM:ProductDescription> 63 </QPM:ProductDescription>
64 64
65 <QPM:ReleaseDescription> 65 <QPM:ReleaseDescription>
66 <QPM:ReleaseVersion>1.2.4.4</QPM:ReleaseVersion> 66 <QPM:ReleaseVersion>1.2.4.5</QPM:ReleaseVersion>
67 <QPM:ReleaseUrgency>Medium</QPM:ReleaseUrgency> 67 <QPM:ReleaseUrgency>Medium</QPM:ReleaseUrgency>
68 <QPM:ReleaseStability>Stable</QPM:ReleaseStability> 68 <QPM:ReleaseStability>Stable</QPM:ReleaseStability>
69 <QPM:ReleaseNoteMinor></QPM:ReleaseNoteMinor> 69 <QPM:ReleaseNoteMinor></QPM:ReleaseNoteMinor>
diff --git a/treebuild.xml b/treebuild.xml
index 934442f..f96757f 100644
--- a/treebuild.xml
+++ b/treebuild.xml
@@ -1,6 +1,6 @@
1<?xml version="1.0" ?> 1<?xml version="1.0" ?>
2<package name="zlib" version="1.2.4.4"> 2<package name="zlib" version="1.2.4.5">
3 <library name="zlib" dlversion="1.2.4.4" dlname="z"> 3 <library name="zlib" dlversion="1.2.4.5" dlname="z">
4 <property name="description"> zip compression library </property> 4 <property name="description"> zip compression library </property>
5 <property name="include-target-dir" value="$(@PACKAGE/install-includedir)" /> 5 <property name="include-target-dir" value="$(@PACKAGE/install-includedir)" />
6 6
diff --git a/trees.c b/trees.c
index 1a6e997..423340c 100644
--- a/trees.c
+++ b/trees.c
@@ -382,7 +382,7 @@ void gen_trees_header()
382/* =========================================================================== 382/* ===========================================================================
383 * Initialize the tree data structures for a new zlib stream. 383 * Initialize the tree data structures for a new zlib stream.
384 */ 384 */
385void _tr_init(s) 385void ZLIB_INTERNAL _tr_init(s)
386 deflate_state *s; 386 deflate_state *s;
387{ 387{
388 tr_static_init(); 388 tr_static_init();
@@ -867,7 +867,7 @@ local void send_all_trees(s, lcodes, dcodes, blcodes)
867/* =========================================================================== 867/* ===========================================================================
868 * Send a stored block 868 * Send a stored block
869 */ 869 */
870void _tr_stored_block(s, buf, stored_len, last) 870void ZLIB_INTERNAL _tr_stored_block(s, buf, stored_len, last)
871 deflate_state *s; 871 deflate_state *s;
872 charf *buf; /* input block */ 872 charf *buf; /* input block */
873 ulg stored_len; /* length of input block */ 873 ulg stored_len; /* length of input block */
@@ -892,7 +892,7 @@ void _tr_stored_block(s, buf, stored_len, last)
892 * To simplify the code, we assume the worst case of last real code encoded 892 * To simplify the code, we assume the worst case of last real code encoded
893 * on one bit only. 893 * on one bit only.
894 */ 894 */
895void _tr_align(s) 895void ZLIB_INTERNAL _tr_align(s)
896 deflate_state *s; 896 deflate_state *s;
897{ 897{
898 send_bits(s, STATIC_TREES<<1, 3); 898 send_bits(s, STATIC_TREES<<1, 3);
@@ -921,7 +921,7 @@ void _tr_align(s)
921 * Determine the best encoding for the current block: dynamic trees, static 921 * Determine the best encoding for the current block: dynamic trees, static
922 * trees or store, and output the encoded block to the zip file. 922 * trees or store, and output the encoded block to the zip file.
923 */ 923 */
924void _tr_flush_block(s, buf, stored_len, last) 924void ZLIB_INTERNAL _tr_flush_block(s, buf, stored_len, last)
925 deflate_state *s; 925 deflate_state *s;
926 charf *buf; /* input block, or NULL if too old */ 926 charf *buf; /* input block, or NULL if too old */
927 ulg stored_len; /* length of input block */ 927 ulg stored_len; /* length of input block */
@@ -1022,7 +1022,7 @@ void _tr_flush_block(s, buf, stored_len, last)
1022 * Save the match info and tally the frequency counts. Return true if 1022 * Save the match info and tally the frequency counts. Return true if
1023 * the current block must be flushed. 1023 * the current block must be flushed.
1024 */ 1024 */
1025int _tr_tally (s, dist, lc) 1025int ZLIB_INTERNAL _tr_tally (s, dist, lc)
1026 deflate_state *s; 1026 deflate_state *s;
1027 unsigned dist; /* distance of matched string */ 1027 unsigned dist; /* distance of matched string */
1028 unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */ 1028 unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */
diff --git a/trees.h b/trees.h
index 72facf9..d35639d 100644
--- a/trees.h
+++ b/trees.h
@@ -70,7 +70,7 @@ local const ct_data static_dtree[D_CODES] = {
70{{19},{ 5}}, {{11},{ 5}}, {{27},{ 5}}, {{ 7},{ 5}}, {{23},{ 5}} 70{{19},{ 5}}, {{11},{ 5}}, {{27},{ 5}}, {{ 7},{ 5}}, {{23},{ 5}}
71}; 71};
72 72
73const uch _dist_code[DIST_CODE_LEN] = { 73const uch ZLIB_INTERNAL _dist_code[DIST_CODE_LEN] = {
74 0, 1, 2, 3, 4, 4, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, 74 0, 1, 2, 3, 4, 4, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8,
75 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 75 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10,
7610, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 7610, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
@@ -99,7 +99,7 @@ const uch _dist_code[DIST_CODE_LEN] = {
9929, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29 9929, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29
100}; 100};
101 101
102const uch _length_code[MAX_MATCH-MIN_MATCH+1]= { 102const uch ZLIB_INTERNAL _length_code[MAX_MATCH-MIN_MATCH+1]= {
103 0, 1, 2, 3, 4, 5, 6, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 12, 12, 103 0, 1, 2, 3, 4, 5, 6, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 12, 12,
10413, 13, 13, 13, 14, 14, 14, 14, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 16, 16, 10413, 13, 13, 13, 14, 14, 14, 14, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 16, 16,
10517, 17, 17, 17, 17, 17, 17, 17, 18, 18, 18, 18, 18, 18, 18, 18, 19, 19, 19, 19, 10517, 17, 17, 17, 17, 17, 17, 17, 18, 18, 18, 18, 18, 18, 18, 18, 19, 19, 19, 19,
diff --git a/win32/Makefile.gcc b/win32/Makefile.gcc
index 93c207d..3333c01 100644
--- a/win32/Makefile.gcc
+++ b/win32/Makefile.gcc
@@ -116,13 +116,13 @@ zlibrc.o: win32/zlib1.rc
116.PHONY: install uninstall clean 116.PHONY: install uninstall clean
117 117
118install: zlib.h zconf.h $(STATICLIB) $(IMPLIB) 118install: zlib.h zconf.h $(STATICLIB) $(IMPLIB)
119 -@mkdir -p $(INCLUDE_PATH)
120 -@mkdir -p $(LIBRARY_PATH)
119 -if [ "$(SHARED_MODE)" = "1" ]; then \ 121 -if [ "$(SHARED_MODE)" = "1" ]; then \
120 mkdir -p $(BINARY_PATH); \ 122 mkdir -p $(BINARY_PATH); \
121 $(INSTALL) $(SHAREDLIB) $(BINARY_PATH); \ 123 $(INSTALL) $(SHAREDLIB) $(BINARY_PATH); \
122 $(INSTALL) $(IMPLIB) $(LIBRARY_PATH); \ 124 $(INSTALL) $(IMPLIB) $(LIBRARY_PATH); \
123 fi 125 fi
124 -@mkdir -p $(INCLUDE_PATH)
125 -@mkdir -p $(LIBRARY_PATH)
126 -$(INSTALL) zlib.h $(INCLUDE_PATH) 126 -$(INSTALL) zlib.h $(INCLUDE_PATH)
127 -$(INSTALL) zconf.h $(INCLUDE_PATH) 127 -$(INSTALL) zconf.h $(INCLUDE_PATH)
128 -$(INSTALL) $(STATICLIB) $(LIBRARY_PATH) 128 -$(INSTALL) $(STATICLIB) $(LIBRARY_PATH)
diff --git a/zconf.h b/zconf.h
index f5a6c87..02ce56c 100644
--- a/zconf.h
+++ b/zconf.h
@@ -315,10 +315,6 @@
315# endif 315# endif
316#endif 316#endif
317 317
318#ifndef NO_VIZ
319# define ZEXTERN __attribute__((visibility ("default"))) extern
320#endif
321
322#ifndef ZEXTERN 318#ifndef ZEXTERN
323# define ZEXTERN extern 319# define ZEXTERN extern
324#endif 320#endif
diff --git a/zconf.h.cmakein b/zconf.h.cmakein
index 18dd770..a2f71b1 100644
--- a/zconf.h.cmakein
+++ b/zconf.h.cmakein
@@ -317,10 +317,6 @@
317# endif 317# endif
318#endif 318#endif
319 319
320#ifndef NO_VIZ
321# define ZEXTERN __attribute__((visibility ("default"))) extern
322#endif
323
324#ifndef ZEXTERN 320#ifndef ZEXTERN
325# define ZEXTERN extern 321# define ZEXTERN extern
326#endif 322#endif
diff --git a/zconf.h.in b/zconf.h.in
index f5a6c87..02ce56c 100644
--- a/zconf.h.in
+++ b/zconf.h.in
@@ -315,10 +315,6 @@
315# endif 315# endif
316#endif 316#endif
317 317
318#ifndef NO_VIZ
319# define ZEXTERN __attribute__((visibility ("default"))) extern
320#endif
321
322#ifndef ZEXTERN 318#ifndef ZEXTERN
323# define ZEXTERN extern 319# define ZEXTERN extern
324#endif 320#endif
diff --git a/zlib.3 b/zlib.3
index 857dbd9..fd08deb 100644
--- a/zlib.3
+++ b/zlib.3
@@ -125,7 +125,7 @@ before asking for help.
125Send questions and/or comments to zlib@gzip.org, 125Send questions and/or comments to zlib@gzip.org,
126or (for the Windows DLL version) to Gilles Vollant (info@winimage.com). 126or (for the Windows DLL version) to Gilles Vollant (info@winimage.com).
127.SH AUTHORS 127.SH AUTHORS
128Version 1.2.4.4 128Version 1.2.4.5
129Copyright (C) 1995-2010 Jean-loup Gailly (jloup@gzip.org) 129Copyright (C) 1995-2010 Jean-loup Gailly (jloup@gzip.org)
130and Mark Adler (madler@alumni.caltech.edu). 130and Mark Adler (madler@alumni.caltech.edu).
131.LP 131.LP
diff --git a/zlib.3.pdf b/zlib.3.pdf
index 364aeb0..f250e45 100644
--- a/zlib.3.pdf
+++ b/zlib.3.pdf
Binary files differ
diff --git a/zlib.h b/zlib.h
index 670fff1..a613deb 100644
--- a/zlib.h
+++ b/zlib.h
@@ -1,5 +1,5 @@
1/* zlib.h -- interface of the 'zlib' general purpose compression library 1/* zlib.h -- interface of the 'zlib' general purpose compression library
2 version 1.2.4.4, April 18th, 2010 2 version 1.2.4.5, April 18th, 2010
3 3
4 Copyright (C) 1995-2010 Jean-loup Gailly and Mark Adler 4 Copyright (C) 1995-2010 Jean-loup Gailly and Mark Adler
5 5
@@ -37,12 +37,12 @@
37extern "C" { 37extern "C" {
38#endif 38#endif
39 39
40#define ZLIB_VERSION "1.2.4.4" 40#define ZLIB_VERSION "1.2.4.5"
41#define ZLIB_VERNUM 0x1244 41#define ZLIB_VERNUM 0x1245
42#define ZLIB_VER_MAJOR 1 42#define ZLIB_VER_MAJOR 1
43#define ZLIB_VER_MINOR 2 43#define ZLIB_VER_MINOR 2
44#define ZLIB_VER_REVISION 4 44#define ZLIB_VER_REVISION 4
45#define ZLIB_VER_SUBREVISION 4 45#define ZLIB_VER_SUBREVISION 5
46 46
47/* 47/*
48 The 'zlib' compression library provides in-memory compression and 48 The 'zlib' compression library provides in-memory compression and
diff --git a/zutil.c b/zutil.c
index 6ba16f6..3db9f3d 100644
--- a/zutil.c
+++ b/zutil.c
@@ -117,9 +117,9 @@ uLong ZEXPORT zlibCompileFlags()
117# ifndef verbose 117# ifndef verbose
118# define verbose 0 118# define verbose 0
119# endif 119# endif
120int z_verbose = verbose; 120int ZLIB_INTERNAL z_verbose = verbose;
121 121
122void z_error (m) 122void ZLIB_INTERNAL z_error (m)
123 char *m; 123 char *m;
124{ 124{
125 fprintf(stderr, "%s\n", m); 125 fprintf(stderr, "%s\n", m);
@@ -146,7 +146,7 @@ const char * ZEXPORT zError(err)
146 146
147#ifndef HAVE_MEMCPY 147#ifndef HAVE_MEMCPY
148 148
149void zmemcpy(dest, source, len) 149void ZLIB_INTERNAL zmemcpy(dest, source, len)
150 Bytef* dest; 150 Bytef* dest;
151 const Bytef* source; 151 const Bytef* source;
152 uInt len; 152 uInt len;
@@ -157,7 +157,7 @@ void zmemcpy(dest, source, len)
157 } while (--len != 0); 157 } while (--len != 0);
158} 158}
159 159
160int zmemcmp(s1, s2, len) 160int ZLIB_INTERNAL zmemcmp(s1, s2, len)
161 const Bytef* s1; 161 const Bytef* s1;
162 const Bytef* s2; 162 const Bytef* s2;
163 uInt len; 163 uInt len;
@@ -170,7 +170,7 @@ int zmemcmp(s1, s2, len)
170 return 0; 170 return 0;
171} 171}
172 172
173void zmemzero(dest, len) 173void ZLIB_INTERNAL zmemzero(dest, len)
174 Bytef* dest; 174 Bytef* dest;
175 uInt len; 175 uInt len;
176{ 176{
@@ -213,7 +213,7 @@ local ptr_table table[MAX_PTR];
213 * a protected system like OS/2. Use Microsoft C instead. 213 * a protected system like OS/2. Use Microsoft C instead.
214 */ 214 */
215 215
216voidpf zcalloc (voidpf opaque, unsigned items, unsigned size) 216voidpf ZLIB_INTERNAL zcalloc (voidpf opaque, unsigned items, unsigned size)
217{ 217{
218 voidpf buf = opaque; /* just to make some compilers happy */ 218 voidpf buf = opaque; /* just to make some compilers happy */
219 ulg bsize = (ulg)items*size; 219 ulg bsize = (ulg)items*size;
@@ -237,7 +237,7 @@ voidpf zcalloc (voidpf opaque, unsigned items, unsigned size)
237 return buf; 237 return buf;
238} 238}
239 239
240void zcfree (voidpf opaque, voidpf ptr) 240void ZLIB_INTERNAL zcfree (voidpf opaque, voidpf ptr)
241{ 241{
242 int n; 242 int n;
243 if (*(ush*)&ptr != 0) { /* object < 64K */ 243 if (*(ush*)&ptr != 0) { /* object < 64K */
@@ -272,13 +272,13 @@ void zcfree (voidpf opaque, voidpf ptr)
272# define _hfree hfree 272# define _hfree hfree
273#endif 273#endif
274 274
275voidpf zcalloc (voidpf opaque, uInt items, uInt size) 275voidpf ZLIB_INTERNAL zcalloc (voidpf opaque, uInt items, uInt size)
276{ 276{
277 if (opaque) opaque = 0; /* to make compiler happy */ 277 if (opaque) opaque = 0; /* to make compiler happy */
278 return _halloc((long)items, size); 278 return _halloc((long)items, size);
279} 279}
280 280
281void zcfree (voidpf opaque, voidpf ptr) 281void ZLIB_INTERNAL zcfree (voidpf opaque, voidpf ptr)
282{ 282{
283 if (opaque) opaque = 0; /* to make compiler happy */ 283 if (opaque) opaque = 0; /* to make compiler happy */
284 _hfree(ptr); 284 _hfree(ptr);
@@ -297,7 +297,7 @@ extern voidp calloc OF((uInt items, uInt size));
297extern void free OF((voidpf ptr)); 297extern void free OF((voidpf ptr));
298#endif 298#endif
299 299
300voidpf zcalloc (opaque, items, size) 300voidpf ZLIB_INTERNAL zcalloc (opaque, items, size)
301 voidpf opaque; 301 voidpf opaque;
302 unsigned items; 302 unsigned items;
303 unsigned size; 303 unsigned size;
@@ -307,7 +307,7 @@ voidpf zcalloc (opaque, items, size)
307 (voidpf)calloc(items, size); 307 (voidpf)calloc(items, size);
308} 308}
309 309
310void zcfree (opaque, ptr) 310void ZLIB_INTERNAL zcfree (opaque, ptr)
311 voidpf opaque; 311 voidpf opaque;
312 voidpf ptr; 312 voidpf ptr;
313{ 313{
diff --git a/zutil.h b/zutil.h
index a250088..258fa88 100644
--- a/zutil.h
+++ b/zutil.h
@@ -13,7 +13,12 @@
13#ifndef ZUTIL_H 13#ifndef ZUTIL_H
14#define ZUTIL_H 14#define ZUTIL_H
15 15
16#define ZLIB_INTERNAL 16#if ((__GNUC__-0) * 10 + __GNUC_MINOR__-0 >= 33) && !defined(NO_VIZ)
17# define ZLIB_INTERNAL __attribute__((visibility ("hidden")))
18#else
19# define ZLIB_INTERNAL
20#endif
21
17#include "zlib.h" 22#include "zlib.h"
18 23
19#ifdef STDC 24#ifdef STDC
@@ -231,16 +236,16 @@ extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
231# define zmemzero(dest, len) memset(dest, 0, len) 236# define zmemzero(dest, len) memset(dest, 0, len)
232# endif 237# endif
233#else 238#else
234 extern void zmemcpy OF((Bytef* dest, const Bytef* source, uInt len)); 239 void ZLIB_INTERNAL zmemcpy OF((Bytef* dest, const Bytef* source, uInt len));
235 extern int zmemcmp OF((const Bytef* s1, const Bytef* s2, uInt len)); 240 int ZLIB_INTERNAL zmemcmp OF((const Bytef* s1, const Bytef* s2, uInt len));
236 extern void zmemzero OF((Bytef* dest, uInt len)); 241 void ZLIB_INTERNAL zmemzero OF((Bytef* dest, uInt len));
237#endif 242#endif
238 243
239/* Diagnostic functions */ 244/* Diagnostic functions */
240#ifdef DEBUG 245#ifdef DEBUG
241# include <stdio.h> 246# include <stdio.h>
242 extern int z_verbose; 247 extern int ZLIB_INTERNAL z_verbose;
243 extern void z_error OF((char *m)); 248 extern void ZLIB_INTERNAL z_error OF((char *m));
244# define Assert(cond,msg) {if(!(cond)) z_error(msg);} 249# define Assert(cond,msg) {if(!(cond)) z_error(msg);}
245# define Trace(x) {if (z_verbose>=0) fprintf x ;} 250# define Trace(x) {if (z_verbose>=0) fprintf x ;}
246# define Tracev(x) {if (z_verbose>0) fprintf x ;} 251# define Tracev(x) {if (z_verbose>0) fprintf x ;}
@@ -257,8 +262,9 @@ extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
257#endif 262#endif
258 263
259 264
260voidpf zcalloc OF((voidpf opaque, unsigned items, unsigned size)); 265voidpf ZLIB_INTERNAL zcalloc OF((voidpf opaque, unsigned items,
261void zcfree OF((voidpf opaque, voidpf ptr)); 266 unsigned size));
267void ZLIB_INTERNAL zcfree OF((voidpf opaque, voidpf ptr));
262 268
263#define ZALLOC(strm, items, size) \ 269#define ZALLOC(strm, items, size) \
264 (*((strm)->zalloc))((strm)->opaque, (items), (size)) 270 (*((strm)->zalloc))((strm)->opaque, (items), (size))