summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog17
-rw-r--r--INDEX1
-rw-r--r--Makefile.in14
-rw-r--r--README7
-rwxr-xr-xconfigure3
-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/masmx64/readme.txt8
-rw-r--r--contrib/masmx86/readme.txt52
-rw-r--r--contrib/pascal/zlibpas.pas2
-rw-r--r--contrib/puff/puff.c29
-rw-r--r--contrib/puff/puff.h4
-rw-r--r--contrib/vstudio/vc10/zlib.rc6
-rw-r--r--contrib/vstudio/vc9/zlib.rc6
-rw-r--r--deflate.c2
-rw-r--r--gzguts.h12
-rw-r--r--gzlib.c6
-rw-r--r--inftrees.c4
-rw-r--r--minigzip.c5
-rw-r--r--old/visualc6/README.txt (renamed from projects/visualc6/README.txt)0
-rw-r--r--old/visualc6/example.dsp (renamed from projects/visualc6/example.dsp)0
-rw-r--r--old/visualc6/minigzip.dsp (renamed from projects/visualc6/minigzip.dsp)0
-rw-r--r--old/visualc6/zlib.dsp (renamed from projects/visualc6/zlib.dsp)0
-rw-r--r--old/visualc6/zlib.dsw (renamed from projects/visualc6/zlib.dsw)0
-rw-r--r--projects/README.projects41
-rw-r--r--qnx/package.qpg10
-rw-r--r--treebuild.xml4
-rw-r--r--win32/Makefile.msc34
-rw-r--r--win32/README-WIN32.txt6
-rw-r--r--zconf.h5
-rw-r--r--zconf.h.cmakein5
-rw-r--r--zconf.h.in5
-rw-r--r--zlib.34
-rw-r--r--zlib.3.pdfbin8679 -> 8701 bytes
-rw-r--r--zlib.h12
-rw-r--r--zutil.h12
37 files changed, 176 insertions, 148 deletions
diff --git a/ChangeLog b/ChangeLog
index 9817f59..33a740d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,23 @@
1 1
2 ChangeLog file for zlib 2 ChangeLog file for zlib
3 3
4Changes in 1.2.4.2 (9 Apr 2010)
5- Add consistent carriage returns to readme.txt's in masmx86 and masmx64
6- Really provide prototypes for *64 functions when building without LFS
7- Only define unlink() in minigzip.c if unistd.h not included
8- Update README to point to contrib/vstudio project files
9- Move projects/vc6 to old/ and remove projects/
10- Include stdlib.h in minigzip.c for setmode() definition under WinCE
11- Clean up assembler builds in win32/Makefile.msc [Rowe]
12- Include sys/types.h for Microsoft for off_t definition
13- Fix memory leak on error in gz_open()
14- Symbolize nm as $NM in configure [Weigelt]
15- Use TEST_LDSHARED instead of LDSHARED to link test programs [Weigelt]
16- Add +0 to _FILE_OFFSET_BITS and _LFS64_LARGEFILE in case not defined
17- Fix bug in gzeof() to take into account unused input data
18- Avoid initialization of structures with variables in puff.c
19- Updated win32/README-WIN32.txt [Rowe]
20
4Changes in 1.2.4.1 (28 Mar 2010) 21Changes in 1.2.4.1 (28 Mar 2010)
5- Remove the use of [a-z] constructs for sed in configure [gentoo 310225] 22- Remove the use of [a-z] constructs for sed in configure [gentoo 310225]
6- Remove $(SHAREDLIB) from LIBS in Makefile.in [Creech] 23- Remove $(SHAREDLIB) from LIBS in Makefile.in [Creech]
diff --git a/INDEX b/INDEX
index f66bf9b..f6c51ca 100644
--- a/INDEX
+++ b/INDEX
@@ -22,7 +22,6 @@ msdos/ makefiles for MSDOS
22nintendods/ makefile for Nintendo DS 22nintendods/ makefile for Nintendo DS
23old/ makefiles for various architectures and zlib documentation 23old/ makefiles for various architectures and zlib documentation
24 files that have not yet been updated for zlib 1.2.x 24 files that have not yet been updated for zlib 1.2.x
25projects/ projects for various Integrated Development Environments
26qnx/ makefiles for QNX 25qnx/ makefiles for QNX
27watcom/ makefiles for OpenWatcom 26watcom/ makefiles for OpenWatcom
28win32/ makefiles for Windows 27win32/ makefiles for Windows
diff --git a/Makefile.in b/Makefile.in
index a79f739..e5bc2a3 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -26,13 +26,13 @@ CFLAGS=-O
26 26
27SFLAGS=-O 27SFLAGS=-O
28 28
29LDFLAGS=-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.1 35SHAREDLIBV=libz.so.1.2.4.2
36SHAREDLIBM=libz.so.1 36SHAREDLIBM=libz.so.1
37LIBS=$(STATICLIB) $(SHAREDLIBV) 37LIBS=$(STATICLIB) $(SHAREDLIBV)
38 38
@@ -136,17 +136,17 @@ minigzip64.o: minigzip.c zlib.h zconf.h
136 -@mv objs/$*.o $@ 136 -@mv objs/$*.o $@
137 137
138$(SHAREDLIBV): $(PIC_OBJS) 138$(SHAREDLIBV): $(PIC_OBJS)
139 $(LDSHARED) $(SFLAGS) -o $@ $(PIC_OBJS) $(LDSHAREDLIBC) 139 $(LDSHARED) $(SFLAGS) -o $@ $(PIC_OBJS) $(LDSHAREDLIBC) $(LDFLAGS)
140 rm -f $(SHAREDLIB) $(SHAREDLIBM) 140 rm -f $(SHAREDLIB) $(SHAREDLIBM)
141 ln -s $@ $(SHAREDLIB) 141 ln -s $@ $(SHAREDLIB)
142 ln -s $@ $(SHAREDLIBM) 142 ln -s $@ $(SHAREDLIBM)
143 -@rmdir objs 143 -@rmdir objs
144 144
145example$(EXE): example.o $(STATICLIB) 145example$(EXE): example.o $(STATICLIB)
146 $(CC) $(CFLAGS) -o $@ example.o $(LDFLAGS) 146 $(CC) $(CFLAGS) -o $@ example.o $(TEST_LDFLAGS)
147 147
148minigzip$(EXE): minigzip.o $(STATICLIB) 148minigzip$(EXE): minigzip.o $(STATICLIB)
149 $(CC) $(CFLAGS) -o $@ minigzip.o $(LDFLAGS) 149 $(CC) $(CFLAGS) -o $@ minigzip.o $(TEST_LDFLAGS)
150 150
151examplesh$(EXE): example.o $(SHAREDLIBV) 151examplesh$(EXE): example.o $(SHAREDLIBV)
152 $(CC) $(CFLAGS) -o $@ example.o -L. $(SHAREDLIBV) 152 $(CC) $(CFLAGS) -o $@ example.o -L. $(SHAREDLIBV)
@@ -155,10 +155,10 @@ minigzipsh$(EXE): minigzip.o $(SHAREDLIBV)
155 $(CC) $(CFLAGS) -o $@ minigzip.o -L. $(SHAREDLIBV) 155 $(CC) $(CFLAGS) -o $@ minigzip.o -L. $(SHAREDLIBV)
156 156
157example64$(EXE): example64.o $(STATICLIB) 157example64$(EXE): example64.o $(STATICLIB)
158 $(CC) $(CFLAGS) -o $@ example64.o $(LDFLAGS) 158 $(CC) $(CFLAGS) -o $@ example64.o $(TEST_LDFLAGS)
159 159
160minigzip64$(EXE): minigzip64.o $(STATICLIB) 160minigzip64$(EXE): minigzip64.o $(STATICLIB)
161 $(CC) $(CFLAGS) -o $@ minigzip64.o $(LDFLAGS) 161 $(CC) $(CFLAGS) -o $@ minigzip64.o $(TEST_LDFLAGS)
162 162
163install-libs: $(LIBS) 163install-libs: $(LIBS)
164 -@if [ ! -d $(DESTDIR)$(exec_prefix) ]; then mkdir -p $(DESTDIR)$(exec_prefix); fi 164 -@if [ ! -d $(DESTDIR)$(exec_prefix) ]; then mkdir -p $(DESTDIR)$(exec_prefix); fi
diff --git a/README b/README
index a330267..3c4f36e 100644
--- a/README
+++ b/README
@@ -1,6 +1,6 @@
1ZLIB DATA COMPRESSION LIBRARY 1ZLIB DATA COMPRESSION LIBRARY
2 2
3zlib 1.2.4.1 is a general purpose data compression library. All the code is 3zlib 1.2.4.2 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)
@@ -16,7 +16,8 @@ minigzip.c.
16To compile all files and run the test program, follow the instructions given at 16To compile all files and run the test program, follow the instructions given at
17the top of Makefile.in. In short "./configure; make test", and if that goes 17the top of Makefile.in. In short "./configure; make test", and if that goes
18well, "make install" should work for most flavors of Unix. For Windows, use one 18well, "make install" should work for most flavors of Unix. For Windows, use one
19of the special makefiles in win32/ or projects/ . For VMS, use make_vms.com. 19of the special makefiles in win32/ or contrib/vstudio/ . For VMS, use
20make_vms.com.
20 21
21Questions about zlib should be sent to <zlib@gzip.org>, or to Gilles Vollant 22Questions about zlib should be sent to <zlib@gzip.org>, or to Gilles Vollant
22<info@winimage.com> for the Windows DLL version. The zlib home page is 23<info@winimage.com> for the Windows DLL version. The zlib home page is
@@ -30,7 +31,7 @@ Mark Nelson <markn@ieee.org> wrote an article about zlib for the Jan. 1997
30issue 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
31http://marknelson.us/1997/01/01/zlib-engine/ . 32http://marknelson.us/1997/01/01/zlib-engine/ .
32 33
33The changes made in version 1.2.4.1 are documented in the file ChangeLog. 34The changes made in version 1.2.4.2 are documented in the file ChangeLog.
34 35
35Unsupported third party contributions are provided in directory contrib/ . 36Unsupported third party contributions are provided in directory contrib/ .
36 37
diff --git a/configure b/configure
index 8a36129..577cba7 100755
--- a/configure
+++ b/configure
@@ -45,6 +45,7 @@ VER1=`sed -n -e '/VERSION "/s/.*"\([0-9]*\)\\..*/\1/p' < zlib.h`
45AR=${AR-"${CROSS_PREFIX}ar"} 45AR=${AR-"${CROSS_PREFIX}ar"}
46AR_RC="${AR} rc" 46AR_RC="${AR} rc"
47RANLIB=${RANLIB-"${CROSS_PREFIX}ranlib"} 47RANLIB=${RANLIB-"${CROSS_PREFIX}ranlib"}
48NM=${NM-"nm"}
48LDCONFIG=${LDCONFIG-"ldconfig"} 49LDCONFIG=${LDCONFIG-"ldconfig"}
49LDSHAREDLIBC="${LDSHAREDLIBC-"-lc"}" 50LDSHAREDLIBC="${LDSHAREDLIBC-"-lc"}"
50prefix=${prefix-/usr/local} 51prefix=${prefix-/usr/local}
@@ -505,7 +506,7 @@ fi
505CPP=${CPP-"$CC -E"} 506CPP=${CPP-"$CC -E"}
506case $CFLAGS in 507case $CFLAGS in
507 *ASMV*) 508 *ASMV*)
508 if test "`nm $test.o | grep _hello`" = ""; then 509 if test "`$NM $test.o | grep _hello`" = ""; then
509 CPP="$CPP -DNO_UNDERLINE" 510 CPP="$CPP -DNO_UNDERLINE"
510 echo Checking for underline in external names... No. 511 echo Checking for underline in external names... No.
511 else 512 else
diff --git a/contrib/delphi/ZLib.pas b/contrib/delphi/ZLib.pas
index 03450e7..72ef99f 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.1'; 155 zlib_version = '1.2.4.2';
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 82c749e..6cfdaa7 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.1", Info.Version); 159 Assert.AreEqual("1.2.4.2", 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 e898893..362008c 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.1 Copyright 1995-2010 Mark Adler "; 12 " inflate9 1.2.4.2 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, 67, 206}; 67 133, 133, 133, 133, 144, 202, 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/masmx64/readme.txt b/contrib/masmx64/readme.txt
index 1115d9b..2da6733 100644
--- a/contrib/masmx64/readme.txt
+++ b/contrib/masmx64/readme.txt
@@ -12,10 +12,10 @@ inffasx64.asm and inffas8664.c were written by Chris Anderson, by optimizing
12 12
13Use instructions 13Use instructions
14---------------- 14----------------
15Assemble the .asm files using MASM and put the object files into the zlib source 15Assemble the .asm files using MASM and put the object files into the zlib source
16directory. You can also get object files here: 16directory. You can also get object files here:
17 17
18 http://www.winimage.com/zLibDll/zlib124_masm_obj.zip 18 http://www.winimage.com/zLibDll/zlib124_masm_obj.zip
19 19
20define ASMV and ASMINF in your project. Include inffas8664.c in your source tree, 20define ASMV and ASMINF in your project. Include inffas8664.c in your source tree,
21and inffasx64.obj and gvmat64.obj as object to link. 21and inffasx64.obj and gvmat64.obj as object to link.
diff --git a/contrib/masmx86/readme.txt b/contrib/masmx86/readme.txt
index 90230f2..3271f72 100644
--- a/contrib/masmx86/readme.txt
+++ b/contrib/masmx86/readme.txt
@@ -1,27 +1,27 @@
1 1
2Summary 2Summary
3------- 3-------
4This directory contains ASM implementations of the functions 4This directory contains ASM implementations of the functions
5longest_match() and inflate_fast(). 5longest_match() and inflate_fast().
6 6
7 7
8Use instructions 8Use instructions
9---------------- 9----------------
10Assemble using MASM, and copy the object files into the zlib source 10Assemble using MASM, and copy the object files into the zlib source
11directory, then run the appropriate makefile, as suggested below. You can 11directory, then run the appropriate makefile, as suggested below. You can
12donwload MASM from here: 12donwload MASM from here:
13 13
14 http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=7a1c9da0-0510-44a2-b042-7ef370530c64 14 http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=7a1c9da0-0510-44a2-b042-7ef370530c64
15 15
16You can also get objects files here: 16You can also get objects files here:
17 17
18 http://www.winimage.com/zLibDll/zlib124_masm_obj.zip 18 http://www.winimage.com/zLibDll/zlib124_masm_obj.zip
19 19
20Build instructions 20Build instructions
21------------------ 21------------------
22* With Microsoft C and MASM: 22* With Microsoft C and MASM:
23nmake -f win32/Makefile.msc LOC="-DASMV -DASMINF" OBJA="match686.obj inffas32.obj" 23nmake -f win32/Makefile.msc LOC="-DASMV -DASMINF" OBJA="match686.obj inffas32.obj"
24 24
25* With Borland C and TASM: 25* With Borland C and TASM:
26make -f win32/Makefile.bor LOCAL_ZLIB="-DASMV -DASMINF" OBJA="match686.obj inffas32.obj" OBJPA="+match686c.obj+match686.obj+inffas32.obj" 26make -f win32/Makefile.bor LOCAL_ZLIB="-DASMV -DASMINF" OBJA="match686.obj inffas32.obj" OBJPA="+match686c.obj+match686.obj+inffas32.obj"
27 27
diff --git a/contrib/pascal/zlibpas.pas b/contrib/pascal/zlibpas.pas
index 9772f11..e0bc74b 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.1'; 13 ZLIB_VERSION = '1.2.4.2';
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/puff/puff.c b/contrib/puff/puff.c
index df5b79f..650694e 100644
--- a/contrib/puff/puff.c
+++ b/contrib/puff/puff.c
@@ -1,8 +1,8 @@
1/* 1/*
2 * puff.c 2 * puff.c
3 * Copyright (C) 2002-2008 Mark Adler 3 * Copyright (C) 2002-2010 Mark Adler
4 * For conditions of distribution and use, see copyright notice in puff.h 4 * For conditions of distribution and use, see copyright notice in puff.h
5 * version 2.0, 25 Jul 2008 5 * version 2.1, 4 Apr 2010
6 * 6 *
7 * puff.c is a simple inflate written to be an unambiguous way to specify the 7 * puff.c is a simple inflate written to be an unambiguous way to specify the
8 * deflate format. It is not written for speed but rather simplicity. As a 8 * deflate format. It is not written for speed but rather simplicity. As a
@@ -67,6 +67,8 @@
67 * - Add option in TEST code for puff to write the data 67 * - Add option in TEST code for puff to write the data
68 * - Add option in TEST code to skip input bytes 68 * - Add option in TEST code to skip input bytes
69 * - Allow TEST code to read from piped stdin 69 * - Allow TEST code to read from piped stdin
70 * 2.1 4 Apr 2010 - Avoid variable initialization for happier compilers
71 * - Avoid unsigned comparisons for even happier compilers
70 */ 72 */
71 73
72#include <setjmp.h> /* for setjmp(), longjmp(), and jmp_buf */ 74#include <setjmp.h> /* for setjmp(), longjmp(), and jmp_buf */
@@ -516,8 +518,7 @@ local int fixed(struct state *s)
516 static int virgin = 1; 518 static int virgin = 1;
517 static short lencnt[MAXBITS+1], lensym[FIXLCODES]; 519 static short lencnt[MAXBITS+1], lensym[FIXLCODES];
518 static short distcnt[MAXBITS+1], distsym[MAXDCODES]; 520 static short distcnt[MAXBITS+1], distsym[MAXDCODES];
519 static struct huffman lencode = {lencnt, lensym}; 521 static struct huffman lencode, distcode;
520 static struct huffman distcode = {distcnt, distsym};
521 522
522 /* build fixed huffman tables if first call (may not be thread safe) */ 523 /* build fixed huffman tables if first call (may not be thread safe) */
523 if (virgin) { 524 if (virgin) {
@@ -540,6 +541,12 @@ local int fixed(struct state *s)
540 lengths[symbol] = 5; 541 lengths[symbol] = 5;
541 construct(&distcode, lengths, MAXDCODES); 542 construct(&distcode, lengths, MAXDCODES);
542 543
544 /* construct lencode and distcode */
545 lencode.count = lencnt;
546 lencode.symbol = lensym;
547 distcode.count = distcnt;
548 distcode.symbol = distsym;
549
543 /* do this just once */ 550 /* do this just once */
544 virgin = 0; 551 virgin = 0;
545 } 552 }
@@ -643,11 +650,16 @@ local int dynamic(struct state *s)
643 short lengths[MAXCODES]; /* descriptor code lengths */ 650 short lengths[MAXCODES]; /* descriptor code lengths */
644 short lencnt[MAXBITS+1], lensym[MAXLCODES]; /* lencode memory */ 651 short lencnt[MAXBITS+1], lensym[MAXLCODES]; /* lencode memory */
645 short distcnt[MAXBITS+1], distsym[MAXDCODES]; /* distcode memory */ 652 short distcnt[MAXBITS+1], distsym[MAXDCODES]; /* distcode memory */
646 struct huffman lencode = {lencnt, lensym}; /* length code */ 653 struct huffman lencode, distcode; /* length and distance codes */
647 struct huffman distcode = {distcnt, distsym}; /* distance code */
648 static const short order[19] = /* permutation of code length codes */ 654 static const short order[19] = /* permutation of code length codes */
649 {16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15}; 655 {16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15};
650 656
657 /* construct lencode and distcode */
658 lencode.count = lencnt;
659 lencode.symbol = lensym;
660 distcode.count = distcnt;
661 distcode.symbol = distsym;
662
651 /* get number of lengths in each table, check lengths */ 663 /* get number of lengths in each table, check lengths */
652 nlen = bits(s, 5) + 257; 664 nlen = bits(s, 5) + 257;
653 ndist = bits(s, 5) + 1; 665 ndist = bits(s, 5) + 1;
@@ -869,7 +881,8 @@ local void *load(char *name, size_t *len)
869 881
870int main(int argc, char **argv) 882int main(int argc, char **argv)
871{ 883{
872 int ret, skip = 0, put = 0; 884 int ret, put = 0;
885 unsigned skip = 0;
873 char *arg, *name = NULL; 886 char *arg, *name = NULL;
874 unsigned char *source = NULL, *dest; 887 unsigned char *source = NULL, *dest;
875 size_t len = 0; 888 size_t len = 0;
@@ -881,7 +894,7 @@ int main(int argc, char **argv)
881 if (arg[1] == 'w' && arg[2] == 0) 894 if (arg[1] == 'w' && arg[2] == 0)
882 put = 1; 895 put = 1;
883 else if (arg[1] >= '0' && arg[1] <= '9') 896 else if (arg[1] >= '0' && arg[1] <= '9')
884 skip = atoi(arg + 1); 897 skip = (unsigned)atoi(arg + 1);
885 else { 898 else {
886 fprintf(stderr, "invalid option %s\n", arg); 899 fprintf(stderr, "invalid option %s\n", arg);
887 return 3; 900 return 3;
diff --git a/contrib/puff/puff.h b/contrib/puff/puff.h
index 8d7f5f8..88d1b38 100644
--- a/contrib/puff/puff.h
+++ b/contrib/puff/puff.h
@@ -1,6 +1,6 @@
1/* puff.h 1/* puff.h
2 Copyright (C) 2002-2008 Mark Adler, all rights reserved 2 Copyright (C) 2002-2010 Mark Adler, all rights reserved
3 version 1.9, 10 Jan 2008 3 version 2.1, 4 Apr 2010
4 4
5 This software is provided 'as-is', without any express or implied 5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the author be held liable for any damages 6 warranty. In no event will the author be held liable for any damages
diff --git a/contrib/vstudio/vc10/zlib.rc b/contrib/vstudio/vc10/zlib.rc
index d6b9991..38615f0 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,1 5 FILEVERSION 1,2,4,2
6 PRODUCTVERSION 1,2,4,1 6 PRODUCTVERSION 1,2,4,2
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.1\0" 20 VALUE "FileVersion", "1.2.4.2\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 d6b9991..38615f0 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,1 5 FILEVERSION 1,2,4,2
6 PRODUCTVERSION 1,2,4,1 6 PRODUCTVERSION 1,2,4,2
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.1\0" 20 VALUE "FileVersion", "1.2.4.2\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 b7fb9fc..7025528 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.1 Copyright 1995-2010 Jean-loup Gailly and Mark Adler "; 55 " deflate 1.2.4.2 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/gzguts.h b/gzguts.h
index 53857e0..a0e7119 100644
--- a/gzguts.h
+++ b/gzguts.h
@@ -3,7 +3,7 @@
3 * For conditions of distribution and use, see copyright notice in zlib.h 3 * For conditions of distribution and use, see copyright notice in zlib.h
4 */ 4 */
5 5
6#if _LARGEFILE64_SOURCE == 1 6#if _LARGEFILE64_SOURCE
7# ifndef _LARGEFILE_SOURCE 7# ifndef _LARGEFILE_SOURCE
8# define _LARGEFILE_SOURCE 1 8# define _LARGEFILE_SOURCE 1
9# endif 9# endif
@@ -56,12 +56,20 @@
56# endif 56# endif
57#endif 57#endif
58 58
59#if _LARGEFILE64_SOURCE == 1 59#if _LARGEFILE64_SOURCE
60# define z_off64_t off64_t 60# define z_off64_t off64_t
61#else 61#else
62# define z_off64_t z_off_t 62# define z_off64_t z_off_t
63#endif 63#endif
64 64
65/* provide prototypes for these when building zlib without LFS */
66#if _LARGEFILE64_SOURCE+0 != 1 || _LFS64_LARGEFILE+0 != 1
67 ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *));
68 ZEXTERN z_off_t ZEXPORT gzseek64 OF((gzFile, off_t, int));
69 ZEXTERN z_off_t ZEXPORT gztell64 OF((gzFile));
70 ZEXTERN z_off_t ZEXPORT gzoffset64 OF((gzFile));
71#endif
72
65/* default i/o buffer size -- double this for output when reading */ 73/* default i/o buffer size -- double this for output when reading */
66#define GZBUFSIZE 8192 74#define GZBUFSIZE 8192
67 75
diff --git a/gzlib.c b/gzlib.c
index 15999ae..d1b6253 100644
--- a/gzlib.c
+++ b/gzlib.c
@@ -5,7 +5,7 @@
5 5
6#include "gzguts.h" 6#include "gzguts.h"
7 7
8#if _LARGEFILE64_SOURCE == 1 && _LFS64_LARGEFILE == 1 8#if _LARGEFILE64_SOURCE && _LFS64_LARGEFILE
9# define LSEEK lseek64 9# define LSEEK lseek64
10#else 10#else
11# define LSEEK lseek 11# define LSEEK lseek
@@ -172,6 +172,7 @@ local gzFile gz_open(path, fd, mode)
172 O_APPEND))), 172 O_APPEND))),
173 0666); 173 0666);
174 if (state->fd == -1) { 174 if (state->fd == -1) {
175 free(state->path);
175 free(state); 176 free(state);
176 return NULL; 177 return NULL;
177 } 178 }
@@ -432,7 +433,8 @@ int ZEXPORT gzeof(file)
432 return 0; 433 return 0;
433 434
434 /* return end-of-file state */ 435 /* return end-of-file state */
435 return state->mode == GZ_READ ? (state->eof && state->have == 0) : 0; 436 return state->mode == GZ_READ ?
437 (state->eof && state->strm.avail_in == 0 && state->have == 0) : 0;
436} 438}
437 439
438/* -- see zlib.h -- */ 440/* -- see zlib.h -- */
diff --git a/inftrees.c b/inftrees.c
index 90de8b8..1ea90f7 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.1 Copyright 1995-2010 Mark Adler "; 12 " inflate 1.2.4.2 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
@@ -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, 206}; 65 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 202, 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/minigzip.c b/minigzip.c
index 9677fa0..f43cb54 100644
--- a/minigzip.c
+++ b/minigzip.c
@@ -32,6 +32,9 @@
32#if defined(MSDOS) || defined(OS2) || defined(WIN32) || defined(__CYGWIN__) 32#if defined(MSDOS) || defined(OS2) || defined(WIN32) || defined(__CYGWIN__)
33# include <fcntl.h> 33# include <fcntl.h>
34# include <io.h> 34# include <io.h>
35# ifdef UNDER_CE
36# include <stdlib.h>
37# endif
35# define SET_BINARY_MODE(file) setmode(fileno(file), O_BINARY) 38# define SET_BINARY_MODE(file) setmode(fileno(file), O_BINARY)
36#else 39#else
37# define SET_BINARY_MODE(file) 40# define SET_BINARY_MODE(file)
@@ -50,9 +53,11 @@
50# include <unix.h> /* for fileno */ 53# include <unix.h> /* for fileno */
51#endif 54#endif
52 55
56#if !defined(Z_HAVE_UNISTD_H) && _LARGEFILE64_SOURCE+0 != 1
53#ifndef WIN32 /* unlink already in stdio.h for WIN32 */ 57#ifndef WIN32 /* unlink already in stdio.h for WIN32 */
54 extern int unlink OF((const char *)); 58 extern int unlink OF((const char *));
55#endif 59#endif
60#endif
56 61
57#if defined(UNDER_CE) 62#if defined(UNDER_CE)
58# include <windows.h> 63# include <windows.h>
diff --git a/projects/visualc6/README.txt b/old/visualc6/README.txt
index d0296c2..d0296c2 100644
--- a/projects/visualc6/README.txt
+++ b/old/visualc6/README.txt
diff --git a/projects/visualc6/example.dsp b/old/visualc6/example.dsp
index d358052..d358052 100644
--- a/projects/visualc6/example.dsp
+++ b/old/visualc6/example.dsp
diff --git a/projects/visualc6/minigzip.dsp b/old/visualc6/minigzip.dsp
index 7103468..7103468 100644
--- a/projects/visualc6/minigzip.dsp
+++ b/old/visualc6/minigzip.dsp
diff --git a/projects/visualc6/zlib.dsp b/old/visualc6/zlib.dsp
index 00f54ea..00f54ea 100644
--- a/projects/visualc6/zlib.dsp
+++ b/old/visualc6/zlib.dsp
diff --git a/projects/visualc6/zlib.dsw b/old/visualc6/zlib.dsw
index 3a771fc..3a771fc 100644
--- a/projects/visualc6/zlib.dsw
+++ b/old/visualc6/zlib.dsw
diff --git a/projects/README.projects b/projects/README.projects
deleted file mode 100644
index 1c029e4..0000000
--- a/projects/README.projects
+++ /dev/null
@@ -1,41 +0,0 @@
1This directory contains project files for building zlib under various
2Integrated Development Environments (IDE).
3
4If you wish to submit a new project to this directory, you should comply
5to the following requirements. Otherwise (e.g. if you wish to integrate
6a custom piece of code that changes the zlib interface or its behavior),
7please consider submitting the project to the contrib directory.
8
9
10Requirements
11============
12
13- The project must build zlib using the source files from the official
14 zlib source distribution, exclusively.
15
16- If the project produces redistributable builds (e.g. shared objects
17 or DLL files), these builds must be compatible to those produced by
18 makefiles, if such makefiles exist in the zlib distribution.
19 In particular, if the project produces a DLL build for the Win32
20 platform, this build must comply to the officially-ammended Win32 DLL
21 Application Binary Interface (ABI), described in win32/DLL_FAQ.txt.
22
23- The project may provide additional build targets, which depend on
24 3rd-party (unofficially-supported) software, present in the contrib
25 directory. For example, it is possible to provide an "ASM build",
26 besides the officially-supported build, and have ASM source files
27 among its dependencies.
28
29- If there are significant differences between the project files created
30 by different versions of an IDE (e.g. Visual C++ 6.0 vs. 7.0), the name
31 of the project directory should contain the version number of the IDE
32 for which the project is intended (e.g. "visualc6" for Visual C++ 6.0,
33 or "visualc7" for Visual C++ 7.0 and 7.1).
34
35
36Current projects
37================
38
39visualc6/ by Simon-Pierre Cadieux <methodex@methodex.ca>
40 and Cosmin Truta <cosmint@cs.ubbcluj.ro>
41 Project for Microsoft Visual C++ 6.0
diff --git a/qnx/package.qpg b/qnx/package.qpg
index bf3433a..99d3701 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.1" install="/opt/lib/" user="root:bin" permission="644"/> 28 <QPG:Add file="../libz.so.1.2.4.2" 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.1"/> 29 <QPG:Add file="libz.so" install="/opt/lib/" component="dev" filetype="symlink" linkto="libz.so.1.2.4.2"/>
30 <QPG:Add file="libz.so.1" install="/opt/lib/" filetype="symlink" linkto="libz.so.1.2.4.1"/> 30 <QPG:Add file="libz.so.1" install="/opt/lib/" filetype="symlink" linkto="libz.so.1.2.4.2"/>
31 <QPG:Add file="../libz.so.1.2.4.1" install="/opt/lib/" component="slib"/> 31 <QPG:Add file="../libz.so.1.2.4.2" 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.1</QPM:ReleaseVersion> 66 <QPM:ReleaseVersion>1.2.4.2</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 e30532e..d2c6a25 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.1"> 2<package name="zlib" version="1.2.4.2">
3 <library name="zlib" dlversion="1.2.4.1" dlname="z"> 3 <library name="zlib" dlversion="1.2.4.2" 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/win32/Makefile.msc b/win32/Makefile.msc
index a731c0c..fa10a1a 100644
--- a/win32/Makefile.msc
+++ b/win32/Makefile.msc
@@ -2,15 +2,16 @@
2# zlib is copyright (C) 1995-2006 Jean-loup Gailly and Mark Adler 2# zlib is copyright (C) 1995-2006 Jean-loup Gailly and Mark Adler
3# 3#
4# Usage: 4# Usage:
5# nmake -f win32/Makefile.msc (standard build) 5# nmake -f win32/Makefile.msc (standard build)
6# nmake -f win32/Makefile.msc LOC=-DFOO (nonstandard build) 6# nmake -f win32/Makefile.msc LOC=-DFOO (nonstandard build)
7# nmake -f win32/Makefile.msc LOC=-DASMV OBJA=match.obj (use ASM code) 7# nmake -f win32/Makefile.msc LOC="-DASMV -DASMINF" \
8 8# OBJA="inffas32.obj match686.obj" (use ASM code, x86)
9# nmake -f win32/Makefile.msc AS=ml64 LOC="-DASMV -DASMINF" \
10# OBJA="inffasx64.obj gvmat64.obj inffas8664.c" (use ASM code, x64)
9 11
10# optional build flags 12# optional build flags
11LOC = 13LOC =
12 14
13
14# variables 15# variables
15STATICLIB = zlib.lib 16STATICLIB = zlib.lib
16SHAREDLIB = zlib1.dll 17SHAREDLIB = zlib1.dll
@@ -23,13 +24,13 @@ AR = lib
23RC = rc 24RC = rc
24CFLAGS = -nologo -MD -W3 -O2 -Oy- -Zi -Fd"zlib" $(LOC) 25CFLAGS = -nologo -MD -W3 -O2 -Oy- -Zi -Fd"zlib" $(LOC)
25WFLAGS = -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE 26WFLAGS = -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE
26ASFLAGS = -coff -Zi 27ASFLAGS = -coff -Zi $(LOC)
27LDFLAGS = -nologo -debug -incremental:no -opt:ref 28LDFLAGS = -nologo -debug -incremental:no -opt:ref
28ARFLAGS = -nologo 29ARFLAGS = -nologo
29RCFLAGS = /dWIN32 /r 30RCFLAGS = /dWIN32 /r
30 31
31OBJS = adler32.obj compress.obj crc32.obj deflate.obj gzclose.obj gzlib.obj gzread.obj \ 32OBJS = adler32.obj compress.obj crc32.obj deflate.obj gzclose.obj gzlib.obj gzread.obj \
32 gzwrite.obj infback.obj inffast.obj inflate.obj inftrees.obj trees.obj uncompr.obj zutil.obj 33 gzwrite.obj infback.obj inflate.obj inftrees.obj trees.obj uncompr.obj zutil.obj
33OBJA = 34OBJA =
34 35
35 36
@@ -71,7 +72,13 @@ minigzip_d.exe: minigzip.obj $(IMPLIB)
71.c.obj: 72.c.obj:
72 $(CC) -c $(WFLAGS) $(CFLAGS) $< 73 $(CC) -c $(WFLAGS) $(CFLAGS) $<
73 74
74.asm.obj: 75{contrib/masmx64}.c.obj:
76 $(CC) -c $(WFLAGS) $(CFLAGS) $<
77
78{contrib/masmx64}.asm.obj:
79 $(AS) -c $(ASFLAGS) $<
80
81{contrib/masmx86}.asm.obj:
75 $(AS) -c $(ASFLAGS) $< 82 $(AS) -c $(ASFLAGS) $<
76 83
77adler32.obj: adler32.c zlib.h zconf.h 84adler32.obj: adler32.c zlib.h zconf.h
@@ -107,6 +114,17 @@ uncompr.obj: uncompr.c zlib.h zconf.h
107 114
108zutil.obj: zutil.c zutil.h zlib.h zconf.h 115zutil.obj: zutil.c zutil.h zlib.h zconf.h
109 116
117gvmat64.obj: contrib\masmx64\gvmat64.asm
118
119inffasx64.obj: contrib\masmx64\inffasx64.asm
120
121inffas8664.obj: contrib\masmx64\inffas8664.c zutil.h zlib.h zconf.h \
122 inftrees.h inflate.h inffast.h
123
124inffas32.obj: contrib\masmx86\inffas32.asm
125
126match686.obj: contrib\masmx86\match686.asm
127
110example.obj: example.c zlib.h zconf.h 128example.obj: example.c zlib.h zconf.h
111 129
112minigzip.obj: minigzip.c zlib.h zconf.h 130minigzip.obj: minigzip.c zlib.h zconf.h
diff --git a/win32/README-WIN32.txt b/win32/README-WIN32.txt
index 35062cd..1e4c093 100644
--- a/win32/README-WIN32.txt
+++ b/win32/README-WIN32.txt
@@ -47,9 +47,9 @@ The package zlib-1.2.4-win32-x86.zip contains the following files:
47 zdll.lib Install these files into the compilers' LIB path if linking 47 zdll.lib Install these files into the compilers' LIB path if linking
48 zdll.exp a compiled program to the zlib1.dll binary 48 zdll.exp a compiled program to the zlib1.dll binary
49 49
50 zlib.lib Install these files into the compilers' LIB path if linking 50 zlib.lib Install these files into the compilers' LIB path to link zlib
51 zlib.pdb a compiled program to the zlib1.dll binary (zlib.pdb ensures 51 zlib.pdb into compiled programs, without zlib1.dll runtime dependency
52 that the resulting program may be debugged) 52 (zlib.pdb provides debugging info to the compile time linker)
53 53
54 zlib1.dll Install this binary shared library into the system PATH, or 54 zlib1.dll Install this binary shared library into the system PATH, or
55 the program's runtime directory (where the .exe resides) 55 the program's runtime directory (where the .exe resides)
diff --git a/zconf.h b/zconf.h
index 6ad8a04..d3eaf91 100644
--- a/zconf.h
+++ b/zconf.h
@@ -364,8 +364,11 @@ typedef uLong FAR uLongf;
364# define Z_HAVE_UNISTD_H 364# define Z_HAVE_UNISTD_H
365#endif 365#endif
366 366
367#if defined(Z_HAVE_UNISTD_H) || _LARGEFILE64_SOURCE == 1 367#ifdef STDC
368# include <sys/types.h> /* for off_t */ 368# include <sys/types.h> /* for off_t */
369#endif
370
371#if defined(Z_HAVE_UNISTD_H) || _LARGEFILE64_SOURCE
369# include <unistd.h> /* for SEEK_* and off_t */ 372# include <unistd.h> /* for SEEK_* and off_t */
370# ifdef VMS 373# ifdef VMS
371# include <unixio.h> /* for off_t */ 374# include <unixio.h> /* for off_t */
diff --git a/zconf.h.cmakein b/zconf.h.cmakein
index fcd5710..bbe25a7 100644
--- a/zconf.h.cmakein
+++ b/zconf.h.cmakein
@@ -366,8 +366,11 @@ typedef uLong FAR uLongf;
366# define Z_HAVE_UNISTD_H 366# define Z_HAVE_UNISTD_H
367#endif 367#endif
368 368
369#if defined(Z_HAVE_UNISTD_H) || _LARGEFILE64_SOURCE == 1 369#ifdef STDC
370# include <sys/types.h> /* for off_t */ 370# include <sys/types.h> /* for off_t */
371#endif
372
373#if defined(Z_HAVE_UNISTD_H) || _LARGEFILE64_SOURCE
371# include <unistd.h> /* for SEEK_* and off_t */ 374# include <unistd.h> /* for SEEK_* and off_t */
372# ifdef VMS 375# ifdef VMS
373# include <unixio.h> /* for off_t */ 376# include <unixio.h> /* for off_t */
diff --git a/zconf.h.in b/zconf.h.in
index 6ad8a04..d3eaf91 100644
--- a/zconf.h.in
+++ b/zconf.h.in
@@ -364,8 +364,11 @@ typedef uLong FAR uLongf;
364# define Z_HAVE_UNISTD_H 364# define Z_HAVE_UNISTD_H
365#endif 365#endif
366 366
367#if defined(Z_HAVE_UNISTD_H) || _LARGEFILE64_SOURCE == 1 367#ifdef STDC
368# include <sys/types.h> /* for off_t */ 368# include <sys/types.h> /* for off_t */
369#endif
370
371#if defined(Z_HAVE_UNISTD_H) || _LARGEFILE64_SOURCE
369# include <unistd.h> /* for SEEK_* and off_t */ 372# include <unistd.h> /* for SEEK_* and off_t */
370# ifdef VMS 373# ifdef VMS
371# include <unixio.h> /* for off_t */ 374# include <unixio.h> /* for off_t */
diff --git a/zlib.3 b/zlib.3
index 2c1679d..552318d 100644
--- a/zlib.3
+++ b/zlib.3
@@ -1,4 +1,4 @@
1.TH ZLIB 3 "28 Mar 2010" 1.TH ZLIB 3 "9 Apr 2010"
2.SH NAME 2.SH NAME
3zlib \- compression/decompression library 3zlib \- compression/decompression library
4.SH SYNOPSIS 4.SH SYNOPSIS
@@ -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.1 128Version 1.2.4.2
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 0d63b20..abbbb7f 100644
--- a/zlib.3.pdf
+++ b/zlib.3.pdf
Binary files differ
diff --git a/zlib.h b/zlib.h
index 1fcf630..25535f9 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.1, March 28th, 2010 2 version 1.2.4.2, April 9th, 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.1" 40#define ZLIB_VERSION "1.2.4.2"
41#define ZLIB_VERNUM 0x1241 41#define ZLIB_VERNUM 0x1241
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 1 45#define ZLIB_VER_SUBREVISION 2
46 46
47/* 47/*
48 The 'zlib' compression library provides in-memory compression and 48 The 'zlib' compression library provides in-memory compression and
@@ -1556,7 +1556,7 @@ ZEXTERN int ZEXPORT inflateBackInit_ OF((z_streamp strm, int windowBits,
1556 inflateBackInit_((strm), (windowBits), (window), \ 1556 inflateBackInit_((strm), (windowBits), (window), \
1557 ZLIB_VERSION, sizeof(z_stream)) 1557 ZLIB_VERSION, sizeof(z_stream))
1558 1558
1559#if _LARGEFILE64_SOURCE == 1 && _LFS64_LARGEFILE == 1 1559#if _LARGEFILE64_SOURCE && _LFS64_LARGEFILE
1560 ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *)); 1560 ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *));
1561 ZEXTERN off64_t ZEXPORT gzseek64 OF((gzFile, off64_t, int)); 1561 ZEXTERN off64_t ZEXPORT gzseek64 OF((gzFile, off64_t, int));
1562 ZEXTERN off64_t ZEXPORT gztell64 OF((gzFile)); 1562 ZEXTERN off64_t ZEXPORT gztell64 OF((gzFile));
@@ -1565,14 +1565,14 @@ ZEXTERN int ZEXPORT inflateBackInit_ OF((z_streamp strm, int windowBits,
1565 ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, off64_t)); 1565 ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, off64_t));
1566#endif 1566#endif
1567 1567
1568#if !defined(ZLIB_INTERNAL) && _FILE_OFFSET_BITS == 64 && _LFS64_LARGEFILE == 1 1568#if !defined(ZLIB_INTERNAL) && _FILE_OFFSET_BITS+0 == 64 && _LFS64_LARGEFILE
1569# define gzopen gzopen64 1569# define gzopen gzopen64
1570# define gzseek gzseek64 1570# define gzseek gzseek64
1571# define gztell gztell64 1571# define gztell gztell64
1572# define gzoffset gzoffset64 1572# define gzoffset gzoffset64
1573# define adler32_combine adler32_combine64 1573# define adler32_combine adler32_combine64
1574# define crc32_combine crc32_combine64 1574# define crc32_combine crc32_combine64
1575# if _LARGEFILE64_SOURCE != 1 1575# if _LARGEFILE64_SOURCE
1576 ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *)); 1576 ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *));
1577 ZEXTERN off_t ZEXPORT gzseek64 OF((gzFile, off_t, int)); 1577 ZEXTERN off_t ZEXPORT gzseek64 OF((gzFile, off_t, int));
1578 ZEXTERN off_t ZEXPORT gztell64 OF((gzFile)); 1578 ZEXTERN off_t ZEXPORT gztell64 OF((gzFile));
diff --git a/zutil.h b/zutil.h
index b21a19c..850f1ec 100644
--- a/zutil.h
+++ b/zutil.h
@@ -154,20 +154,16 @@ extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
154 #pragma warn -8066 154 #pragma warn -8066
155#endif 155#endif
156 156
157#if _LARGEFILE64_SOURCE == 1 && _LFS64_LARGEFILE == 1 157#if _LARGEFILE64_SOURCE && _LFS64_LARGEFILE
158# define z_off64_t off64_t 158# define z_off64_t off64_t
159#else 159#else
160# define z_off64_t z_off_t 160# define z_off64_t z_off_t
161#endif 161#endif
162 162
163/* provide prototypes for these when building zlib without LFS */ 163/* provide prototypes for these when building zlib without LFS */
164#if _LARGEFILE64_SOURCE != 1 || _LFS64_LARGEFILE != 1 164#if _LARGEFILE64_SOURCE+0 != 1 || _LFS64_LARGEFILE+0 != 1
165 ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *)); 165 ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off_t));
166 ZEXTERN off_t ZEXPORT gzseek64 OF((gzFile, off_t, int)); 166 ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off_t));
167 ZEXTERN off_t ZEXPORT gztell64 OF((gzFile));
168 ZEXTERN off_t ZEXPORT gzoffset64 OF((gzFile));
169 ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, off_t));
170 ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, off_t));
171#endif 167#endif
172 168
173 /* common defaults */ 169 /* common defaults */