zlib 1.2.4.2
This commit is contained in:
parent
05d47d2627
commit
7147f24cd7
17
ChangeLog
17
ChangeLog
@ -1,6 +1,23 @@
|
||||
|
||||
ChangeLog file for zlib
|
||||
|
||||
Changes in 1.2.4.2 (9 Apr 2010)
|
||||
- Add consistent carriage returns to readme.txt's in masmx86 and masmx64
|
||||
- Really provide prototypes for *64 functions when building without LFS
|
||||
- Only define unlink() in minigzip.c if unistd.h not included
|
||||
- Update README to point to contrib/vstudio project files
|
||||
- Move projects/vc6 to old/ and remove projects/
|
||||
- Include stdlib.h in minigzip.c for setmode() definition under WinCE
|
||||
- Clean up assembler builds in win32/Makefile.msc [Rowe]
|
||||
- Include sys/types.h for Microsoft for off_t definition
|
||||
- Fix memory leak on error in gz_open()
|
||||
- Symbolize nm as $NM in configure [Weigelt]
|
||||
- Use TEST_LDSHARED instead of LDSHARED to link test programs [Weigelt]
|
||||
- Add +0 to _FILE_OFFSET_BITS and _LFS64_LARGEFILE in case not defined
|
||||
- Fix bug in gzeof() to take into account unused input data
|
||||
- Avoid initialization of structures with variables in puff.c
|
||||
- Updated win32/README-WIN32.txt [Rowe]
|
||||
|
||||
Changes in 1.2.4.1 (28 Mar 2010)
|
||||
- Remove the use of [a-z] constructs for sed in configure [gentoo 310225]
|
||||
- Remove $(SHAREDLIB) from LIBS in Makefile.in [Creech]
|
||||
|
1
INDEX
1
INDEX
@ -22,7 +22,6 @@ msdos/ makefiles for MSDOS
|
||||
nintendods/ makefile for Nintendo DS
|
||||
old/ makefiles for various architectures and zlib documentation
|
||||
files that have not yet been updated for zlib 1.2.x
|
||||
projects/ projects for various Integrated Development Environments
|
||||
qnx/ makefiles for QNX
|
||||
watcom/ makefiles for OpenWatcom
|
||||
win32/ makefiles for Windows
|
||||
|
14
Makefile.in
14
Makefile.in
@ -26,13 +26,13 @@ CFLAGS=-O
|
||||
|
||||
SFLAGS=-O
|
||||
|
||||
LDFLAGS=-L. libz.a
|
||||
TEST_LDFLAGS=-L. libz.a
|
||||
LDSHARED=$(CC)
|
||||
CPP=$(CC) -E
|
||||
|
||||
STATICLIB=libz.a
|
||||
SHAREDLIB=libz.so
|
||||
SHAREDLIBV=libz.so.1.2.4.1
|
||||
SHAREDLIBV=libz.so.1.2.4.2
|
||||
SHAREDLIBM=libz.so.1
|
||||
LIBS=$(STATICLIB) $(SHAREDLIBV)
|
||||
|
||||
@ -136,17 +136,17 @@ minigzip64.o: minigzip.c zlib.h zconf.h
|
||||
-@mv objs/$*.o $@
|
||||
|
||||
$(SHAREDLIBV): $(PIC_OBJS)
|
||||
$(LDSHARED) $(SFLAGS) -o $@ $(PIC_OBJS) $(LDSHAREDLIBC)
|
||||
$(LDSHARED) $(SFLAGS) -o $@ $(PIC_OBJS) $(LDSHAREDLIBC) $(LDFLAGS)
|
||||
rm -f $(SHAREDLIB) $(SHAREDLIBM)
|
||||
ln -s $@ $(SHAREDLIB)
|
||||
ln -s $@ $(SHAREDLIBM)
|
||||
-@rmdir objs
|
||||
|
||||
example$(EXE): example.o $(STATICLIB)
|
||||
$(CC) $(CFLAGS) -o $@ example.o $(LDFLAGS)
|
||||
$(CC) $(CFLAGS) -o $@ example.o $(TEST_LDFLAGS)
|
||||
|
||||
minigzip$(EXE): minigzip.o $(STATICLIB)
|
||||
$(CC) $(CFLAGS) -o $@ minigzip.o $(LDFLAGS)
|
||||
$(CC) $(CFLAGS) -o $@ minigzip.o $(TEST_LDFLAGS)
|
||||
|
||||
examplesh$(EXE): example.o $(SHAREDLIBV)
|
||||
$(CC) $(CFLAGS) -o $@ example.o -L. $(SHAREDLIBV)
|
||||
@ -155,10 +155,10 @@ minigzipsh$(EXE): minigzip.o $(SHAREDLIBV)
|
||||
$(CC) $(CFLAGS) -o $@ minigzip.o -L. $(SHAREDLIBV)
|
||||
|
||||
example64$(EXE): example64.o $(STATICLIB)
|
||||
$(CC) $(CFLAGS) -o $@ example64.o $(LDFLAGS)
|
||||
$(CC) $(CFLAGS) -o $@ example64.o $(TEST_LDFLAGS)
|
||||
|
||||
minigzip64$(EXE): minigzip64.o $(STATICLIB)
|
||||
$(CC) $(CFLAGS) -o $@ minigzip64.o $(LDFLAGS)
|
||||
$(CC) $(CFLAGS) -o $@ minigzip64.o $(TEST_LDFLAGS)
|
||||
|
||||
install-libs: $(LIBS)
|
||||
-@if [ ! -d $(DESTDIR)$(exec_prefix) ]; then mkdir -p $(DESTDIR)$(exec_prefix); fi
|
||||
|
7
README
7
README
@ -1,6 +1,6 @@
|
||||
ZLIB DATA COMPRESSION LIBRARY
|
||||
|
||||
zlib 1.2.4.1 is a general purpose data compression library. All the code is
|
||||
zlib 1.2.4.2 is a general purpose data compression library. All the code is
|
||||
thread safe. The data format used by the zlib library is described by RFCs
|
||||
(Request for Comments) 1950 to 1952 in the files
|
||||
http://www.ietf.org/rfc/rfc1950.txt (zlib format), rfc1951.txt (deflate format)
|
||||
@ -16,7 +16,8 @@ minigzip.c.
|
||||
To compile all files and run the test program, follow the instructions given at
|
||||
the top of Makefile.in. In short "./configure; make test", and if that goes
|
||||
well, "make install" should work for most flavors of Unix. For Windows, use one
|
||||
of the special makefiles in win32/ or projects/ . For VMS, use make_vms.com.
|
||||
of the special makefiles in win32/ or contrib/vstudio/ . For VMS, use
|
||||
make_vms.com.
|
||||
|
||||
Questions about zlib should be sent to <zlib@gzip.org>, or to Gilles Vollant
|
||||
<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
|
||||
issue of Dr. Dobb's Journal; a copy of the article is available at
|
||||
http://marknelson.us/1997/01/01/zlib-engine/ .
|
||||
|
||||
The changes made in version 1.2.4.1 are documented in the file ChangeLog.
|
||||
The changes made in version 1.2.4.2 are documented in the file ChangeLog.
|
||||
|
||||
Unsupported third party contributions are provided in directory contrib/ .
|
||||
|
||||
|
3
configure
vendored
3
configure
vendored
@ -45,6 +45,7 @@ VER1=`sed -n -e '/VERSION "/s/.*"\([0-9]*\)\\..*/\1/p' < zlib.h`
|
||||
AR=${AR-"${CROSS_PREFIX}ar"}
|
||||
AR_RC="${AR} rc"
|
||||
RANLIB=${RANLIB-"${CROSS_PREFIX}ranlib"}
|
||||
NM=${NM-"nm"}
|
||||
LDCONFIG=${LDCONFIG-"ldconfig"}
|
||||
LDSHAREDLIBC="${LDSHAREDLIBC-"-lc"}"
|
||||
prefix=${prefix-/usr/local}
|
||||
@ -505,7 +506,7 @@ fi
|
||||
CPP=${CPP-"$CC -E"}
|
||||
case $CFLAGS in
|
||||
*ASMV*)
|
||||
if test "`nm $test.o | grep _hello`" = ""; then
|
||||
if test "`$NM $test.o | grep _hello`" = ""; then
|
||||
CPP="$CPP -DNO_UNDERLINE"
|
||||
echo Checking for underline in external names... No.
|
||||
else
|
||||
|
@ -152,7 +152,7 @@ procedure DecompressToUserBuf(const InBuf: Pointer; InBytes: Integer;
|
||||
const OutBuf: Pointer; BufSize: Integer);
|
||||
|
||||
const
|
||||
zlib_version = '1.2.4.1';
|
||||
zlib_version = '1.2.4.2';
|
||||
|
||||
type
|
||||
EZlibError = class(Exception);
|
||||
|
@ -156,7 +156,7 @@ namespace DotZLibTests
|
||||
public void Info_Version()
|
||||
{
|
||||
Info info = new Info();
|
||||
Assert.AreEqual("1.2.4.1", Info.Version);
|
||||
Assert.AreEqual("1.2.4.2", Info.Version);
|
||||
Assert.AreEqual(32, info.SizeOfUInt);
|
||||
Assert.AreEqual(32, info.SizeOfULong);
|
||||
Assert.AreEqual(32, info.SizeOfPointer);
|
||||
|
@ -9,7 +9,7 @@
|
||||
#define MAXBITS 15
|
||||
|
||||
const char inflate9_copyright[] =
|
||||
" inflate9 1.2.4.1 Copyright 1995-2010 Mark Adler ";
|
||||
" inflate9 1.2.4.2 Copyright 1995-2010 Mark Adler ";
|
||||
/*
|
||||
If you use the zlib library in a product, an acknowledgment is welcome
|
||||
in the documentation of your product. If for some reason you cannot
|
||||
@ -64,7 +64,7 @@ unsigned short FAR *work;
|
||||
static const unsigned short lext[31] = { /* Length codes 257..285 extra */
|
||||
128, 128, 128, 128, 128, 128, 128, 128, 129, 129, 129, 129,
|
||||
130, 130, 130, 130, 131, 131, 131, 131, 132, 132, 132, 132,
|
||||
133, 133, 133, 133, 144, 67, 206};
|
||||
133, 133, 133, 133, 144, 202, 75};
|
||||
static const unsigned short dbase[32] = { /* Distance codes 0..31 base */
|
||||
1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49,
|
||||
65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073,
|
||||
|
@ -12,10 +12,10 @@ inffasx64.asm and inffas8664.c were written by Chris Anderson, by optimizing
|
||||
|
||||
Use instructions
|
||||
----------------
|
||||
Assemble the .asm files using MASM and put the object files into the zlib source
|
||||
directory. You can also get object files here:
|
||||
|
||||
http://www.winimage.com/zLibDll/zlib124_masm_obj.zip
|
||||
Assemble the .asm files using MASM and put the object files into the zlib source
|
||||
directory. You can also get object files here:
|
||||
|
||||
http://www.winimage.com/zLibDll/zlib124_masm_obj.zip
|
||||
|
||||
define ASMV and ASMINF in your project. Include inffas8664.c in your source tree,
|
||||
and inffasx64.obj and gvmat64.obj as object to link.
|
||||
|
@ -1,27 +1,27 @@
|
||||
|
||||
Summary
|
||||
-------
|
||||
This directory contains ASM implementations of the functions
|
||||
longest_match() and inflate_fast().
|
||||
|
||||
|
||||
Use instructions
|
||||
----------------
|
||||
Assemble using MASM, and copy the object files into the zlib source
|
||||
directory, then run the appropriate makefile, as suggested below. You can
|
||||
donwload MASM from here:
|
||||
|
||||
|
||||
Summary
|
||||
-------
|
||||
This directory contains ASM implementations of the functions
|
||||
longest_match() and inflate_fast().
|
||||
|
||||
|
||||
Use instructions
|
||||
----------------
|
||||
Assemble using MASM, and copy the object files into the zlib source
|
||||
directory, then run the appropriate makefile, as suggested below. You can
|
||||
donwload MASM from here:
|
||||
|
||||
http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=7a1c9da0-0510-44a2-b042-7ef370530c64
|
||||
|
||||
You can also get objects files here:
|
||||
|
||||
http://www.winimage.com/zLibDll/zlib124_masm_obj.zip
|
||||
|
||||
Build instructions
|
||||
------------------
|
||||
* With Microsoft C and MASM:
|
||||
nmake -f win32/Makefile.msc LOC="-DASMV -DASMINF" OBJA="match686.obj inffas32.obj"
|
||||
|
||||
* With Borland C and TASM:
|
||||
make -f win32/Makefile.bor LOCAL_ZLIB="-DASMV -DASMINF" OBJA="match686.obj inffas32.obj" OBJPA="+match686c.obj+match686.obj+inffas32.obj"
|
||||
|
||||
|
||||
You can also get objects files here:
|
||||
|
||||
http://www.winimage.com/zLibDll/zlib124_masm_obj.zip
|
||||
|
||||
Build instructions
|
||||
------------------
|
||||
* With Microsoft C and MASM:
|
||||
nmake -f win32/Makefile.msc LOC="-DASMV -DASMINF" OBJA="match686.obj inffas32.obj"
|
||||
|
||||
* With Borland C and TASM:
|
||||
make -f win32/Makefile.bor LOCAL_ZLIB="-DASMV -DASMINF" OBJA="match686.obj inffas32.obj" OBJPA="+match686c.obj+match686.obj+inffas32.obj"
|
||||
|
||||
|
@ -10,7 +10,7 @@ unit zlibpas;
|
||||
interface
|
||||
|
||||
const
|
||||
ZLIB_VERSION = '1.2.4.1';
|
||||
ZLIB_VERSION = '1.2.4.2';
|
||||
|
||||
type
|
||||
alloc_func = function(opaque: Pointer; items, size: Integer): Pointer;
|
||||
|
@ -1,8 +1,8 @@
|
||||
/*
|
||||
* puff.c
|
||||
* Copyright (C) 2002-2008 Mark Adler
|
||||
* Copyright (C) 2002-2010 Mark Adler
|
||||
* For conditions of distribution and use, see copyright notice in puff.h
|
||||
* version 2.0, 25 Jul 2008
|
||||
* version 2.1, 4 Apr 2010
|
||||
*
|
||||
* puff.c is a simple inflate written to be an unambiguous way to specify the
|
||||
* deflate format. It is not written for speed but rather simplicity. As a
|
||||
@ -67,6 +67,8 @@
|
||||
* - Add option in TEST code for puff to write the data
|
||||
* - Add option in TEST code to skip input bytes
|
||||
* - Allow TEST code to read from piped stdin
|
||||
* 2.1 4 Apr 2010 - Avoid variable initialization for happier compilers
|
||||
* - Avoid unsigned comparisons for even happier compilers
|
||||
*/
|
||||
|
||||
#include <setjmp.h> /* for setjmp(), longjmp(), and jmp_buf */
|
||||
@ -516,8 +518,7 @@ local int fixed(struct state *s)
|
||||
static int virgin = 1;
|
||||
static short lencnt[MAXBITS+1], lensym[FIXLCODES];
|
||||
static short distcnt[MAXBITS+1], distsym[MAXDCODES];
|
||||
static struct huffman lencode = {lencnt, lensym};
|
||||
static struct huffman distcode = {distcnt, distsym};
|
||||
static struct huffman lencode, distcode;
|
||||
|
||||
/* build fixed huffman tables if first call (may not be thread safe) */
|
||||
if (virgin) {
|
||||
@ -540,6 +541,12 @@ local int fixed(struct state *s)
|
||||
lengths[symbol] = 5;
|
||||
construct(&distcode, lengths, MAXDCODES);
|
||||
|
||||
/* construct lencode and distcode */
|
||||
lencode.count = lencnt;
|
||||
lencode.symbol = lensym;
|
||||
distcode.count = distcnt;
|
||||
distcode.symbol = distsym;
|
||||
|
||||
/* do this just once */
|
||||
virgin = 0;
|
||||
}
|
||||
@ -643,11 +650,16 @@ local int dynamic(struct state *s)
|
||||
short lengths[MAXCODES]; /* descriptor code lengths */
|
||||
short lencnt[MAXBITS+1], lensym[MAXLCODES]; /* lencode memory */
|
||||
short distcnt[MAXBITS+1], distsym[MAXDCODES]; /* distcode memory */
|
||||
struct huffman lencode = {lencnt, lensym}; /* length code */
|
||||
struct huffman distcode = {distcnt, distsym}; /* distance code */
|
||||
struct huffman lencode, distcode; /* length and distance codes */
|
||||
static const short order[19] = /* permutation of code length codes */
|
||||
{16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15};
|
||||
|
||||
/* construct lencode and distcode */
|
||||
lencode.count = lencnt;
|
||||
lencode.symbol = lensym;
|
||||
distcode.count = distcnt;
|
||||
distcode.symbol = distsym;
|
||||
|
||||
/* get number of lengths in each table, check lengths */
|
||||
nlen = bits(s, 5) + 257;
|
||||
ndist = bits(s, 5) + 1;
|
||||
@ -869,7 +881,8 @@ local void *load(char *name, size_t *len)
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
int ret, skip = 0, put = 0;
|
||||
int ret, put = 0;
|
||||
unsigned skip = 0;
|
||||
char *arg, *name = NULL;
|
||||
unsigned char *source = NULL, *dest;
|
||||
size_t len = 0;
|
||||
@ -881,7 +894,7 @@ int main(int argc, char **argv)
|
||||
if (arg[1] == 'w' && arg[2] == 0)
|
||||
put = 1;
|
||||
else if (arg[1] >= '0' && arg[1] <= '9')
|
||||
skip = atoi(arg + 1);
|
||||
skip = (unsigned)atoi(arg + 1);
|
||||
else {
|
||||
fprintf(stderr, "invalid option %s\n", arg);
|
||||
return 3;
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* puff.h
|
||||
Copyright (C) 2002-2008 Mark Adler, all rights reserved
|
||||
version 1.9, 10 Jan 2008
|
||||
Copyright (C) 2002-2010 Mark Adler, all rights reserved
|
||||
version 2.1, 4 Apr 2010
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the author be held liable for any damages
|
||||
|
@ -2,8 +2,8 @@
|
||||
|
||||
#define IDR_VERSION1 1
|
||||
IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE
|
||||
FILEVERSION 1,2,4,1
|
||||
PRODUCTVERSION 1,2,4,1
|
||||
FILEVERSION 1,2,4,2
|
||||
PRODUCTVERSION 1,2,4,2
|
||||
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
|
||||
FILEFLAGS 0
|
||||
FILEOS VOS_DOS_WINDOWS32
|
||||
@ -17,7 +17,7 @@ BEGIN
|
||||
|
||||
BEGIN
|
||||
VALUE "FileDescription", "zlib data compression and ZIP file I/O library\0"
|
||||
VALUE "FileVersion", "1.2.4.1\0"
|
||||
VALUE "FileVersion", "1.2.4.2\0"
|
||||
VALUE "InternalName", "zlib\0"
|
||||
VALUE "OriginalFilename", "zlib.dll\0"
|
||||
VALUE "ProductName", "ZLib.DLL\0"
|
||||
|
@ -2,8 +2,8 @@
|
||||
|
||||
#define IDR_VERSION1 1
|
||||
IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE
|
||||
FILEVERSION 1,2,4,1
|
||||
PRODUCTVERSION 1,2,4,1
|
||||
FILEVERSION 1,2,4,2
|
||||
PRODUCTVERSION 1,2,4,2
|
||||
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
|
||||
FILEFLAGS 0
|
||||
FILEOS VOS_DOS_WINDOWS32
|
||||
@ -17,7 +17,7 @@ BEGIN
|
||||
|
||||
BEGIN
|
||||
VALUE "FileDescription", "zlib data compression and ZIP file I/O library\0"
|
||||
VALUE "FileVersion", "1.2.4.1\0"
|
||||
VALUE "FileVersion", "1.2.4.2\0"
|
||||
VALUE "InternalName", "zlib\0"
|
||||
VALUE "OriginalFilename", "zlib.dll\0"
|
||||
VALUE "ProductName", "ZLib.DLL\0"
|
||||
|
@ -52,7 +52,7 @@
|
||||
#include "deflate.h"
|
||||
|
||||
const char deflate_copyright[] =
|
||||
" deflate 1.2.4.1 Copyright 1995-2010 Jean-loup Gailly and Mark Adler ";
|
||||
" deflate 1.2.4.2 Copyright 1995-2010 Jean-loup Gailly and Mark Adler ";
|
||||
/*
|
||||
If you use the zlib library in a product, an acknowledgment is welcome
|
||||
in the documentation of your product. If for some reason you cannot
|
||||
|
12
gzguts.h
12
gzguts.h
@ -3,7 +3,7 @@
|
||||
* For conditions of distribution and use, see copyright notice in zlib.h
|
||||
*/
|
||||
|
||||
#if _LARGEFILE64_SOURCE == 1
|
||||
#if _LARGEFILE64_SOURCE
|
||||
# ifndef _LARGEFILE_SOURCE
|
||||
# define _LARGEFILE_SOURCE 1
|
||||
# endif
|
||||
@ -56,12 +56,20 @@
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if _LARGEFILE64_SOURCE == 1
|
||||
#if _LARGEFILE64_SOURCE
|
||||
# define z_off64_t off64_t
|
||||
#else
|
||||
# define z_off64_t z_off_t
|
||||
#endif
|
||||
|
||||
/* provide prototypes for these when building zlib without LFS */
|
||||
#if _LARGEFILE64_SOURCE+0 != 1 || _LFS64_LARGEFILE+0 != 1
|
||||
ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *));
|
||||
ZEXTERN z_off_t ZEXPORT gzseek64 OF((gzFile, off_t, int));
|
||||
ZEXTERN z_off_t ZEXPORT gztell64 OF((gzFile));
|
||||
ZEXTERN z_off_t ZEXPORT gzoffset64 OF((gzFile));
|
||||
#endif
|
||||
|
||||
/* default i/o buffer size -- double this for output when reading */
|
||||
#define GZBUFSIZE 8192
|
||||
|
||||
|
6
gzlib.c
6
gzlib.c
@ -5,7 +5,7 @@
|
||||
|
||||
#include "gzguts.h"
|
||||
|
||||
#if _LARGEFILE64_SOURCE == 1 && _LFS64_LARGEFILE == 1
|
||||
#if _LARGEFILE64_SOURCE && _LFS64_LARGEFILE
|
||||
# define LSEEK lseek64
|
||||
#else
|
||||
# define LSEEK lseek
|
||||
@ -172,6 +172,7 @@ local gzFile gz_open(path, fd, mode)
|
||||
O_APPEND))),
|
||||
0666);
|
||||
if (state->fd == -1) {
|
||||
free(state->path);
|
||||
free(state);
|
||||
return NULL;
|
||||
}
|
||||
@ -432,7 +433,8 @@ int ZEXPORT gzeof(file)
|
||||
return 0;
|
||||
|
||||
/* return end-of-file state */
|
||||
return state->mode == GZ_READ ? (state->eof && state->have == 0) : 0;
|
||||
return state->mode == GZ_READ ?
|
||||
(state->eof && state->strm.avail_in == 0 && state->have == 0) : 0;
|
||||
}
|
||||
|
||||
/* -- see zlib.h -- */
|
||||
|
@ -9,7 +9,7 @@
|
||||
#define MAXBITS 15
|
||||
|
||||
const char inflate_copyright[] =
|
||||
" inflate 1.2.4.1 Copyright 1995-2010 Mark Adler ";
|
||||
" inflate 1.2.4.2 Copyright 1995-2010 Mark Adler ";
|
||||
/*
|
||||
If you use the zlib library in a product, an acknowledgment is welcome
|
||||
in the documentation of your product. If for some reason you cannot
|
||||
@ -62,7 +62,7 @@ unsigned short FAR *work;
|
||||
35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0};
|
||||
static const unsigned short lext[31] = { /* Length codes 257..285 extra */
|
||||
16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18,
|
||||
19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 67, 206};
|
||||
19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 202, 75};
|
||||
static const unsigned short dbase[32] = { /* Distance codes 0..29 base */
|
||||
1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193,
|
||||
257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145,
|
||||
|
@ -32,6 +32,9 @@
|
||||
#if defined(MSDOS) || defined(OS2) || defined(WIN32) || defined(__CYGWIN__)
|
||||
# include <fcntl.h>
|
||||
# include <io.h>
|
||||
# ifdef UNDER_CE
|
||||
# include <stdlib.h>
|
||||
# endif
|
||||
# define SET_BINARY_MODE(file) setmode(fileno(file), O_BINARY)
|
||||
#else
|
||||
# define SET_BINARY_MODE(file)
|
||||
@ -50,9 +53,11 @@
|
||||
# include <unix.h> /* for fileno */
|
||||
#endif
|
||||
|
||||
#if !defined(Z_HAVE_UNISTD_H) && _LARGEFILE64_SOURCE+0 != 1
|
||||
#ifndef WIN32 /* unlink already in stdio.h for WIN32 */
|
||||
extern int unlink OF((const char *));
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(UNDER_CE)
|
||||
# include <windows.h>
|
||||
|
@ -1,41 +0,0 @@
|
||||
This directory contains project files for building zlib under various
|
||||
Integrated Development Environments (IDE).
|
||||
|
||||
If you wish to submit a new project to this directory, you should comply
|
||||
to the following requirements. Otherwise (e.g. if you wish to integrate
|
||||
a custom piece of code that changes the zlib interface or its behavior),
|
||||
please consider submitting the project to the contrib directory.
|
||||
|
||||
|
||||
Requirements
|
||||
============
|
||||
|
||||
- The project must build zlib using the source files from the official
|
||||
zlib source distribution, exclusively.
|
||||
|
||||
- If the project produces redistributable builds (e.g. shared objects
|
||||
or DLL files), these builds must be compatible to those produced by
|
||||
makefiles, if such makefiles exist in the zlib distribution.
|
||||
In particular, if the project produces a DLL build for the Win32
|
||||
platform, this build must comply to the officially-ammended Win32 DLL
|
||||
Application Binary Interface (ABI), described in win32/DLL_FAQ.txt.
|
||||
|
||||
- The project may provide additional build targets, which depend on
|
||||
3rd-party (unofficially-supported) software, present in the contrib
|
||||
directory. For example, it is possible to provide an "ASM build",
|
||||
besides the officially-supported build, and have ASM source files
|
||||
among its dependencies.
|
||||
|
||||
- If there are significant differences between the project files created
|
||||
by different versions of an IDE (e.g. Visual C++ 6.0 vs. 7.0), the name
|
||||
of the project directory should contain the version number of the IDE
|
||||
for which the project is intended (e.g. "visualc6" for Visual C++ 6.0,
|
||||
or "visualc7" for Visual C++ 7.0 and 7.1).
|
||||
|
||||
|
||||
Current projects
|
||||
================
|
||||
|
||||
visualc6/ by Simon-Pierre Cadieux <methodex@methodex.ca>
|
||||
and Cosmin Truta <cosmint@cs.ubbcluj.ro>
|
||||
Project for Microsoft Visual C++ 6.0
|
@ -25,10 +25,10 @@
|
||||
<QPG:Files>
|
||||
<QPG:Add file="../zconf.h" install="/opt/include/" user="root:sys" permission="644"/>
|
||||
<QPG:Add file="../zlib.h" install="/opt/include/" user="root:sys" permission="644"/>
|
||||
<QPG:Add file="../libz.so.1.2.4.1" install="/opt/lib/" user="root:bin" permission="644"/>
|
||||
<QPG:Add file="libz.so" install="/opt/lib/" component="dev" filetype="symlink" linkto="libz.so.1.2.4.1"/>
|
||||
<QPG:Add file="libz.so.1" install="/opt/lib/" filetype="symlink" linkto="libz.so.1.2.4.1"/>
|
||||
<QPG:Add file="../libz.so.1.2.4.1" install="/opt/lib/" component="slib"/>
|
||||
<QPG:Add file="../libz.so.1.2.4.2" install="/opt/lib/" user="root:bin" permission="644"/>
|
||||
<QPG:Add file="libz.so" install="/opt/lib/" component="dev" filetype="symlink" linkto="libz.so.1.2.4.2"/>
|
||||
<QPG:Add file="libz.so.1" install="/opt/lib/" filetype="symlink" linkto="libz.so.1.2.4.2"/>
|
||||
<QPG:Add file="../libz.so.1.2.4.2" install="/opt/lib/" component="slib"/>
|
||||
</QPG:Files>
|
||||
|
||||
<QPG:PackageFilter>
|
||||
@ -63,7 +63,7 @@
|
||||
</QPM:ProductDescription>
|
||||
|
||||
<QPM:ReleaseDescription>
|
||||
<QPM:ReleaseVersion>1.2.4.1</QPM:ReleaseVersion>
|
||||
<QPM:ReleaseVersion>1.2.4.2</QPM:ReleaseVersion>
|
||||
<QPM:ReleaseUrgency>Medium</QPM:ReleaseUrgency>
|
||||
<QPM:ReleaseStability>Stable</QPM:ReleaseStability>
|
||||
<QPM:ReleaseNoteMinor></QPM:ReleaseNoteMinor>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" ?>
|
||||
<package name="zlib" version="1.2.4.1">
|
||||
<library name="zlib" dlversion="1.2.4.1" dlname="z">
|
||||
<package name="zlib" version="1.2.4.2">
|
||||
<library name="zlib" dlversion="1.2.4.2" dlname="z">
|
||||
<property name="description"> zip compression library </property>
|
||||
<property name="include-target-dir" value="$(@PACKAGE/install-includedir)" />
|
||||
|
||||
|
@ -2,15 +2,16 @@
|
||||
# zlib is copyright (C) 1995-2006 Jean-loup Gailly and Mark Adler
|
||||
#
|
||||
# Usage:
|
||||
# nmake -f win32/Makefile.msc (standard build)
|
||||
# nmake -f win32/Makefile.msc LOC=-DFOO (nonstandard build)
|
||||
# nmake -f win32/Makefile.msc LOC=-DASMV OBJA=match.obj (use ASM code)
|
||||
|
||||
# nmake -f win32/Makefile.msc (standard build)
|
||||
# nmake -f win32/Makefile.msc LOC=-DFOO (nonstandard build)
|
||||
# nmake -f win32/Makefile.msc LOC="-DASMV -DASMINF" \
|
||||
# OBJA="inffas32.obj match686.obj" (use ASM code, x86)
|
||||
# nmake -f win32/Makefile.msc AS=ml64 LOC="-DASMV -DASMINF" \
|
||||
# OBJA="inffasx64.obj gvmat64.obj inffas8664.c" (use ASM code, x64)
|
||||
|
||||
# optional build flags
|
||||
LOC =
|
||||
|
||||
|
||||
# variables
|
||||
STATICLIB = zlib.lib
|
||||
SHAREDLIB = zlib1.dll
|
||||
@ -23,13 +24,13 @@ AR = lib
|
||||
RC = rc
|
||||
CFLAGS = -nologo -MD -W3 -O2 -Oy- -Zi -Fd"zlib" $(LOC)
|
||||
WFLAGS = -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE
|
||||
ASFLAGS = -coff -Zi
|
||||
ASFLAGS = -coff -Zi $(LOC)
|
||||
LDFLAGS = -nologo -debug -incremental:no -opt:ref
|
||||
ARFLAGS = -nologo
|
||||
RCFLAGS = /dWIN32 /r
|
||||
|
||||
OBJS = adler32.obj compress.obj crc32.obj deflate.obj gzclose.obj gzlib.obj gzread.obj \
|
||||
gzwrite.obj infback.obj inffast.obj inflate.obj inftrees.obj trees.obj uncompr.obj zutil.obj
|
||||
gzwrite.obj infback.obj inflate.obj inftrees.obj trees.obj uncompr.obj zutil.obj
|
||||
OBJA =
|
||||
|
||||
|
||||
@ -71,7 +72,13 @@ minigzip_d.exe: minigzip.obj $(IMPLIB)
|
||||
.c.obj:
|
||||
$(CC) -c $(WFLAGS) $(CFLAGS) $<
|
||||
|
||||
.asm.obj:
|
||||
{contrib/masmx64}.c.obj:
|
||||
$(CC) -c $(WFLAGS) $(CFLAGS) $<
|
||||
|
||||
{contrib/masmx64}.asm.obj:
|
||||
$(AS) -c $(ASFLAGS) $<
|
||||
|
||||
{contrib/masmx86}.asm.obj:
|
||||
$(AS) -c $(ASFLAGS) $<
|
||||
|
||||
adler32.obj: adler32.c zlib.h zconf.h
|
||||
@ -107,6 +114,17 @@ uncompr.obj: uncompr.c zlib.h zconf.h
|
||||
|
||||
zutil.obj: zutil.c zutil.h zlib.h zconf.h
|
||||
|
||||
gvmat64.obj: contrib\masmx64\gvmat64.asm
|
||||
|
||||
inffasx64.obj: contrib\masmx64\inffasx64.asm
|
||||
|
||||
inffas8664.obj: contrib\masmx64\inffas8664.c zutil.h zlib.h zconf.h \
|
||||
inftrees.h inflate.h inffast.h
|
||||
|
||||
inffas32.obj: contrib\masmx86\inffas32.asm
|
||||
|
||||
match686.obj: contrib\masmx86\match686.asm
|
||||
|
||||
example.obj: example.c zlib.h zconf.h
|
||||
|
||||
minigzip.obj: minigzip.c zlib.h zconf.h
|
||||
|
@ -47,9 +47,9 @@ The package zlib-1.2.4-win32-x86.zip contains the following files:
|
||||
zdll.lib Install these files into the compilers' LIB path if linking
|
||||
zdll.exp a compiled program to the zlib1.dll binary
|
||||
|
||||
zlib.lib Install these files into the compilers' LIB path if linking
|
||||
zlib.pdb a compiled program to the zlib1.dll binary (zlib.pdb ensures
|
||||
that the resulting program may be debugged)
|
||||
zlib.lib Install these files into the compilers' LIB path to link zlib
|
||||
zlib.pdb into compiled programs, without zlib1.dll runtime dependency
|
||||
(zlib.pdb provides debugging info to the compile time linker)
|
||||
|
||||
zlib1.dll Install this binary shared library into the system PATH, or
|
||||
the program's runtime directory (where the .exe resides)
|
||||
|
5
zconf.h
5
zconf.h
@ -364,8 +364,11 @@ typedef uLong FAR uLongf;
|
||||
# define Z_HAVE_UNISTD_H
|
||||
#endif
|
||||
|
||||
#if defined(Z_HAVE_UNISTD_H) || _LARGEFILE64_SOURCE == 1
|
||||
#ifdef STDC
|
||||
# include <sys/types.h> /* for off_t */
|
||||
#endif
|
||||
|
||||
#if defined(Z_HAVE_UNISTD_H) || _LARGEFILE64_SOURCE
|
||||
# include <unistd.h> /* for SEEK_* and off_t */
|
||||
# ifdef VMS
|
||||
# include <unixio.h> /* for off_t */
|
||||
|
@ -366,8 +366,11 @@ typedef uLong FAR uLongf;
|
||||
# define Z_HAVE_UNISTD_H
|
||||
#endif
|
||||
|
||||
#if defined(Z_HAVE_UNISTD_H) || _LARGEFILE64_SOURCE == 1
|
||||
#ifdef STDC
|
||||
# include <sys/types.h> /* for off_t */
|
||||
#endif
|
||||
|
||||
#if defined(Z_HAVE_UNISTD_H) || _LARGEFILE64_SOURCE
|
||||
# include <unistd.h> /* for SEEK_* and off_t */
|
||||
# ifdef VMS
|
||||
# include <unixio.h> /* for off_t */
|
||||
|
@ -364,8 +364,11 @@ typedef uLong FAR uLongf;
|
||||
# define Z_HAVE_UNISTD_H
|
||||
#endif
|
||||
|
||||
#if defined(Z_HAVE_UNISTD_H) || _LARGEFILE64_SOURCE == 1
|
||||
#ifdef STDC
|
||||
# include <sys/types.h> /* for off_t */
|
||||
#endif
|
||||
|
||||
#if defined(Z_HAVE_UNISTD_H) || _LARGEFILE64_SOURCE
|
||||
# include <unistd.h> /* for SEEK_* and off_t */
|
||||
# ifdef VMS
|
||||
# include <unixio.h> /* for off_t */
|
||||
|
4
zlib.3
4
zlib.3
@ -1,4 +1,4 @@
|
||||
.TH ZLIB 3 "28 Mar 2010"
|
||||
.TH ZLIB 3 "9 Apr 2010"
|
||||
.SH NAME
|
||||
zlib \- compression/decompression library
|
||||
.SH SYNOPSIS
|
||||
@ -125,7 +125,7 @@ before asking for help.
|
||||
Send questions and/or comments to zlib@gzip.org,
|
||||
or (for the Windows DLL version) to Gilles Vollant (info@winimage.com).
|
||||
.SH AUTHORS
|
||||
Version 1.2.4.1
|
||||
Version 1.2.4.2
|
||||
Copyright (C) 1995-2010 Jean-loup Gailly (jloup@gzip.org)
|
||||
and Mark Adler (madler@alumni.caltech.edu).
|
||||
.LP
|
||||
|
BIN
zlib.3.pdf
BIN
zlib.3.pdf
Binary file not shown.
12
zlib.h
12
zlib.h
@ -1,5 +1,5 @@
|
||||
/* zlib.h -- interface of the 'zlib' general purpose compression library
|
||||
version 1.2.4.1, March 28th, 2010
|
||||
version 1.2.4.2, April 9th, 2010
|
||||
|
||||
Copyright (C) 1995-2010 Jean-loup Gailly and Mark Adler
|
||||
|
||||
@ -37,12 +37,12 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define ZLIB_VERSION "1.2.4.1"
|
||||
#define ZLIB_VERSION "1.2.4.2"
|
||||
#define ZLIB_VERNUM 0x1241
|
||||
#define ZLIB_VER_MAJOR 1
|
||||
#define ZLIB_VER_MINOR 2
|
||||
#define ZLIB_VER_REVISION 4
|
||||
#define ZLIB_VER_SUBREVISION 1
|
||||
#define ZLIB_VER_SUBREVISION 2
|
||||
|
||||
/*
|
||||
The 'zlib' compression library provides in-memory compression and
|
||||
@ -1556,7 +1556,7 @@ ZEXTERN int ZEXPORT inflateBackInit_ OF((z_streamp strm, int windowBits,
|
||||
inflateBackInit_((strm), (windowBits), (window), \
|
||||
ZLIB_VERSION, sizeof(z_stream))
|
||||
|
||||
#if _LARGEFILE64_SOURCE == 1 && _LFS64_LARGEFILE == 1
|
||||
#if _LARGEFILE64_SOURCE && _LFS64_LARGEFILE
|
||||
ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *));
|
||||
ZEXTERN off64_t ZEXPORT gzseek64 OF((gzFile, off64_t, int));
|
||||
ZEXTERN off64_t ZEXPORT gztell64 OF((gzFile));
|
||||
@ -1565,14 +1565,14 @@ ZEXTERN int ZEXPORT inflateBackInit_ OF((z_streamp strm, int windowBits,
|
||||
ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, off64_t));
|
||||
#endif
|
||||
|
||||
#if !defined(ZLIB_INTERNAL) && _FILE_OFFSET_BITS == 64 && _LFS64_LARGEFILE == 1
|
||||
#if !defined(ZLIB_INTERNAL) && _FILE_OFFSET_BITS+0 == 64 && _LFS64_LARGEFILE
|
||||
# define gzopen gzopen64
|
||||
# define gzseek gzseek64
|
||||
# define gztell gztell64
|
||||
# define gzoffset gzoffset64
|
||||
# define adler32_combine adler32_combine64
|
||||
# define crc32_combine crc32_combine64
|
||||
# if _LARGEFILE64_SOURCE != 1
|
||||
# if _LARGEFILE64_SOURCE
|
||||
ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *));
|
||||
ZEXTERN off_t ZEXPORT gzseek64 OF((gzFile, off_t, int));
|
||||
ZEXTERN off_t ZEXPORT gztell64 OF((gzFile));
|
||||
|
12
zutil.h
12
zutil.h
@ -154,20 +154,16 @@ extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
|
||||
#pragma warn -8066
|
||||
#endif
|
||||
|
||||
#if _LARGEFILE64_SOURCE == 1 && _LFS64_LARGEFILE == 1
|
||||
#if _LARGEFILE64_SOURCE && _LFS64_LARGEFILE
|
||||
# define z_off64_t off64_t
|
||||
#else
|
||||
# define z_off64_t z_off_t
|
||||
#endif
|
||||
|
||||
/* provide prototypes for these when building zlib without LFS */
|
||||
#if _LARGEFILE64_SOURCE != 1 || _LFS64_LARGEFILE != 1
|
||||
ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *));
|
||||
ZEXTERN off_t ZEXPORT gzseek64 OF((gzFile, off_t, int));
|
||||
ZEXTERN off_t ZEXPORT gztell64 OF((gzFile));
|
||||
ZEXTERN off_t ZEXPORT gzoffset64 OF((gzFile));
|
||||
ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, off_t));
|
||||
ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, off_t));
|
||||
#if _LARGEFILE64_SOURCE+0 != 1 || _LFS64_LARGEFILE+0 != 1
|
||||
ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off_t));
|
||||
ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off_t));
|
||||
#endif
|
||||
|
||||
/* common defaults */
|
||||
|
Loading…
Reference in New Issue
Block a user