summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Adler <madler@alumni.caltech.edu>2011-09-09 23:22:21 -0700
committerMark Adler <madler@alumni.caltech.edu>2011-09-09 23:22:21 -0700
commit85e7d7d9ba71d95a9e6a64b98bae4fac09f06f1c (patch)
tree790235a70a5d719992f0bf84864e43a7a4ef376b
parent8e34b3a8024c028dd9fd21d70525fc6d215efde5 (diff)
downloadzlib-1.2.0.3.tar.gz
zlib-1.2.0.3.tar.bz2
zlib-1.2.0.3.zip
zlib 1.2.0.3v1.2.0.3
-rw-r--r--ChangeLog11
-rw-r--r--FAQ52
-rw-r--r--Makefile2
-rw-r--r--Makefile.in2
-rw-r--r--README4
-rw-r--r--contrib/minizip/unzip.c31
-rw-r--r--contrib/minizip/zconf.h326
-rw-r--r--contrib/testzlib/testzlib.vcproj4
-rw-r--r--contrib/vstudio/vc15_16/zlib16.mak13
-rw-r--r--contrib/vstudio/vc70_32/miniunz.vcproj4
-rw-r--r--contrib/vstudio/vc70_32/minizip.vcproj4
-rw-r--r--contrib/vstudio/vc70_32/zlibstat.vcproj8
-rw-r--r--contrib/vstudio/vc70_32/zlibvc.vcproj24
-rw-r--r--deflate.c2
-rw-r--r--example.c2
-rw-r--r--gzio.c5
-rw-r--r--inftrees.c4
-rw-r--r--zconf.h5
-rw-r--r--zconf.in.h5
-rw-r--r--zlib.32
-rw-r--r--zlib.h6
21 files changed, 123 insertions, 393 deletions
diff --git a/ChangeLog b/ChangeLog
index af4a655..18af4cb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
1 1
2 ChangeLog file for zlib 2 ChangeLog file for zlib
3Changes in 1.2.0.3 (19 July 2003)
4- Fix silly error in gzungetc() implementation [Vollant]
5- Update contrib/minizip and contrib/vstudio [Vollant]
6- Fix printf format in example.c
7- Correct cdecl support in zconf.in.h [Anisimkov]
8- Minor FAQ updates
9
3Changes in 1.2.0.2 (13 July 2003) 10Changes in 1.2.0.2 (13 July 2003)
4- Add ZLIB_VERNUM in zlib.h for numerical preprocessor comparisons 11- Add ZLIB_VERNUM in zlib.h for numerical preprocessor comparisons
5- Attempt to avoid warnings in crc32.c for pointer-int conversion 12- Attempt to avoid warnings in crc32.c for pointer-int conversion
@@ -31,8 +38,8 @@ Changes in 1.2.0.2 (13 July 2003)
31 - Report 2 only for level == 6 38 - Report 2 only for level == 6
32- Only deal with 64K limit when necessary at compile time [Truta] 39- Only deal with 64K limit when necessary at compile time [Truta]
33- Allow TOO_FAR check to be turned off at compile time [Truta] 40- Allow TOO_FAR check to be turned off at compile time [Truta]
34- Added gzclearerr() function [Souza] 41- Add gzclearerr() function [Souza]
35- Added gzungetc() function 42- Add gzungetc() function
36 43
37Changes in 1.2.0.1 (17 March 2003) 44Changes in 1.2.0.1 (17 March 2003)
38- Add Z_RLE strategy for run-length encoding [Truta] 45- Add Z_RLE strategy for run-length encoding [Truta]
diff --git a/FAQ b/FAQ
index b439bd9..c87759c 100644
--- a/FAQ
+++ b/FAQ
@@ -20,7 +20,7 @@ The lastest zlib FAQ is at http://www.gzip.org/zlib/zlib_faq.html
20 3. Where can I get a Visual Basic interface to zlib? 20 3. Where can I get a Visual Basic interface to zlib?
21 21
22 See 22 See
23 * http://www.winimage.com/zLibDll/cmp-z-it.zip 23 * http://www.winimage.com/zLibDll/
24 * http://www.dogma.net/markn/articles/zlibtool/zlibtool.htm 24 * http://www.dogma.net/markn/articles/zlibtool/zlibtool.htm
25 * contrib/visual-basic.txt in the zlib distribution 25 * contrib/visual-basic.txt in the zlib distribution
26 26
@@ -147,11 +147,14 @@ The lastest zlib FAQ is at http://www.gzip.org/zlib/zlib_faq.html
14722. The license says that altered source versions must be "plainly marked". So 14722. The license says that altered source versions must be "plainly marked". So
148 what exactly do I need to do to meet that requirement? 148 what exactly do I need to do to meet that requirement?
149 149
150 You need to append something the ZLIB_VERSION string in zlib.h. For 150 You need to change the ZLIB_VERSION and ZLIB_VERNUM #defines in zlib.h. In
151 example, if the version of the base zlib you are altering is "1.2.3", then 151 particular, the final version number needs to be changed to "f", and an
152 you could change the string to "1.2.3-fred-mods-v3". You should not change 152 identification string should be appended to ZLIB_VERSION. Version numbers
153 it to "1.2.4" or "1.2.3.1" since the zlib authors would like to reserve 153 x.x.x.f are reserved for modifications to zlib by others than the zlib
154 those forms of the version for their own use. 154 maintainers. For example, if the version of the base zlib you are altering
155 is "1.2.3.4", then in zlib.h you should change ZLIB_VERNUM to 0x123f, and
156 ZLIB_VERSION to something like "1.2.3.f-zachary-mods-v3". You can also
157 update the version strings in deflate.c and inftrees.c.
155 158
156 For altered source distributions, you should also note the origin and 159 For altered source distributions, you should also note the origin and
157 nature of the changes in zlib.h, as well as in ChangeLog and README, along 160 nature of the changes in zlib.h, as well as in ChangeLog and README, along
@@ -161,8 +164,8 @@ The lastest zlib FAQ is at http://www.gzip.org/zlib/zlib_faq.html
161 164
162 Note that distributing a compiled zlib library along with zlib.h and 165 Note that distributing a compiled zlib library along with zlib.h and
163 zconf.h is also a source distribution, and so you should change 166 zconf.h is also a source distribution, and so you should change
164 ZLIB_VERSION and note the origin and nature of the changes in zlib.h as you 167 ZLIB_VERSION and ZLIB_VERNUM and note the origin and nature of the changes
165 would for a full source distribution. 168 in zlib.h as you would for a full source distribution.
166 169
16723. Will zlib work on a big-endian or little-endian architecture, and can I 17023. Will zlib work on a big-endian or little-endian architecture, and can I
168 exchange compressed data between them? 171 exchange compressed data between them?
@@ -212,12 +215,20 @@ The lastest zlib FAQ is at http://www.gzip.org/zlib/zlib_faq.html
21230. Can zlib work with greater than 4 GB of data? 21530. Can zlib work with greater than 4 GB of data?
213 216
214 Yes. inflate() and deflate() will process any amount of data correctly. 217 Yes. inflate() and deflate() will process any amount of data correctly.
215 However the strm.total_in and strm_total_out counters may be limited to 218 Each call of inflate() or deflate() is limited to input and output chunks
216 4 GB. The application can easily set up its own counters updated after each 219 of the maximum value that can be stored in the compiler's "unsigned int"
217 call of inflate() or deflate() to count beyond 4 GB. compress() and 220 type, but there is no limit to the number of chunks. Note however that the
218 uncompress() may be limited to 4 GB, since they operate in a single call 221 strm.total_in and strm_total_out counters may be limited to 4 GB. These
219 using unsigned long lengths. gzseek() and gztell() may be limited to 4 GB 222 counters are provided as a convenience and are not used internally by
220 depending on how zlib is compiled. 223 inflate() or deflate(). The application can easily set up its own counters
224 updated after each call of inflate() or deflate() to count beyond 4 GB.
225 compress() and uncompress() may be limited to 4 GB, since they operate in a
226 single call. gzseek() and gztell() may be limited to 4 GB depending on how
227 zlib is compiled. See the zlibCompileFlags() function in zlib.h.
228
229 The word "may" appears several times above since there is a 4 GB limit
230 only if the compiler's "long" type is 32 bits. If the compiler's "long"
231 type is 64 bits, then the limit is 16 exabytes.
221 232
22231. Does zlib have any security vulnerabilities? 23331. Does zlib have any security vulnerabilities?
223 234
@@ -228,7 +239,7 @@ The lastest zlib FAQ is at http://www.gzip.org/zlib/zlib_faq.html
228 hand, if zlib is compiled to use snprintf() or vsnprintf(), which should 239 hand, if zlib is compiled to use snprintf() or vsnprintf(), which should
229 normally be the case, then there is no vulnerability. The ./configure 240 normally be the case, then there is no vulnerability. The ./configure
230 script will display warnings if an insecure variation of sprintf() will 241 script will display warnings if an insecure variation of sprintf() will
231 be used by gzprintf(). Also the zlibCompileFlags() functions will return 242 be used by gzprintf(). Also the zlibCompileFlags() function will return
232 information on what variant of sprintf() is used by gzprintf(). 243 information on what variant of sprintf() is used by gzprintf().
233 244
234 If you don't have snprintf() or vsnprintf() and would like one, you can 245 If you don't have snprintf() or vsnprintf() and would like one, you can
@@ -262,9 +273,10 @@ The lastest zlib FAQ is at http://www.gzip.org/zlib/zlib_faq.html
262 273
26335. How can I encrypt/decrypt zip files with zlib? 27435. How can I encrypt/decrypt zip files with zlib?
264 275
265 zlib doesn't support encryption. PKZIP encryption is very weak and can be 276 zlib doesn't support encryption. The original PKZIP encryption is very weak
266 broken with freely available programs. To get strong encryption, use gpg 277 and can be broken with freely available programs. To get strong encryption,
267 which already includes zlib compression. 278 use gpg ( http://www.gnupg.org/ ) which already includes zlib compression.
279 For PKZIP compatible "encryption", look at http://www.info-zip.org/
268 280
26936. What's the difference between the "gzip" and "deflate" HTTP 1.1 encodings? 28136. What's the difference between the "gzip" and "deflate" HTTP 1.1 encodings?
270 282
@@ -280,6 +292,8 @@ The lastest zlib FAQ is at http://www.gzip.org/zlib/zlib_faq.html
280 for), using the "gzip" transfer encoding is probably more reliable due to 292 for), using the "gzip" transfer encoding is probably more reliable due to
281 an unfortunate choice of name on the part of the HTTP 1.1 authors. 293 an unfortunate choice of name on the part of the HTTP 1.1 authors.
282 294
295 Bottom line: use the gzip format for HTTP 1.1 encoding.
296
28337. Does zlib support the new "Deflate64" format introduced by PKWare? 29737. Does zlib support the new "Deflate64" format introduced by PKWare?
284 298
285 No. PKWare has apparently decided to keep that format proprietary, since 299 No. PKWare has apparently decided to keep that format proprietary, since
@@ -290,4 +304,4 @@ The lastest zlib FAQ is at http://www.gzip.org/zlib/zlib_faq.html
29038. Can you please sign these lengthy legal documents and fax them back to us 30438. Can you please sign these lengthy legal documents and fax them back to us
291 so that we can use your software in our product? 305 so that we can use your software in our product?
292 306
293 No. Go away. 307 No. Go away. Shoo.
diff --git a/Makefile b/Makefile
index 6fbe392..b1370ef 100644
--- a/Makefile
+++ b/Makefile
@@ -24,7 +24,7 @@ LDFLAGS=libz.a
24LDSHARED=$(CC) 24LDSHARED=$(CC)
25CPP=$(CC) -E 25CPP=$(CC) -E
26 26
27VER=1.2.0.2 27VER=1.2.0.3
28LIBS=libz.a 28LIBS=libz.a
29SHAREDLIB=libz.so 29SHAREDLIB=libz.so
30 30
diff --git a/Makefile.in b/Makefile.in
index 6fbe392..b1370ef 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -24,7 +24,7 @@ LDFLAGS=libz.a
24LDSHARED=$(CC) 24LDSHARED=$(CC)
25CPP=$(CC) -E 25CPP=$(CC) -E
26 26
27VER=1.2.0.2 27VER=1.2.0.3
28LIBS=libz.a 28LIBS=libz.a
29SHAREDLIB=libz.so 29SHAREDLIB=libz.so
30 30
diff --git a/README b/README
index cc489ac..9c40c48 100644
--- a/README
+++ b/README
@@ -1,6 +1,6 @@
1ZLIB DATA COMPRESSION LIBRARY 1ZLIB DATA COMPRESSION LIBRARY
2 2
3zlib 1.2.0.2 is a general purpose data compression library. All the code is 3zlib 1.2.0.3 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)
@@ -34,7 +34,7 @@ Mark Nelson <markn@ieee.org> wrote an article about zlib for the Jan. 1997
34issue of Dr. Dobb's Journal; a copy of the article is available in 34issue of Dr. Dobb's Journal; a copy of the article is available in
35http://dogma.net/markn/articles/zlibtool/zlibtool.htm 35http://dogma.net/markn/articles/zlibtool/zlibtool.htm
36 36
37The changes made in version 1.2.0.2 are documented in the file ChangeLog. 37The changes made in version 1.2.0.3 are documented in the file ChangeLog.
38 38
39Unsupported third party contributions are provided in directory "contrib". 39Unsupported third party contributions are provided in directory "contrib".
40 40
diff --git a/contrib/minizip/unzip.c b/contrib/minizip/unzip.c
index 07d869e..96f9f33 100644
--- a/contrib/minizip/unzip.c
+++ b/contrib/minizip/unzip.c
@@ -828,7 +828,11 @@ extern int ZEXPORT unzLocateFile (file, szFileName, iCaseSensitivity)
828 unz_s* s; 828 unz_s* s;
829 int err; 829 int err;
830 830
831 831 /* We remember the 'current' position in the file so that we can jump
832 * back there if we fail.
833 */
834 unz_file_info cur_file_infoSaved;
835 unz_file_info_internal cur_file_info_internalSaved;
832 uLong num_fileSaved; 836 uLong num_fileSaved;
833 uLong pos_in_central_dirSaved; 837 uLong pos_in_central_dirSaved;
834 838
@@ -843,25 +847,36 @@ extern int ZEXPORT unzLocateFile (file, szFileName, iCaseSensitivity)
843 if (!s->current_file_ok) 847 if (!s->current_file_ok)
844 return UNZ_END_OF_LIST_OF_FILE; 848 return UNZ_END_OF_LIST_OF_FILE;
845 849
850 /* Save the current state */
846 num_fileSaved = s->num_file; 851 num_fileSaved = s->num_file;
847 pos_in_central_dirSaved = s->pos_in_central_dir; 852 pos_in_central_dirSaved = s->pos_in_central_dir;
853 cur_file_infoSaved = s->cur_file_info;
854 cur_file_info_internalSaved = s->cur_file_info_internal;
848 855
849 err = unzGoToFirstFile(file); 856 err = unzGoToFirstFile(file);
850 857
851 while (err == UNZ_OK) 858 while (err == UNZ_OK)
852 { 859 {
853 char szCurrentFileName[UNZ_MAXFILENAMEINZIP+1]; 860 char szCurrentFileName[UNZ_MAXFILENAMEINZIP+1];
854 unzGetCurrentFileInfo(file,NULL, 861 err = unzGetCurrentFileInfo(file,NULL,
855 szCurrentFileName,sizeof(szCurrentFileName)-1, 862 szCurrentFileName,sizeof(szCurrentFileName)-1,
856 NULL,0,NULL,0); 863 NULL,0,NULL,0);
857 if (unzStringFileNameCompare(szCurrentFileName, 864 if (err == UNZ_OK)
858 szFileName,iCaseSensitivity)==0) 865 {
859 return UNZ_OK; 866 if (unzStringFileNameCompare(szCurrentFileName,
860 err = unzGoToNextFile(file); 867 szFileName,iCaseSensitivity)==0)
868 return UNZ_OK;
869 err = unzGoToNextFile(file);
870 }
861 } 871 }
862 872
873 /* We failed, so restore the state of the 'current file' to where we
874 * were.
875 */
863 s->num_file = num_fileSaved ; 876 s->num_file = num_fileSaved ;
864 s->pos_in_central_dir = pos_in_central_dirSaved ; 877 s->pos_in_central_dir = pos_in_central_dirSaved ;
878 s->cur_file_info = cur_file_infoSaved;
879 s->cur_file_info_internal = cur_file_info_internalSaved;
865 return err; 880 return err;
866} 881}
867 882
diff --git a/contrib/minizip/zconf.h b/contrib/minizip/zconf.h
deleted file mode 100644
index 8e6215a..0000000
--- a/contrib/minizip/zconf.h
+++ /dev/null
@@ -1,326 +0,0 @@
1/* zconf.h -- configuration of the zlib compression library
2 * Copyright (C) 1995-2003 Jean-loup Gailly.
3 * For conditions of distribution and use, see copyright notice in zlib.h
4 */
5
6/* @(#) $Id$ */
7
8#ifndef _ZCONF_H
9#define _ZCONF_H
10
11/*
12 * If you *really* need a unique prefix for all types and library functions,
13 * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it.
14 */
15#ifdef Z_PREFIX
16# define deflateInit_ z_deflateInit_
17# define deflate z_deflate
18# define deflateEnd z_deflateEnd
19# define inflateInit_ z_inflateInit_
20# define inflate z_inflate
21# define inflateEnd z_inflateEnd
22# define deflateInit2_ z_deflateInit2_
23# define deflateSetDictionary z_deflateSetDictionary
24# define deflateCopy z_deflateCopy
25# define deflateReset z_deflateReset
26# define deflateParams z_deflateParams
27# define deflateBound z_deflateBound
28# define inflateInit2_ z_inflateInit2_
29# define inflateSetDictionary z_inflateSetDictionary
30# define inflateSync z_inflateSync
31# define inflateSyncPoint z_inflateSyncPoint
32# define inflateCopy z_inflateCopy
33# define inflateReset z_inflateReset
34# define compress z_compress
35# define compress2 z_compress2
36# define compressBound z_compressBound
37# define uncompress z_uncompress
38# define adler32 z_adler32
39# define crc32 z_crc32
40# define get_crc_table z_get_crc_table
41
42# define Byte z_Byte
43# define uInt z_uInt
44# define uLong z_uLong
45# define Bytef z_Bytef
46# define charf z_charf
47# define intf z_intf
48# define uIntf z_uIntf
49# define uLongf z_uLongf
50# define voidpf z_voidpf
51# define voidp z_voidp
52#endif
53
54
55#ifdef __STDC_VERSION__
56# ifndef STDC
57# define STDC
58# endif
59# if __STDC_VERSION__ >= 199901L
60# ifndef STDC99
61# define STDC99
62# endif
63# endif
64#endif
65
66
67#if (defined(_WIN32) || defined(__WIN32__)) && !defined(WIN32)
68# define WIN32
69#endif
70#if defined(__GNUC__) || defined(WIN32) || defined(__386__) || defined(i386)
71# ifndef __32BIT__
72# define __32BIT__
73# endif
74#endif
75#if defined(__MSDOS__) && !defined(MSDOS)
76# define MSDOS
77#endif
78
79/*
80 * Compile with -DMAXSEG_64K if the alloc function cannot allocate more
81 * than 64k bytes at a time (needed on systems with 16-bit int).
82 */
83#if defined(MSDOS) && !defined(__32BIT__)
84# define MAXSEG_64K
85#endif
86#ifdef MSDOS
87# define UNALIGNED_OK
88#endif
89
90#if (defined(MSDOS) || defined(_WINDOWS) || defined(WIN32)) && !defined(STDC)
91# define STDC
92#endif
93#if defined(__STDC__) || defined(__cplusplus) || defined(__OS2__)
94# ifndef STDC
95# define STDC
96# endif
97#endif
98
99#if defined __HOS_AIX__
100# ifndef STDC
101# define STDC
102# endif
103#endif
104
105#ifndef STDC
106# ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */
107# define const /* note: need a more gentle solution here */
108# endif
109#endif
110
111/* Some Mac compilers merge all .h files incorrectly: */
112#if defined(__MWERKS__) || defined(applec) ||defined(THINK_C) ||defined(__SC__)
113# define NO_DUMMY_DECL
114#endif
115
116/* Old Borland C incorrectly complains about missing returns: */
117#if defined(__BORLANDC__) && (__BORLANDC__ < 0x460)
118# define NEED_DUMMY_RETURN
119#endif
120#if defined(__TURBOC__) && !defined(__BORLANDC__)
121# define NEED_DUMMY_RETURN
122#endif
123
124
125/* Maximum value for memLevel in deflateInit2 */
126#ifndef MAX_MEM_LEVEL
127# ifdef MAXSEG_64K
128# define MAX_MEM_LEVEL 8
129# else
130# define MAX_MEM_LEVEL 9
131# endif
132#endif
133
134/* Maximum value for windowBits in deflateInit2 and inflateInit2.
135 * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files
136 * created by gzip. (Files created by minigzip can still be extracted by
137 * gzip.)
138 */
139#ifndef MAX_WBITS
140# define MAX_WBITS 15 /* 32K LZ77 window */
141#endif
142
143/* The memory requirements for deflate are (in bytes):
144 (1 << (windowBits+2)) + (1 << (memLevel+9))
145 that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values)
146 plus a few kilobytes for small objects. For example, if you want to reduce
147 the default memory requirements from 256K to 128K, compile with
148 make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"
149 Of course this will generally degrade compression (there's no free lunch).
150
151 The memory requirements for inflate are (in bytes) 1 << windowBits
152 that is, 32K for windowBits=15 (default value) plus a few kilobytes
153 for small objects.
154*/
155
156 /* Type declarations */
157
158#ifndef OF /* function prototypes */
159# ifdef STDC
160# define OF(args) args
161# else
162# define OF(args) ()
163# endif
164#endif
165
166/*
167 * Microsoft Visual Studio define _vsnprintf but not vsnprintf
168 */
169#if !defined(STDC99) && !(defined(__TURBOC__) && __TURBOC__ >= 0x550) && !defined(VSNPRINTF_DEFINED)
170# ifdef MSDOS
171 /* vsnprintf may exist on some MS-DOS compilers (DJGPP?),
172 but for now we just assume it doesn't. */
173# define NO_vsnprintf
174# endif
175# ifdef WIN32
176 /* In Win32, vsnprintf is available as the "non-ANSI" _vsnprintf. */
177# if !defined(vsnprintf) && !defined(__TURBOC__)
178# define vsnprintf _vsnprintf
179# endif
180# endif
181# ifdef __TURBOC__
182# define NO_vsnprintf
183# endif
184#endif
185
186/* The following definitions for FAR are needed only for MSDOS mixed
187 * model programming (small or medium model with some far allocations).
188 * This was tested only with MSC; for other MSDOS compilers you may have
189 * to define NO_MEMCPY in zutil.h. If you don't need the mixed model,
190 * just define FAR to be empty.
191 */
192#if (defined(M_I86SM) || defined(M_I86MM)) && !defined(__32BIT__)
193 /* MSC small or medium model */
194# define SMALL_MEDIUM
195# ifdef _MSC_VER
196# define FAR _far
197# else
198# define FAR far
199# endif
200#endif
201#if defined(__BORLANDC__) && (defined(__SMALL__) || defined(__MEDIUM__))
202# ifndef __32BIT__
203# define SMALL_MEDIUM
204# define FAR _far
205# endif
206#endif
207
208#if defined(WIN32) && (!defined(ZLIB_WIN32_NODLL)) && (!defined(ZLIB_DLL))
209# define ZLIB_DLL
210#endif
211
212/* Compile with -DZLIB_DLL for Windows DLL support */
213#if defined(ZLIB_DLL)
214# if defined(_WINDOWS) || defined(WINDOWS) || defined(WIN32)
215# ifndef WINAPIV
216# ifdef FAR
217# undef FAR
218# endif
219# include <windows.h>
220# endif
221# ifdef WIN32
222# define ZEXPORT WINAPI
223# define ZEXPORTVA WINAPIV
224# else
225# define ZEXPORT WINAPI _export
226# define ZEXPORTVA FAR _cdecl _export
227# endif
228# endif
229# if defined (__BORLANDC__)
230# if (__BORLANDC__ >= 0x0500) && defined (WIN32)
231# include <windows.h>
232# define ZEXPORT __declspec(dllexport) WINAPI
233# define ZEXPORTVA __declspec(dllexport) WINAPIV
234# else
235# if defined (_Windows) && defined (__DLL__)
236# define ZEXPORT _export
237# define ZEXPORTVA _export
238# endif
239# endif
240# endif
241#endif
242
243#if defined (__BEOS__)
244# if defined (ZLIB_DLL)
245# define ZEXTERN extern __declspec(dllexport)
246# else
247# define ZEXTERN extern __declspec(dllimport)
248# endif
249#endif
250
251#ifndef ZEXPORT
252# define ZEXPORT
253#endif
254#ifndef ZEXPORTVA
255# define ZEXPORTVA
256#endif
257#ifndef ZEXTERN
258# define ZEXTERN extern
259#endif
260
261#ifndef FAR
262# define FAR
263#endif
264
265#if !defined(__MACTYPES__)
266typedef unsigned char Byte; /* 8 bits */
267#endif
268typedef unsigned int uInt; /* 16 bits or more */
269typedef unsigned long uLong; /* 32 bits or more */
270
271#ifdef SMALL_MEDIUM
272 /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */
273# define Bytef Byte FAR
274#else
275 typedef Byte FAR Bytef;
276#endif
277typedef char FAR charf;
278typedef int FAR intf;
279typedef uInt FAR uIntf;
280typedef uLong FAR uLongf;
281
282#ifdef STDC
283 typedef void const *voidpc;
284 typedef void FAR *voidpf;
285 typedef void *voidp;
286#else
287 typedef Byte const *voidpc;
288 typedef Byte FAR *voidpf;
289 typedef Byte *voidp;
290#endif
291
292#if 0 /* HAVE_UNISTD_H -- this line is updated by ./configure */
293# include <sys/types.h> /* for off_t */
294# include <unistd.h> /* for SEEK_* and off_t */
295# ifdef VMS
296# include <unixio.h> /* for off_t */
297# endif
298# define z_off_t off_t
299#endif
300#ifndef SEEK_SET
301# define SEEK_SET 0 /* Seek from beginning of file. */
302# define SEEK_CUR 1 /* Seek from current position. */
303# define SEEK_END 2 /* Set file pointer to EOF plus "offset" */
304#endif
305#ifndef z_off_t
306# define z_off_t long
307#endif
308
309/* MVS linker does not support external names larger than 8 bytes */
310#if defined(__MVS__)
311# pragma map(deflateInit_,"DEIN")
312# pragma map(deflateInit2_,"DEIN2")
313# pragma map(deflateEnd,"DEEND")
314# pragma map(deflateBound,"DEBND")
315# pragma map(inflateInit_,"ININ")
316# pragma map(inflateInit2_,"ININ2")
317# pragma map(inflateEnd,"INEND")
318# pragma map(inflateSync,"INSY")
319# pragma map(inflateSetDictionary,"INSEDI")
320# pragma map(compressBound,"CMBND")
321# pragma map(inflate_table,"INTABL")
322# pragma map(inflate_fast,"INFA")
323# pragma map(inflate_copyright,"INCOPY")
324#endif
325
326#endif /* _ZCONF_H */
diff --git a/contrib/testzlib/testzlib.vcproj b/contrib/testzlib/testzlib.vcproj
index 8e4233a..5165301 100644
--- a/contrib/testzlib/testzlib.vcproj
+++ b/contrib/testzlib/testzlib.vcproj
@@ -19,7 +19,7 @@
19 <Tool 19 <Tool
20 Name="VCCLCompilerTool" 20 Name="VCCLCompilerTool"
21 Optimization="0" 21 Optimization="0"
22 PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" 22 PreprocessorDefinitions="WIN32;ZLIB_DLL;_DEBUG;_CONSOLE"
23 MinimalRebuild="TRUE" 23 MinimalRebuild="TRUE"
24 BasicRuntimeChecks="3" 24 BasicRuntimeChecks="3"
25 RuntimeLibrary="5" 25 RuntimeLibrary="5"
@@ -63,7 +63,7 @@
63 Optimization="2" 63 Optimization="2"
64 InlineFunctionExpansion="1" 64 InlineFunctionExpansion="1"
65 OmitFramePointers="TRUE" 65 OmitFramePointers="TRUE"
66 PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" 66 PreprocessorDefinitions="WIN32;ZLIB_DLL;NDEBUG;_CONSOLE"
67 StringPooling="TRUE" 67 StringPooling="TRUE"
68 RuntimeLibrary="4" 68 RuntimeLibrary="4"
69 EnableFunctionLevelLinking="TRUE" 69 EnableFunctionLevelLinking="TRUE"
diff --git a/contrib/vstudio/vc15_16/zlib16.mak b/contrib/vstudio/vc15_16/zlib16.mak
index 75c8d80..cb65885 100644
--- a/contrib/vstudio/vc15_16/zlib16.mak
+++ b/contrib/vstudio/vc15_16/zlib16.mak
@@ -22,8 +22,8 @@ CPPUSEPCHFLAG =
22FIRSTC = ADLER32.C 22FIRSTC = ADLER32.C
23FIRSTCPP = 23FIRSTCPP =
24RC = rc 24RC = rc
25CFLAGS_D_WDLL = /nologo /G2 /W3 /Zi /ALw /Od /D "_DEBUG" /D "WINDOWS" /D "ZLIB_DLL" /FR /GD /Fd"ZLIB.PDB" 25CFLAGS_D_WDLL = /nologo /G2 /W3 /Zi /ALw /Od /D "_DEBUG" /D "WINDOWS" /D "ZLIB_DLL" /D "ZLIB_INTERNAL" /FR /GD /Fd"ZLIB.PDB"
26CFLAGS_R_WDLL = /nologo /W3 /ALw /O1 /D "NDEBUG" /D "WINDOWS" /D "ZLIB_DLL" /FR /GD 26CFLAGS_R_WDLL = /nologo /W3 /ALw /O1 /D "NDEBUG" /D "WINDOWS" /D "ZLIB_DLL" /D "ZLIB_INTERNAL" /FR /GD
27LFLAGS_D_WDLL = /NOLOGO /ONERROR:NOEXE /NOD /PACKC:61440 /CO /NOE /ALIGN:16 /MAP:FULL 27LFLAGS_D_WDLL = /NOLOGO /ONERROR:NOEXE /NOD /PACKC:61440 /CO /NOE /ALIGN:16 /MAP:FULL
28LFLAGS_R_WDLL = /NOLOGO /ONERROR:NOEXE /NOD /PACKC:61440 /NOE /ALIGN:16 /MAP:FULL 28LFLAGS_R_WDLL = /NOLOGO /ONERROR:NOEXE /NOD /PACKC:61440 /NOE /ALIGN:16 /MAP:FULL
29LIBS_D_WDLL = oldnames libw commdlg shell olecli olesvr ldllcew 29LIBS_D_WDLL = oldnames libw commdlg shell olecli olesvr ldllcew
@@ -74,7 +74,8 @@ COMPRESS_DEP = c:\zlib\zlib.h \
74 c:\zlib\zconf.h 74 c:\zlib\zconf.h
75 75
76 76
77CRC32_DEP = c:\zlib\zlib.h \ 77CRC32_DEP = c:\zlib\zutil.h \
78 c:\zlib\zlib.h \
78 c:\zlib\zconf.h \ 79 c:\zlib\zconf.h \
79 c:\zlib\crc32.h 80 c:\zlib\crc32.h
80 81
@@ -128,13 +129,15 @@ ZLIB16_RCDEP =
128ZIP_DEP = c:\zlib\zlib.h \ 129ZIP_DEP = c:\zlib\zlib.h \
129 c:\zlib\zconf.h \ 130 c:\zlib\zconf.h \
130 c:\zlib\zip.h \ 131 c:\zlib\zip.h \
131 c:\zlib\ioapi.h 132 c:\zlib\ioapi.h \
133 c:\zlib\crypt.h
132 134
133 135
134UNZIP_DEP = c:\zlib\zlib.h \ 136UNZIP_DEP = c:\zlib\zlib.h \
135 c:\zlib\zconf.h \ 137 c:\zlib\zconf.h \
136 c:\zlib\unzip.h \ 138 c:\zlib\unzip.h \
137 c:\zlib\ioapi.h 139 c:\zlib\ioapi.h \
140 c:\zlib\crypt.h
138 141
139 142
140INFBACK_DEP = c:\zlib\zutil.h \ 143INFBACK_DEP = c:\zlib\zutil.h \
diff --git a/contrib/vstudio/vc70_32/miniunz.vcproj b/contrib/vstudio/vc70_32/miniunz.vcproj
index 56f0da3..1c6967f 100644
--- a/contrib/vstudio/vc70_32/miniunz.vcproj
+++ b/contrib/vstudio/vc70_32/miniunz.vcproj
@@ -19,7 +19,7 @@
19 <Tool 19 <Tool
20 Name="VCCLCompilerTool" 20 Name="VCCLCompilerTool"
21 Optimization="0" 21 Optimization="0"
22 PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" 22 PreprocessorDefinitions="WIN32;ZLIB_DLL;_DEBUG;_CONSOLE"
23 MinimalRebuild="TRUE" 23 MinimalRebuild="TRUE"
24 BasicRuntimeChecks="3" 24 BasicRuntimeChecks="3"
25 RuntimeLibrary="5" 25 RuntimeLibrary="5"
@@ -63,7 +63,7 @@
63 Optimization="2" 63 Optimization="2"
64 InlineFunctionExpansion="1" 64 InlineFunctionExpansion="1"
65 OmitFramePointers="TRUE" 65 OmitFramePointers="TRUE"
66 PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" 66 PreprocessorDefinitions="WIN32;ZLIB_DLL;NDEBUG;_CONSOLE"
67 StringPooling="TRUE" 67 StringPooling="TRUE"
68 RuntimeLibrary="4" 68 RuntimeLibrary="4"
69 EnableFunctionLevelLinking="TRUE" 69 EnableFunctionLevelLinking="TRUE"
diff --git a/contrib/vstudio/vc70_32/minizip.vcproj b/contrib/vstudio/vc70_32/minizip.vcproj
index 2cc5aca..93e2a41 100644
--- a/contrib/vstudio/vc70_32/minizip.vcproj
+++ b/contrib/vstudio/vc70_32/minizip.vcproj
@@ -19,7 +19,7 @@
19 <Tool 19 <Tool
20 Name="VCCLCompilerTool" 20 Name="VCCLCompilerTool"
21 Optimization="0" 21 Optimization="0"
22 PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" 22 PreprocessorDefinitions="WIN32;ZLIB_DLL;_DEBUG;_CONSOLE"
23 MinimalRebuild="TRUE" 23 MinimalRebuild="TRUE"
24 BasicRuntimeChecks="3" 24 BasicRuntimeChecks="3"
25 RuntimeLibrary="5" 25 RuntimeLibrary="5"
@@ -63,7 +63,7 @@
63 Optimization="2" 63 Optimization="2"
64 InlineFunctionExpansion="1" 64 InlineFunctionExpansion="1"
65 OmitFramePointers="TRUE" 65 OmitFramePointers="TRUE"
66 PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" 66 PreprocessorDefinitions="WIN32;ZLIB_DLL;NDEBUG;_CONSOLE"
67 StringPooling="TRUE" 67 StringPooling="TRUE"
68 RuntimeLibrary="4" 68 RuntimeLibrary="4"
69 EnableFunctionLevelLinking="TRUE" 69 EnableFunctionLevelLinking="TRUE"
diff --git a/contrib/vstudio/vc70_32/zlibstat.vcproj b/contrib/vstudio/vc70_32/zlibstat.vcproj
index 94d4a63..7470b58 100644
--- a/contrib/vstudio/vc70_32/zlibstat.vcproj
+++ b/contrib/vstudio/vc70_32/zlibstat.vcproj
@@ -20,7 +20,7 @@
20 <Tool 20 <Tool
21 Name="VCCLCompilerTool" 21 Name="VCCLCompilerTool"
22 Optimization="0" 22 Optimization="0"
23 PreprocessorDefinitions="WIN32" 23 PreprocessorDefinitions="WIN32;ZLIB_DLL"
24 ExceptionHandling="FALSE" 24 ExceptionHandling="FALSE"
25 RuntimeLibrary="5" 25 RuntimeLibrary="5"
26 PrecompiledHeaderFile=".\zlibstatDebug/zlibstat.pch" 26 PrecompiledHeaderFile=".\zlibstatDebug/zlibstat.pch"
@@ -61,7 +61,7 @@
61 <Tool 61 <Tool
62 Name="VCCLCompilerTool" 62 Name="VCCLCompilerTool"
63 InlineFunctionExpansion="1" 63 InlineFunctionExpansion="1"
64 PreprocessorDefinitions="WIN32" 64 PreprocessorDefinitions="WIN32;ZLIB_DLL"
65 StringPooling="TRUE" 65 StringPooling="TRUE"
66 ExceptionHandling="FALSE" 66 ExceptionHandling="FALSE"
67 RuntimeLibrary="4" 67 RuntimeLibrary="4"
@@ -102,7 +102,7 @@
102 <Tool 102 <Tool
103 Name="VCCLCompilerTool" 103 Name="VCCLCompilerTool"
104 InlineFunctionExpansion="1" 104 InlineFunctionExpansion="1"
105 PreprocessorDefinitions="WIN32,ASMV" 105 PreprocessorDefinitions="WIN32;ZLIB_DLL,ASMV"
106 StringPooling="TRUE" 106 StringPooling="TRUE"
107 ExceptionHandling="FALSE" 107 ExceptionHandling="FALSE"
108 RuntimeLibrary="4" 108 RuntimeLibrary="4"
@@ -144,7 +144,7 @@
144 <Tool 144 <Tool
145 Name="VCCLCompilerTool" 145 Name="VCCLCompilerTool"
146 InlineFunctionExpansion="1" 146 InlineFunctionExpansion="1"
147 PreprocessorDefinitions="WIN32" 147 PreprocessorDefinitions="WIN32;ZLIB_DLL"
148 StringPooling="TRUE" 148 StringPooling="TRUE"
149 ExceptionHandling="FALSE" 149 ExceptionHandling="FALSE"
150 RuntimeLibrary="4" 150 RuntimeLibrary="4"
diff --git a/contrib/vstudio/vc70_32/zlibvc.vcproj b/contrib/vstudio/vc70_32/zlibvc.vcproj
index fcf9892..7a9e83a 100644
--- a/contrib/vstudio/vc70_32/zlibvc.vcproj
+++ b/contrib/vstudio/vc70_32/zlibvc.vcproj
@@ -20,7 +20,7 @@
20 <Tool 20 <Tool
21 Name="VCCLCompilerTool" 21 Name="VCCLCompilerTool"
22 Optimization="0" 22 Optimization="0"
23 PreprocessorDefinitions="WIN32,ASMV" 23 PreprocessorDefinitions="WIN32,ZLIB_DLL,ASMV"
24 ExceptionHandling="FALSE" 24 ExceptionHandling="FALSE"
25 RuntimeLibrary="1" 25 RuntimeLibrary="1"
26 PrecompiledHeaderFile=".\DebugDll/zlibvc.pch" 26 PrecompiledHeaderFile=".\DebugDll/zlibvc.pch"
@@ -76,7 +76,7 @@
76 <Tool 76 <Tool
77 Name="VCCLCompilerTool" 77 Name="VCCLCompilerTool"
78 InlineFunctionExpansion="1" 78 InlineFunctionExpansion="1"
79 PreprocessorDefinitions="WIN32" 79 PreprocessorDefinitions="WIN32,ZLIB_DLL"
80 StringPooling="TRUE" 80 StringPooling="TRUE"
81 ExceptionHandling="FALSE" 81 ExceptionHandling="FALSE"
82 RuntimeLibrary="0" 82 RuntimeLibrary="0"
@@ -138,7 +138,7 @@
138 <Tool 138 <Tool
139 Name="VCCLCompilerTool" 139 Name="VCCLCompilerTool"
140 InlineFunctionExpansion="1" 140 InlineFunctionExpansion="1"
141 PreprocessorDefinitions="WIN32,ASMV" 141 PreprocessorDefinitions="WIN32,ZLIB_DLL,ASMV"
142 StringPooling="TRUE" 142 StringPooling="TRUE"
143 ExceptionHandling="FALSE" 143 ExceptionHandling="FALSE"
144 RuntimeLibrary="0" 144 RuntimeLibrary="0"
@@ -200,7 +200,7 @@
200 <Tool 200 <Tool
201 Name="VCCLCompilerTool" 201 Name="VCCLCompilerTool"
202 InlineFunctionExpansion="1" 202 InlineFunctionExpansion="1"
203 PreprocessorDefinitions="WIN32" 203 PreprocessorDefinitions="WIN32,ZLIB_DLL"
204 StringPooling="TRUE" 204 StringPooling="TRUE"
205 ExceptionHandling="FALSE" 205 ExceptionHandling="FALSE"
206 RuntimeLibrary="0" 206 RuntimeLibrary="0"
@@ -260,7 +260,7 @@
260 <Tool 260 <Tool
261 Name="VCCLCompilerTool" 261 Name="VCCLCompilerTool"
262 InlineFunctionExpansion="1" 262 InlineFunctionExpansion="1"
263 PreprocessorDefinitions="WIN32,ASMV" 263 PreprocessorDefinitions="WIN32,ZLIB_DLL,ASMV"
264 StringPooling="TRUE" 264 StringPooling="TRUE"
265 ExceptionHandling="FALSE" 265 ExceptionHandling="FALSE"
266 RuntimeLibrary="0" 266 RuntimeLibrary="0"
@@ -379,9 +379,23 @@
379 </File> 379 </File>
380 <File 380 <File
381 RelativePath=".\unzip.c"> 381 RelativePath=".\unzip.c">
382 <FileConfiguration
383 Name="Release|Win32">
384 <Tool
385 Name="VCCLCompilerTool"
386 AdditionalIncludeDirectories=""
387 PreprocessorDefinitions="ZLIB_INTERNAL"/>
388 </FileConfiguration>
382 </File> 389 </File>
383 <File 390 <File
384 RelativePath=".\zip.c"> 391 RelativePath=".\zip.c">
392 <FileConfiguration
393 Name="Release|Win32">
394 <Tool
395 Name="VCCLCompilerTool"
396 AdditionalIncludeDirectories=""
397 PreprocessorDefinitions="ZLIB_INTERNAL"/>
398 </FileConfiguration>
385 </File> 399 </File>
386 <File 400 <File
387 RelativePath=".\zlib.rc"> 401 RelativePath=".\zlib.rc">
diff --git a/deflate.c b/deflate.c
index bb160d8..77b2dd5 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.0.2 Copyright 1995-2003 Jean-loup Gailly "; 55 " deflate 1.2.0.3 Copyright 1995-2003 Jean-loup Gailly ";
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/example.c b/example.c
index 3c53a93..622c9e6 100644
--- a/example.c
+++ b/example.c
@@ -528,7 +528,7 @@ int main(argc, argv)
528 fprintf(stderr, "warning: different zlib version\n"); 528 fprintf(stderr, "warning: different zlib version\n");
529 } 529 }
530 530
531 printf("zlib version %s = 0x%04x, compile flags = 0x%x\n", 531 printf("zlib version %s = 0x%04x, compile flags = 0x%lx\n",
532 ZLIB_VERSION, ZLIB_VERNUM, zlibCompileFlags()); 532 ZLIB_VERSION, ZLIB_VERNUM, zlibCompileFlags());
533 533
534 compr = (Byte*)calloc((uInt)comprLen, 1); 534 compr = (Byte*)calloc((uInt)comprLen, 1);
diff --git a/gzio.c b/gzio.c
index 14fc33c..1beb47f 100644
--- a/gzio.c
+++ b/gzio.c
@@ -506,7 +506,8 @@ int ZEXPORT gzungetc(c, file)
506 s->back = c; 506 s->back = c;
507 s->stream.total_out--; 507 s->stream.total_out--;
508 s->last = (s->z_err == Z_STREAM_END); 508 s->last = (s->z_err == Z_STREAM_END);
509 if (s->z_eof) s->z_eof = 0; 509 if (s->last) s->z_err = Z_OK;
510 s->z_eof = 0;
510 return c; 511 return c;
511} 512}
512 513
@@ -812,7 +813,7 @@ z_off_t ZEXPORT gzseek (file, offset, whence)
812 if (s->outbuf == Z_NULL) return -1L; 813 if (s->outbuf == Z_NULL) return -1L;
813 } 814 }
814 if (offset && s->back != EOF) { 815 if (offset && s->back != EOF) {
815 s->back == EOF; 816 s->back = EOF;
816 s->stream.total_out++; 817 s->stream.total_out++;
817 offset--; 818 offset--;
818 if (s->last) s->z_err = Z_STREAM_END; 819 if (s->last) s->z_err = Z_STREAM_END;
diff --git a/inftrees.c b/inftrees.c
index fda5537..35ab097 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.0.2 Copyright 1995-2003 Mark Adler "; 12 " inflate 1.2.0.3 Copyright 1995-2003 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
@@ -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, 67, 201}; 65 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 193, 193};
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/zconf.h b/zconf.h
index b17d420..28e9235 100644
--- a/zconf.h
+++ b/zconf.h
@@ -183,20 +183,21 @@
183# define ZEXPORT WINAPI _export 183# define ZEXPORT WINAPI _export
184# define ZEXPORTVA FAR _cdecl _export 184# define ZEXPORTVA FAR _cdecl _export
185# else 185# else
186# define ZEXPORT WINAPI 186# define ZEXPORT FAR _cdecl
187# define ZEXPORTVA FAR _cdecl 187# define ZEXPORTVA FAR _cdecl
188# endif 188# endif
189# else 189# else
190 /* a fully Win32-compliant compiler */ 190 /* a fully Win32-compliant compiler */
191# define ZEXPORT WINAPI
192# define ZEXPORTVA CDECL 191# define ZEXPORTVA CDECL
193# ifdef ZLIB_DLL 192# ifdef ZLIB_DLL
193# define ZEXPORT WINAPI
194# ifdef ZLIB_INTERNAL 194# ifdef ZLIB_INTERNAL
195# define ZEXTERN extern __declspec(dllexport) 195# define ZEXTERN extern __declspec(dllexport)
196# else 196# else
197# define ZEXTERN extern __declspec(dllimport) 197# define ZEXTERN extern __declspec(dllimport)
198# endif 198# endif
199# else 199# else
200# define ZEXPORT CDECL
200# define ZEXTERN extern 201# define ZEXTERN extern
201# endif 202# endif
202# endif 203# endif
diff --git a/zconf.in.h b/zconf.in.h
index b17d420..28e9235 100644
--- a/zconf.in.h
+++ b/zconf.in.h
@@ -183,20 +183,21 @@
183# define ZEXPORT WINAPI _export 183# define ZEXPORT WINAPI _export
184# define ZEXPORTVA FAR _cdecl _export 184# define ZEXPORTVA FAR _cdecl _export
185# else 185# else
186# define ZEXPORT WINAPI 186# define ZEXPORT FAR _cdecl
187# define ZEXPORTVA FAR _cdecl 187# define ZEXPORTVA FAR _cdecl
188# endif 188# endif
189# else 189# else
190 /* a fully Win32-compliant compiler */ 190 /* a fully Win32-compliant compiler */
191# define ZEXPORT WINAPI
192# define ZEXPORTVA CDECL 191# define ZEXPORTVA CDECL
193# ifdef ZLIB_DLL 192# ifdef ZLIB_DLL
193# define ZEXPORT WINAPI
194# ifdef ZLIB_INTERNAL 194# ifdef ZLIB_INTERNAL
195# define ZEXTERN extern __declspec(dllexport) 195# define ZEXTERN extern __declspec(dllexport)
196# else 196# else
197# define ZEXTERN extern __declspec(dllimport) 197# define ZEXTERN extern __declspec(dllimport)
198# endif 198# endif
199# else 199# else
200# define ZEXPORT CDECL
200# define ZEXTERN extern 201# define ZEXTERN extern
201# endif 202# endif
202# endif 203# endif
diff --git a/zlib.3 b/zlib.3
index 949c87e..69cdce2 100644
--- a/zlib.3
+++ b/zlib.3
@@ -133,7 +133,7 @@ before asking for help.
133Send questions and/or comments to zlib@gzip.org, 133Send questions and/or comments to zlib@gzip.org,
134or (for the Windows DLL version) to Gilles Vollant (info@winimage.com). 134or (for the Windows DLL version) to Gilles Vollant (info@winimage.com).
135.SH AUTHORS 135.SH AUTHORS
136Version 1.2.0.1 136Version 1.2.0.3
137Copyright (C) 1995-2003 Jean-loup Gailly (jloup@gzip.org) 137Copyright (C) 1995-2003 Jean-loup Gailly (jloup@gzip.org)
138and Mark Adler (madler@alumni.caltech.edu). 138and Mark Adler (madler@alumni.caltech.edu).
139.LP 139.LP
diff --git a/zlib.h b/zlib.h
index 95370d4..43a1ac6 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.0.2, July 13th, 2003 2 version 1.2.0.3, July 19th, 2003
3 3
4 Copyright (C) 1995-2003 Jean-loup Gailly and Mark Adler 4 Copyright (C) 1995-2003 Jean-loup Gailly and Mark Adler
5 5
@@ -37,8 +37,8 @@
37extern "C" { 37extern "C" {
38#endif 38#endif
39 39
40#define ZLIB_VERSION "1.2.0.2" 40#define ZLIB_VERSION "1.2.0.3"
41#define ZLIB_VERNUM 0x1202 41#define ZLIB_VERNUM 0x1203
42 42
43/* 43/*
44 The 'zlib' compression library provides in-memory compression and 44 The 'zlib' compression library provides in-memory compression and