diff options
Diffstat (limited to '')
| -rw-r--r-- | ChangeLog | 17 | ||||
| -rw-r--r-- | INDEX | 1 | ||||
| -rw-r--r-- | Makefile.in | 14 | ||||
| -rw-r--r-- | README | 7 | ||||
| -rwxr-xr-x | configure | 3 | ||||
| -rw-r--r-- | contrib/delphi/ZLib.pas | 2 | ||||
| -rw-r--r-- | contrib/dotzlib/DotZLib/UnitTests.cs | 2 | ||||
| -rw-r--r-- | contrib/infback9/inftree9.c | 4 | ||||
| -rw-r--r-- | contrib/masmx64/readme.txt | 8 | ||||
| -rw-r--r-- | contrib/masmx86/readme.txt | 52 | ||||
| -rw-r--r-- | contrib/pascal/zlibpas.pas | 2 | ||||
| -rw-r--r-- | contrib/puff/puff.c | 29 | ||||
| -rw-r--r-- | contrib/puff/puff.h | 4 | ||||
| -rw-r--r-- | contrib/vstudio/vc10/zlib.rc | 6 | ||||
| -rw-r--r-- | contrib/vstudio/vc9/zlib.rc | 6 | ||||
| -rw-r--r-- | deflate.c | 2 | ||||
| -rw-r--r-- | gzguts.h | 12 | ||||
| -rw-r--r-- | gzlib.c | 6 | ||||
| -rw-r--r-- | inftrees.c | 4 | ||||
| -rw-r--r-- | minigzip.c | 5 | ||||
| -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.projects | 41 | ||||
| -rw-r--r-- | qnx/package.qpg | 10 | ||||
| -rw-r--r-- | treebuild.xml | 4 | ||||
| -rw-r--r-- | win32/Makefile.msc | 34 | ||||
| -rw-r--r-- | win32/README-WIN32.txt | 6 | ||||
| -rw-r--r-- | zconf.h | 5 | ||||
| -rw-r--r-- | zconf.h.cmakein | 5 | ||||
| -rw-r--r-- | zconf.h.in | 5 | ||||
| -rw-r--r-- | zlib.3 | 4 | ||||
| -rw-r--r-- | zlib.3.pdf | bin | 8679 -> 8701 bytes | |||
| -rw-r--r-- | zlib.h | 12 | ||||
| -rw-r--r-- | zutil.h | 12 |
37 files changed, 176 insertions, 148 deletions
| @@ -1,6 +1,23 @@ | |||
| 1 | 1 | ||
| 2 | ChangeLog file for zlib | 2 | ChangeLog file for zlib |
| 3 | 3 | ||
| 4 | Changes 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 | |||
| 4 | Changes in 1.2.4.1 (28 Mar 2010) | 21 | Changes 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] |
| @@ -22,7 +22,6 @@ msdos/ makefiles for MSDOS | |||
| 22 | nintendods/ makefile for Nintendo DS | 22 | nintendods/ makefile for Nintendo DS |
| 23 | old/ makefiles for various architectures and zlib documentation | 23 | old/ 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 |
| 25 | projects/ projects for various Integrated Development Environments | ||
| 26 | qnx/ makefiles for QNX | 25 | qnx/ makefiles for QNX |
| 27 | watcom/ makefiles for OpenWatcom | 26 | watcom/ makefiles for OpenWatcom |
| 28 | win32/ makefiles for Windows | 27 | win32/ 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 | ||
| 27 | SFLAGS=-O | 27 | SFLAGS=-O |
| 28 | 28 | ||
| 29 | LDFLAGS=-L. libz.a | 29 | TEST_LDFLAGS=-L. libz.a |
| 30 | LDSHARED=$(CC) | 30 | LDSHARED=$(CC) |
| 31 | CPP=$(CC) -E | 31 | CPP=$(CC) -E |
| 32 | 32 | ||
| 33 | STATICLIB=libz.a | 33 | STATICLIB=libz.a |
| 34 | SHAREDLIB=libz.so | 34 | SHAREDLIB=libz.so |
| 35 | SHAREDLIBV=libz.so.1.2.4.1 | 35 | SHAREDLIBV=libz.so.1.2.4.2 |
| 36 | SHAREDLIBM=libz.so.1 | 36 | SHAREDLIBM=libz.so.1 |
| 37 | LIBS=$(STATICLIB) $(SHAREDLIBV) | 37 | LIBS=$(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 | ||
| 145 | example$(EXE): example.o $(STATICLIB) | 145 | example$(EXE): example.o $(STATICLIB) |
| 146 | $(CC) $(CFLAGS) -o $@ example.o $(LDFLAGS) | 146 | $(CC) $(CFLAGS) -o $@ example.o $(TEST_LDFLAGS) |
| 147 | 147 | ||
| 148 | minigzip$(EXE): minigzip.o $(STATICLIB) | 148 | minigzip$(EXE): minigzip.o $(STATICLIB) |
| 149 | $(CC) $(CFLAGS) -o $@ minigzip.o $(LDFLAGS) | 149 | $(CC) $(CFLAGS) -o $@ minigzip.o $(TEST_LDFLAGS) |
| 150 | 150 | ||
| 151 | examplesh$(EXE): example.o $(SHAREDLIBV) | 151 | examplesh$(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 | ||
| 157 | example64$(EXE): example64.o $(STATICLIB) | 157 | example64$(EXE): example64.o $(STATICLIB) |
| 158 | $(CC) $(CFLAGS) -o $@ example64.o $(LDFLAGS) | 158 | $(CC) $(CFLAGS) -o $@ example64.o $(TEST_LDFLAGS) |
| 159 | 159 | ||
| 160 | minigzip64$(EXE): minigzip64.o $(STATICLIB) | 160 | minigzip64$(EXE): minigzip64.o $(STATICLIB) |
| 161 | $(CC) $(CFLAGS) -o $@ minigzip64.o $(LDFLAGS) | 161 | $(CC) $(CFLAGS) -o $@ minigzip64.o $(TEST_LDFLAGS) |
| 162 | 162 | ||
| 163 | install-libs: $(LIBS) | 163 | install-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 |
| @@ -1,6 +1,6 @@ | |||
| 1 | ZLIB DATA COMPRESSION LIBRARY | 1 | ZLIB DATA COMPRESSION LIBRARY |
| 2 | 2 | ||
| 3 | zlib 1.2.4.1 is a general purpose data compression library. All the code is | 3 | zlib 1.2.4.2 is a general purpose data compression library. All the code is |
| 4 | thread safe. The data format used by the zlib library is described by RFCs | 4 | thread 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 |
| 6 | http://www.ietf.org/rfc/rfc1950.txt (zlib format), rfc1951.txt (deflate format) | 6 | http://www.ietf.org/rfc/rfc1950.txt (zlib format), rfc1951.txt (deflate format) |
| @@ -16,7 +16,8 @@ minigzip.c. | |||
| 16 | To compile all files and run the test program, follow the instructions given at | 16 | To compile all files and run the test program, follow the instructions given at |
| 17 | the top of Makefile.in. In short "./configure; make test", and if that goes | 17 | the top of Makefile.in. In short "./configure; make test", and if that goes |
| 18 | well, "make install" should work for most flavors of Unix. For Windows, use one | 18 | well, "make install" should work for most flavors of Unix. For Windows, use one |
| 19 | of the special makefiles in win32/ or projects/ . For VMS, use make_vms.com. | 19 | of the special makefiles in win32/ or contrib/vstudio/ . For VMS, use |
| 20 | make_vms.com. | ||
| 20 | 21 | ||
| 21 | Questions about zlib should be sent to <zlib@gzip.org>, or to Gilles Vollant | 22 | Questions 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 | |||
| 30 | issue of Dr. Dobb's Journal; a copy of the article is available at | 31 | issue of Dr. Dobb's Journal; a copy of the article is available at |
| 31 | http://marknelson.us/1997/01/01/zlib-engine/ . | 32 | http://marknelson.us/1997/01/01/zlib-engine/ . |
| 32 | 33 | ||
| 33 | The changes made in version 1.2.4.1 are documented in the file ChangeLog. | 34 | The changes made in version 1.2.4.2 are documented in the file ChangeLog. |
| 34 | 35 | ||
| 35 | Unsupported third party contributions are provided in directory contrib/ . | 36 | Unsupported third party contributions are provided in directory contrib/ . |
| 36 | 37 | ||
| @@ -45,6 +45,7 @@ VER1=`sed -n -e '/VERSION "/s/.*"\([0-9]*\)\\..*/\1/p' < zlib.h` | |||
| 45 | AR=${AR-"${CROSS_PREFIX}ar"} | 45 | AR=${AR-"${CROSS_PREFIX}ar"} |
| 46 | AR_RC="${AR} rc" | 46 | AR_RC="${AR} rc" |
| 47 | RANLIB=${RANLIB-"${CROSS_PREFIX}ranlib"} | 47 | RANLIB=${RANLIB-"${CROSS_PREFIX}ranlib"} |
| 48 | NM=${NM-"nm"} | ||
| 48 | LDCONFIG=${LDCONFIG-"ldconfig"} | 49 | LDCONFIG=${LDCONFIG-"ldconfig"} |
| 49 | LDSHAREDLIBC="${LDSHAREDLIBC-"-lc"}" | 50 | LDSHAREDLIBC="${LDSHAREDLIBC-"-lc"}" |
| 50 | prefix=${prefix-/usr/local} | 51 | prefix=${prefix-/usr/local} |
| @@ -505,7 +506,7 @@ fi | |||
| 505 | CPP=${CPP-"$CC -E"} | 506 | CPP=${CPP-"$CC -E"} |
| 506 | case $CFLAGS in | 507 | case $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 | ||
| 154 | const | 154 | const |
| 155 | zlib_version = '1.2.4.1'; | 155 | zlib_version = '1.2.4.2'; |
| 156 | 156 | ||
| 157 | type | 157 | type |
| 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 | ||
| 11 | const char inflate9_copyright[] = | 11 | const 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 | ||
| 13 | Use instructions | 13 | Use instructions |
| 14 | ---------------- | 14 | ---------------- |
| 15 | Assemble the .asm files using MASM and put the object files into the zlib source | 15 | Assemble the .asm files using MASM and put the object files into the zlib source |
| 16 | directory. You can also get object files here: | 16 | directory. 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 | ||
| 20 | define ASMV and ASMINF in your project. Include inffas8664.c in your source tree, | 20 | define ASMV and ASMINF in your project. Include inffas8664.c in your source tree, |
| 21 | and inffasx64.obj and gvmat64.obj as object to link. | 21 | and 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 | ||
| 2 | Summary | 2 | Summary |
| 3 | ------- | 3 | ------- |
| 4 | This directory contains ASM implementations of the functions | 4 | This directory contains ASM implementations of the functions |
| 5 | longest_match() and inflate_fast(). | 5 | longest_match() and inflate_fast(). |
| 6 | 6 | ||
| 7 | 7 | ||
| 8 | Use instructions | 8 | Use instructions |
| 9 | ---------------- | 9 | ---------------- |
| 10 | Assemble using MASM, and copy the object files into the zlib source | 10 | Assemble using MASM, and copy the object files into the zlib source |
| 11 | directory, then run the appropriate makefile, as suggested below. You can | 11 | directory, then run the appropriate makefile, as suggested below. You can |
| 12 | donwload MASM from here: | 12 | donwload 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 | ||
| 16 | You can also get objects files here: | 16 | You 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 | ||
| 20 | Build instructions | 20 | Build instructions |
| 21 | ------------------ | 21 | ------------------ |
| 22 | * With Microsoft C and MASM: | 22 | * With Microsoft C and MASM: |
| 23 | nmake -f win32/Makefile.msc LOC="-DASMV -DASMINF" OBJA="match686.obj inffas32.obj" | 23 | nmake -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: |
| 26 | make -f win32/Makefile.bor LOCAL_ZLIB="-DASMV -DASMINF" OBJA="match686.obj inffas32.obj" OBJPA="+match686c.obj+match686.obj+inffas32.obj" | 26 | make -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; | |||
| 10 | interface | 10 | interface |
| 11 | 11 | ||
| 12 | const | 12 | const |
| 13 | ZLIB_VERSION = '1.2.4.1'; | 13 | ZLIB_VERSION = '1.2.4.2'; |
| 14 | 14 | ||
| 15 | type | 15 | type |
| 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 | ||
| 870 | int main(int argc, char **argv) | 882 | int 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 |
| 4 | IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE | 4 | IDR_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 |
| 4 | IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE | 4 | IDR_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" |
| @@ -52,7 +52,7 @@ | |||
| 52 | #include "deflate.h" | 52 | #include "deflate.h" |
| 53 | 53 | ||
| 54 | const char deflate_copyright[] = | 54 | const 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 |
| @@ -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 | ||
| @@ -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 -- */ |
| @@ -9,7 +9,7 @@ | |||
| 9 | #define MAXBITS 15 | 9 | #define MAXBITS 15 |
| 10 | 10 | ||
| 11 | const char inflate_copyright[] = | 11 | const 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, |
| @@ -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 @@ | |||
| 1 | This directory contains project files for building zlib under various | ||
| 2 | Integrated Development Environments (IDE). | ||
| 3 | |||
| 4 | If you wish to submit a new project to this directory, you should comply | ||
| 5 | to the following requirements. Otherwise (e.g. if you wish to integrate | ||
| 6 | a custom piece of code that changes the zlib interface or its behavior), | ||
| 7 | please consider submitting the project to the contrib directory. | ||
| 8 | |||
| 9 | |||
| 10 | Requirements | ||
| 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 | |||
| 36 | Current projects | ||
| 37 | ================ | ||
| 38 | |||
| 39 | visualc6/ 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 |
| 11 | LOC = | 13 | LOC = |
| 12 | 14 | ||
| 13 | |||
| 14 | # variables | 15 | # variables |
| 15 | STATICLIB = zlib.lib | 16 | STATICLIB = zlib.lib |
| 16 | SHAREDLIB = zlib1.dll | 17 | SHAREDLIB = zlib1.dll |
| @@ -23,13 +24,13 @@ AR = lib | |||
| 23 | RC = rc | 24 | RC = rc |
| 24 | CFLAGS = -nologo -MD -W3 -O2 -Oy- -Zi -Fd"zlib" $(LOC) | 25 | CFLAGS = -nologo -MD -W3 -O2 -Oy- -Zi -Fd"zlib" $(LOC) |
| 25 | WFLAGS = -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE | 26 | WFLAGS = -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE |
| 26 | ASFLAGS = -coff -Zi | 27 | ASFLAGS = -coff -Zi $(LOC) |
| 27 | LDFLAGS = -nologo -debug -incremental:no -opt:ref | 28 | LDFLAGS = -nologo -debug -incremental:no -opt:ref |
| 28 | ARFLAGS = -nologo | 29 | ARFLAGS = -nologo |
| 29 | RCFLAGS = /dWIN32 /r | 30 | RCFLAGS = /dWIN32 /r |
| 30 | 31 | ||
| 31 | OBJS = adler32.obj compress.obj crc32.obj deflate.obj gzclose.obj gzlib.obj gzread.obj \ | 32 | OBJS = 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 |
| 33 | OBJA = | 34 | OBJA = |
| 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 | ||
| 77 | adler32.obj: adler32.c zlib.h zconf.h | 84 | adler32.obj: adler32.c zlib.h zconf.h |
| @@ -107,6 +114,17 @@ uncompr.obj: uncompr.c zlib.h zconf.h | |||
| 107 | 114 | ||
| 108 | zutil.obj: zutil.c zutil.h zlib.h zconf.h | 115 | zutil.obj: zutil.c zutil.h zlib.h zconf.h |
| 109 | 116 | ||
| 117 | gvmat64.obj: contrib\masmx64\gvmat64.asm | ||
| 118 | |||
| 119 | inffasx64.obj: contrib\masmx64\inffasx64.asm | ||
| 120 | |||
| 121 | inffas8664.obj: contrib\masmx64\inffas8664.c zutil.h zlib.h zconf.h \ | ||
| 122 | inftrees.h inflate.h inffast.h | ||
| 123 | |||
| 124 | inffas32.obj: contrib\masmx86\inffas32.asm | ||
| 125 | |||
| 126 | match686.obj: contrib\masmx86\match686.asm | ||
| 127 | |||
| 110 | example.obj: example.c zlib.h zconf.h | 128 | example.obj: example.c zlib.h zconf.h |
| 111 | 129 | ||
| 112 | minigzip.obj: minigzip.c zlib.h zconf.h | 130 | minigzip.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) |
| @@ -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 */ |
| @@ -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 */ |
| @@ -1,4 +1,4 @@ | |||
| 1 | .TH ZLIB 3 "28 Mar 2010" | 1 | .TH ZLIB 3 "9 Apr 2010" |
| 2 | .SH NAME | 2 | .SH NAME |
| 3 | zlib \- compression/decompression library | 3 | zlib \- compression/decompression library |
| 4 | .SH SYNOPSIS | 4 | .SH SYNOPSIS |
| @@ -125,7 +125,7 @@ before asking for help. | |||
| 125 | Send questions and/or comments to zlib@gzip.org, | 125 | Send questions and/or comments to zlib@gzip.org, |
| 126 | or (for the Windows DLL version) to Gilles Vollant (info@winimage.com). | 126 | or (for the Windows DLL version) to Gilles Vollant (info@winimage.com). |
| 127 | .SH AUTHORS | 127 | .SH AUTHORS |
| 128 | Version 1.2.4.1 | 128 | Version 1.2.4.2 |
| 129 | Copyright (C) 1995-2010 Jean-loup Gailly (jloup@gzip.org) | 129 | Copyright (C) 1995-2010 Jean-loup Gailly (jloup@gzip.org) |
| 130 | and Mark Adler (madler@alumni.caltech.edu). | 130 | and Mark Adler (madler@alumni.caltech.edu). |
| 131 | .LP | 131 | .LP |
| Binary files differ | |||
| @@ -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 @@ | |||
| 37 | extern "C" { | 37 | extern "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)); |
| @@ -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 */ |
