Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f4498bea28 | ||
|
|
7147f24cd7 | ||
|
|
05d47d2627 |
@@ -20,7 +20,7 @@ check_include_file(stddef.h HAVE_STDDEF_H)
|
|||||||
#
|
#
|
||||||
# Check to see if we have large file support
|
# Check to see if we have large file support
|
||||||
#
|
#
|
||||||
set(CMAKE_REQUIRED_DEFINITIONS -D_LARGEFILE64_SOURCE)
|
set(CMAKE_REQUIRED_DEFINITIONS -D_LARGEFILE64_SOURCE=1)
|
||||||
# We add these other definitions here because CheckTypeSize.cmake
|
# We add these other definitions here because CheckTypeSize.cmake
|
||||||
# in CMake 2.4.x does not automatically do so and we want
|
# in CMake 2.4.x does not automatically do so and we want
|
||||||
# compatibility with CMake 2.4.x.
|
# compatibility with CMake 2.4.x.
|
||||||
@@ -35,7 +35,7 @@ if(HAVE_STDDEF_H)
|
|||||||
endif()
|
endif()
|
||||||
check_type_size(off64_t OFF64_T)
|
check_type_size(off64_t OFF64_T)
|
||||||
if(HAVE_OFF64_T)
|
if(HAVE_OFF64_T)
|
||||||
add_definitions(-D_LARGEFILE64_SOURCE)
|
add_definitions(-D_LARGEFILE64_SOURCE=1)
|
||||||
endif()
|
endif()
|
||||||
set(CMAKE_REQUIRED_DEFINITIONS) # clear variable
|
set(CMAKE_REQUIRED_DEFINITIONS) # clear variable
|
||||||
|
|
||||||
@@ -52,13 +52,6 @@ endif()
|
|||||||
#
|
#
|
||||||
check_include_file(unistd.h Z_HAVE_UNISTD_H)
|
check_include_file(unistd.h Z_HAVE_UNISTD_H)
|
||||||
|
|
||||||
#
|
|
||||||
# Check for errno.h
|
|
||||||
check_include_file(errno.h HAVE_ERRNO_H)
|
|
||||||
if(NOT HAVE_ERRNO_H)
|
|
||||||
add_definitions(-DNO_ERRNO_H)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(MSVC)
|
if(MSVC)
|
||||||
set(CMAKE_DEBUG_POSTFIX "d")
|
set(CMAKE_DEBUG_POSTFIX "d")
|
||||||
add_definitions(-D_CRT_SECURE_NO_DEPRECATE)
|
add_definitions(-D_CRT_SECURE_NO_DEPRECATE)
|
||||||
|
|||||||
52
ChangeLog
52
ChangeLog
@@ -1,6 +1,58 @@
|
|||||||
|
|
||||||
ChangeLog file for zlib
|
ChangeLog file for zlib
|
||||||
|
|
||||||
|
Changes in 1.2.4.3 (10 Apr 2010)
|
||||||
|
- Only use CROSS_PREFIX in configure for ar and ranlib if they exist
|
||||||
|
- Use CROSS_PREFIX for nm [Bar-Lev]
|
||||||
|
- Assume _LARGEFILE64_SOURCE defined is equivalent to true
|
||||||
|
- Avoid use of undefined symbols in #if with && and ||
|
||||||
|
- Make *64 prototypes in gzguts.h consistent with functions
|
||||||
|
- Add -shared load option for MinGW in configure [Bowler]
|
||||||
|
- Move z_off64_t to public interface, use instead of off64_t
|
||||||
|
- Remove ! from shell test in configure (not portable to Solaris)
|
||||||
|
- Change +0 macro tests to -0 for possibly increased portability
|
||||||
|
|
||||||
|
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]
|
||||||
|
- Restore "for debugging" comment on sprintf() in gzlib.c
|
||||||
|
- Remove fdopen for MVS from gzguts.h
|
||||||
|
- Put new README-WIN32.txt in win32 [Rowe]
|
||||||
|
- Add check for shell to configure and invoke another shell if needed
|
||||||
|
- Fix big fat stinking bug in gzseek() on uncompressed files
|
||||||
|
- Remove vestigial F_OPEN64 define in zutil.h
|
||||||
|
- Set and check the value of _LARGEFILE_SOURCE and _LARGEFILE64_SOURCE
|
||||||
|
- Avoid errors on non-LFS systems when applications define LFS macros
|
||||||
|
- Set EXE to ".exe" in configure for MINGW [Kahle]
|
||||||
|
- Match crc32() in crc32.c exactly to the prototype in zlib.h [Sherrill]
|
||||||
|
- Add prefix for cross-compilation in win32/makefile.gcc [Bar-Lev]
|
||||||
|
- Add DLL install in win32/makefile.gcc [Bar-Lev]
|
||||||
|
- Allow Linux* or linux* from uname in configure [Bar-Lev]
|
||||||
|
- Allow ldconfig to be redefined in configure and Makefile.in [Bar-Lev]
|
||||||
|
- Add cross-compilation prefixes to configure [Bar-Lev]
|
||||||
|
- Match type exactly in gz_load() invocation in gzread.c
|
||||||
|
- Match type exactly of zcalloc() in zutil.c to zlib.h alloc_func
|
||||||
|
- Provide prototypes for *64 functions when building zlib without LFS
|
||||||
|
- Don't use -lc when linking shared library on MinGW
|
||||||
|
- Remove errno.h check in configure and vestigial errno code in zutil.h
|
||||||
|
|
||||||
Changes in 1.2.4 (14 Mar 2010)
|
Changes in 1.2.4 (14 Mar 2010)
|
||||||
- Fix VER3 extraction in configure for no fourth subversion
|
- Fix VER3 extraction in configure for no fourth subversion
|
||||||
- Update zlib.3, add docs to Makefile.in to make .pdf out of it
|
- Update zlib.3, add docs to Makefile.in to make .pdf out of it
|
||||||
|
|||||||
1
INDEX
1
INDEX
@@ -22,7 +22,6 @@ msdos/ makefiles for MSDOS
|
|||||||
nintendods/ makefile for Nintendo DS
|
nintendods/ makefile for Nintendo DS
|
||||||
old/ makefiles for various architectures and zlib documentation
|
old/ makefiles for various architectures and zlib documentation
|
||||||
files that have not yet been updated for zlib 1.2.x
|
files that have not yet been updated for zlib 1.2.x
|
||||||
projects/ projects for various Integrated Development Environments
|
|
||||||
qnx/ makefiles for QNX
|
qnx/ makefiles for QNX
|
||||||
watcom/ makefiles for OpenWatcom
|
watcom/ makefiles for OpenWatcom
|
||||||
win32/ makefiles for Windows
|
win32/ makefiles for Windows
|
||||||
|
|||||||
20
Makefile.in
20
Makefile.in
@@ -26,18 +26,20 @@ CFLAGS=-O
|
|||||||
|
|
||||||
SFLAGS=-O
|
SFLAGS=-O
|
||||||
|
|
||||||
LDFLAGS=-L. libz.a
|
TEST_LDFLAGS=-L. libz.a
|
||||||
LDSHARED=$(CC)
|
LDSHARED=$(CC)
|
||||||
CPP=$(CC) -E
|
CPP=$(CC) -E
|
||||||
|
|
||||||
STATICLIB=libz.a
|
STATICLIB=libz.a
|
||||||
SHAREDLIB=libz.so
|
SHAREDLIB=libz.so
|
||||||
SHAREDLIBV=libz.so.1.2.4
|
SHAREDLIBV=libz.so.1.2.4.3
|
||||||
SHAREDLIBM=libz.so.1
|
SHAREDLIBM=libz.so.1
|
||||||
LIBS=$(STATICLIB) $(SHAREDLIB) $(SHAREDLIBV)
|
LIBS=$(STATICLIB) $(SHAREDLIBV)
|
||||||
|
|
||||||
AR=ar rc
|
AR=ar rc
|
||||||
RANLIB=ranlib
|
RANLIB=ranlib
|
||||||
|
LDCONFIG=ldconfig
|
||||||
|
LDSHAREDLIBC=-lc
|
||||||
TAR=tar
|
TAR=tar
|
||||||
SHELL=/bin/sh
|
SHELL=/bin/sh
|
||||||
EXE=
|
EXE=
|
||||||
@@ -134,17 +136,17 @@ minigzip64.o: minigzip.c zlib.h zconf.h
|
|||||||
-@mv objs/$*.o $@
|
-@mv objs/$*.o $@
|
||||||
|
|
||||||
$(SHAREDLIBV): $(PIC_OBJS)
|
$(SHAREDLIBV): $(PIC_OBJS)
|
||||||
$(LDSHARED) $(SFLAGS) -o $@ $(PIC_OBJS) -lc
|
$(LDSHARED) $(SFLAGS) -o $@ $(PIC_OBJS) $(LDSHAREDLIBC) $(LDFLAGS)
|
||||||
rm -f $(SHAREDLIB) $(SHAREDLIBM)
|
rm -f $(SHAREDLIB) $(SHAREDLIBM)
|
||||||
ln -s $@ $(SHAREDLIB)
|
ln -s $@ $(SHAREDLIB)
|
||||||
ln -s $@ $(SHAREDLIBM)
|
ln -s $@ $(SHAREDLIBM)
|
||||||
-@rmdir objs
|
-@rmdir objs
|
||||||
|
|
||||||
example$(EXE): example.o $(STATICLIB)
|
example$(EXE): example.o $(STATICLIB)
|
||||||
$(CC) $(CFLAGS) -o $@ example.o $(LDFLAGS)
|
$(CC) $(CFLAGS) -o $@ example.o $(TEST_LDFLAGS)
|
||||||
|
|
||||||
minigzip$(EXE): minigzip.o $(STATICLIB)
|
minigzip$(EXE): minigzip.o $(STATICLIB)
|
||||||
$(CC) $(CFLAGS) -o $@ minigzip.o $(LDFLAGS)
|
$(CC) $(CFLAGS) -o $@ minigzip.o $(TEST_LDFLAGS)
|
||||||
|
|
||||||
examplesh$(EXE): example.o $(SHAREDLIBV)
|
examplesh$(EXE): example.o $(SHAREDLIBV)
|
||||||
$(CC) $(CFLAGS) -o $@ example.o -L. $(SHAREDLIBV)
|
$(CC) $(CFLAGS) -o $@ example.o -L. $(SHAREDLIBV)
|
||||||
@@ -153,10 +155,10 @@ minigzipsh$(EXE): minigzip.o $(SHAREDLIBV)
|
|||||||
$(CC) $(CFLAGS) -o $@ minigzip.o -L. $(SHAREDLIBV)
|
$(CC) $(CFLAGS) -o $@ minigzip.o -L. $(SHAREDLIBV)
|
||||||
|
|
||||||
example64$(EXE): example64.o $(STATICLIB)
|
example64$(EXE): example64.o $(STATICLIB)
|
||||||
$(CC) $(CFLAGS) -o $@ example64.o $(LDFLAGS)
|
$(CC) $(CFLAGS) -o $@ example64.o $(TEST_LDFLAGS)
|
||||||
|
|
||||||
minigzip64$(EXE): minigzip64.o $(STATICLIB)
|
minigzip64$(EXE): minigzip64.o $(STATICLIB)
|
||||||
$(CC) $(CFLAGS) -o $@ minigzip64.o $(LDFLAGS)
|
$(CC) $(CFLAGS) -o $@ minigzip64.o $(TEST_LDFLAGS)
|
||||||
|
|
||||||
install-libs: $(LIBS)
|
install-libs: $(LIBS)
|
||||||
-@if [ ! -d $(DESTDIR)$(exec_prefix) ]; then mkdir -p $(DESTDIR)$(exec_prefix); fi
|
-@if [ ! -d $(DESTDIR)$(exec_prefix) ]; then mkdir -p $(DESTDIR)$(exec_prefix); fi
|
||||||
@@ -171,7 +173,7 @@ install-libs: $(LIBS)
|
|||||||
rm -f $(SHAREDLIB) $(SHAREDLIBM); \
|
rm -f $(SHAREDLIB) $(SHAREDLIBM); \
|
||||||
ln -s $(SHAREDLIBV) $(SHAREDLIB); \
|
ln -s $(SHAREDLIBV) $(SHAREDLIB); \
|
||||||
ln -s $(SHAREDLIBV) $(SHAREDLIBM); \
|
ln -s $(SHAREDLIBV) $(SHAREDLIBM); \
|
||||||
(ldconfig || true) >/dev/null 2>&1; \
|
($(LDCONFIG) || true) >/dev/null 2>&1; \
|
||||||
fi
|
fi
|
||||||
cp zlib.3 $(DESTDIR)$(man3dir)
|
cp zlib.3 $(DESTDIR)$(man3dir)
|
||||||
chmod 644 $(DESTDIR)$(man3dir)/zlib.3
|
chmod 644 $(DESTDIR)$(man3dir)/zlib.3
|
||||||
|
|||||||
7
README
7
README
@@ -1,6 +1,6 @@
|
|||||||
ZLIB DATA COMPRESSION LIBRARY
|
ZLIB DATA COMPRESSION LIBRARY
|
||||||
|
|
||||||
zlib 1.2.4 is a general purpose data compression library. All the code is
|
zlib 1.2.4.3 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
|
thread safe. The data format used by the zlib library is described by RFCs
|
||||||
(Request for Comments) 1950 to 1952 in the files
|
(Request for Comments) 1950 to 1952 in the files
|
||||||
http://www.ietf.org/rfc/rfc1950.txt (zlib format), rfc1951.txt (deflate format)
|
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
|
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
|
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
|
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
|
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
|
<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
|
issue of Dr. Dobb's Journal; a copy of the article is available at
|
||||||
http://marknelson.us/1997/01/01/zlib-engine/ .
|
http://marknelson.us/1997/01/01/zlib-engine/ .
|
||||||
|
|
||||||
The changes made in version 1.2.4 are documented in the file ChangeLog.
|
The changes made in version 1.2.4.3 are documented in the file ChangeLog.
|
||||||
|
|
||||||
Unsupported third party contributions are provided in directory contrib/ .
|
Unsupported third party contributions are provided in directory contrib/ .
|
||||||
|
|
||||||
|
|||||||
91
configure
vendored
91
configure
vendored
@@ -13,15 +13,64 @@
|
|||||||
# If you have problems, try without defining CC and CFLAGS before reporting
|
# If you have problems, try without defining CC and CFLAGS before reporting
|
||||||
# an error.
|
# an error.
|
||||||
|
|
||||||
|
# make sure we are running under a compatible shell (stolen from ffmpeg and libnfo,
|
||||||
|
# except their's wasn't portable enough due to ! usage, so this is better)
|
||||||
|
if test "0$ZLIB_CONFIGURE_EXEC" -lt 1; then
|
||||||
|
unset foo
|
||||||
|
try=0
|
||||||
|
(: ${foo%%bar}) 2>/dev/null
|
||||||
|
if test "$?" -ne 0; then
|
||||||
|
try=1
|
||||||
|
else
|
||||||
|
(: ${foo?}) 2>/dev/null
|
||||||
|
if test "$?" -eq 0; then
|
||||||
|
try=1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if test "$try" -eq 1; then
|
||||||
|
ZLIB_CONFIGURE_EXEC=1
|
||||||
|
export ZLIB_CONFIGURE_EXEC
|
||||||
|
type "bash" > /dev/null 2>&1 && exec bash "$0" "$@"
|
||||||
|
type "ksh" > /dev/null 2>&1 && exec ksh "$0" "$@"
|
||||||
|
if test -x /usr/xpg4/bin/sh; then
|
||||||
|
exec /usr/xpg4/bin/sh "$0" "$@"
|
||||||
|
fi
|
||||||
|
# echo "No compatible shell script interpreter found."
|
||||||
|
# exit 1
|
||||||
|
# we could give up here, but go ahead and give their old sh a try
|
||||||
|
fi
|
||||||
|
unset try
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -n "${CHOST}" ]; then
|
||||||
|
uname="$(echo "${CHOST}" | sed 's/.*-.*-\(.*\)-.*/\1/')"
|
||||||
|
CROSS_PREFIX="${CHOST}-"
|
||||||
|
fi
|
||||||
|
|
||||||
STATICLIB=libz.a
|
STATICLIB=libz.a
|
||||||
LDFLAGS="${LDFLAGS} -L. ${STATICLIB}"
|
LDFLAGS="${LDFLAGS} -L. ${STATICLIB}"
|
||||||
VER=`sed -n -e '/VERSION "/s/.*"\(.*\)".*/\1/p' < zlib.h`
|
VER=`sed -n -e '/VERSION "/s/.*"\(.*\)".*/\1/p' < zlib.h`
|
||||||
VER3=`sed -n -e '/VERSION "/s/.*"\([0-9]*\\.[0-9]*\\.[0-9]*\).*/\1/p' < zlib.h`
|
VER3=`sed -n -e '/VERSION "/s/.*"\([0-9]*\\.[0-9]*\\.[0-9]*\).*/\1/p' < zlib.h`
|
||||||
VER2=`sed -n -e '/VERSION "/s/.*"\([0-9]*\\.[0-9]*\)\\..*/\1/p' < zlib.h`
|
VER2=`sed -n -e '/VERSION "/s/.*"\([0-9]*\\.[0-9]*\)\\..*/\1/p' < zlib.h`
|
||||||
VER1=`sed -n -e '/VERSION "/s/.*"\([0-9]*\)\\..*/\1/p' < zlib.h`
|
VER1=`sed -n -e '/VERSION "/s/.*"\([0-9]*\)\\..*/\1/p' < zlib.h`
|
||||||
AR=${AR-"ar"}
|
if [ -x "${CROSS_PREFIX}ar" ]; then
|
||||||
|
AR=${AR-"${CROSS_PREFIX}ar"}
|
||||||
|
else
|
||||||
|
AR=${AR-"ar"}
|
||||||
|
fi
|
||||||
AR_RC="${AR} rc"
|
AR_RC="${AR} rc"
|
||||||
RANLIB=${RANLIB-"ranlib"}
|
if [ -x "${CROSS_PREFIX}ranlib" ]; then
|
||||||
|
RANLIB=${RANLIB-"${CROSS_PREFIX}ranlib"}
|
||||||
|
else
|
||||||
|
RANLIB=${RANLIB-"ranlib"}
|
||||||
|
fi
|
||||||
|
if [ -x "${CROSS_PREFIX}nm" ]; then
|
||||||
|
NM=${NM-"${CROSS_PREFIX}nm"}
|
||||||
|
else
|
||||||
|
NM=${NM-"nm"}
|
||||||
|
fi
|
||||||
|
LDCONFIG=${LDCONFIG-"ldconfig"}
|
||||||
|
LDSHAREDLIBC="${LDSHAREDLIBC-"-lc"}"
|
||||||
prefix=${prefix-/usr/local}
|
prefix=${prefix-/usr/local}
|
||||||
exec_prefix=${exec_prefix-'${prefix}'}
|
exec_prefix=${exec_prefix-'${prefix}'}
|
||||||
libdir=${libdir-'${exec_prefix}/lib'}
|
libdir=${libdir-'${exec_prefix}/lib'}
|
||||||
@@ -43,11 +92,11 @@ case "$1" in
|
|||||||
echo ' configure [--zprefix] [--prefix=PREFIX] [--eprefix=EXPREFIX]'
|
echo ' configure [--zprefix] [--prefix=PREFIX] [--eprefix=EXPREFIX]'
|
||||||
echo ' [--static] [--64] [--libdir=LIBDIR] [--includedir=INCLUDEDIR]'
|
echo ' [--static] [--64] [--libdir=LIBDIR] [--includedir=INCLUDEDIR]'
|
||||||
exit 0 ;;
|
exit 0 ;;
|
||||||
-p*=* | --prefix=*) prefix=`echo $1 | sed 's/[-a-z_]*=//'`; shift ;;
|
-p*=* | --prefix=*) prefix=`echo $1 | sed 's/.*=//'`; shift ;;
|
||||||
-e*=* | --eprefix=*) exec_prefix=`echo $1 | sed 's/[-a-z_]*=//'`; shift ;;
|
-e*=* | --eprefix=*) exec_prefix=`echo $1 | sed 's/.*=//'`; shift ;;
|
||||||
-l*=* | --libdir=*) libdir=`echo $1 | sed 's/[-a-z_]*=//'`; shift ;;
|
-l*=* | --libdir=*) libdir=`echo $1 | sed 's/.*=//'`; shift ;;
|
||||||
-i*=* | --includedir=*) includedir=`echo $1 | sed 's/[-a-z_]*=//'`;shift ;;
|
-i*=* | --includedir=*) includedir=`echo $1 | sed 's/.*=//'`;shift ;;
|
||||||
-u*=* | --uname=*) uname=`echo $1 | sed 's/[-a-z_]*=//'`;shift ;;
|
-u*=* | --uname=*) uname=`echo $1 | sed 's/.*=//'`;shift ;;
|
||||||
-p* | --prefix) prefix="$2"; shift; shift ;;
|
-p* | --prefix) prefix="$2"; shift; shift ;;
|
||||||
-e* | --eprefix) exec_prefix="$2"; shift; shift ;;
|
-e* | --eprefix) exec_prefix="$2"; shift; shift ;;
|
||||||
-l* | --libdir) libdir="$2"; shift; shift ;;
|
-l* | --libdir) libdir="$2"; shift; shift ;;
|
||||||
@@ -69,7 +118,7 @@ int hello() {return getchar();}
|
|||||||
EOF
|
EOF
|
||||||
|
|
||||||
test -z "$CC" && echo Checking for gcc...
|
test -z "$CC" && echo Checking for gcc...
|
||||||
cc=${CC-gcc}
|
cc=${CC-${CROSS_PREFIX}gcc}
|
||||||
cflags=${CFLAGS-"-O3"}
|
cflags=${CFLAGS-"-O3"}
|
||||||
# to force the asm version use: CFLAGS="-O3 -DASMV" ./configure
|
# to force the asm version use: CFLAGS="-O3 -DASMV" ./configure
|
||||||
case "$cc" in
|
case "$cc" in
|
||||||
@@ -91,9 +140,13 @@ if test "$gcc" -eq 1 && ($cc -c $cflags $test.c) 2>/dev/null; then
|
|||||||
uname=`(uname -s || echo unknown) 2>/dev/null`
|
uname=`(uname -s || echo unknown) 2>/dev/null`
|
||||||
fi
|
fi
|
||||||
case "$uname" in
|
case "$uname" in
|
||||||
Linux | linux | GNU | GNU/* | *BSD | DragonFly) LDSHARED=${LDSHARED-"$cc -shared -Wl,-soname,libz.so.1,--version-script,zlib.map"} ;;
|
Linux* | linux* | GNU | GNU/* | *BSD | DragonFly) LDSHARED=${LDSHARED-"$cc -shared -Wl,-soname,libz.so.1,--version-script,zlib.map"} ;;
|
||||||
CYGWIN* | Cygwin* | cygwin* | OS/2* )
|
CYGWIN* | Cygwin* | cygwin* | OS/2*)
|
||||||
EXE='.exe' ;;
|
EXE='.exe' ;;
|
||||||
|
MINGW*)
|
||||||
|
LDSHARED=${LDSHARED-"$cc -shared"}
|
||||||
|
LDSHAREDLIBC=""
|
||||||
|
EXE='.exe' ;;
|
||||||
QNX*) # This is for QNX6. I suppose that the QNX rule below is for QNX2,QNX4
|
QNX*) # This is for QNX6. I suppose that the QNX rule below is for QNX2,QNX4
|
||||||
# (alain.bonnefoy@icbt.com)
|
# (alain.bonnefoy@icbt.com)
|
||||||
LDSHARED=${LDSHARED-"$cc -shared -Wl,-hlibz.so.1"} ;;
|
LDSHARED=${LDSHARED-"$cc -shared -Wl,-hlibz.so.1"} ;;
|
||||||
@@ -474,22 +527,10 @@ EOF
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cat >$test.c <<EOF
|
|
||||||
#include <errno.h>
|
|
||||||
int main() { return 0; }
|
|
||||||
EOF
|
|
||||||
if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then
|
|
||||||
echo "Checking for errno.h... Yes."
|
|
||||||
else
|
|
||||||
echo "Checking for errno.h... No."
|
|
||||||
CFLAGS="$CFLAGS -DNO_ERRNO_H"
|
|
||||||
SFLAGS="$SFLAGS -DNO_ERRNO_H"
|
|
||||||
fi
|
|
||||||
|
|
||||||
CPP=${CPP-"$CC -E"}
|
CPP=${CPP-"$CC -E"}
|
||||||
case $CFLAGS in
|
case $CFLAGS in
|
||||||
*ASMV*)
|
*ASMV*)
|
||||||
if test "`nm $test.o | grep _hello`" = ""; then
|
if test "`$NM $test.o | grep _hello`" = ""; then
|
||||||
CPP="$CPP -DNO_UNDERLINE"
|
CPP="$CPP -DNO_UNDERLINE"
|
||||||
echo Checking for underline in external names... No.
|
echo Checking for underline in external names... No.
|
||||||
else
|
else
|
||||||
@@ -513,6 +554,8 @@ sed < Makefile.in "
|
|||||||
/^SHAREDLIBM *=/s#=.*#=$SHAREDLIBM#
|
/^SHAREDLIBM *=/s#=.*#=$SHAREDLIBM#
|
||||||
/^AR *=/s#=.*#=$AR_RC#
|
/^AR *=/s#=.*#=$AR_RC#
|
||||||
/^RANLIB *=/s#=.*#=$RANLIB#
|
/^RANLIB *=/s#=.*#=$RANLIB#
|
||||||
|
/^LDCONFIG *=/s#=.*#=$LDCONFIG#
|
||||||
|
/^LDSHAREDLIBC *=/s#=.*#=$LDSHAREDLIBC#
|
||||||
/^EXE *=/s#=.*#=$EXE#
|
/^EXE *=/s#=.*#=$EXE#
|
||||||
/^prefix *=/s#=.*#=$prefix#
|
/^prefix *=/s#=.*#=$prefix#
|
||||||
/^exec_prefix *=/s#=.*#=$exec_prefix#
|
/^exec_prefix *=/s#=.*#=$exec_prefix#
|
||||||
|
|||||||
@@ -152,7 +152,7 @@ procedure DecompressToUserBuf(const InBuf: Pointer; InBytes: Integer;
|
|||||||
const OutBuf: Pointer; BufSize: Integer);
|
const OutBuf: Pointer; BufSize: Integer);
|
||||||
|
|
||||||
const
|
const
|
||||||
zlib_version = '1.2.4';
|
zlib_version = '1.2.4.3';
|
||||||
|
|
||||||
type
|
type
|
||||||
EZlibError = class(Exception);
|
EZlibError = class(Exception);
|
||||||
|
|||||||
@@ -156,7 +156,7 @@ namespace DotZLibTests
|
|||||||
public void Info_Version()
|
public void Info_Version()
|
||||||
{
|
{
|
||||||
Info info = new Info();
|
Info info = new Info();
|
||||||
Assert.AreEqual("1.2.4", Info.Version);
|
Assert.AreEqual("1.2.4.3", Info.Version);
|
||||||
Assert.AreEqual(32, info.SizeOfUInt);
|
Assert.AreEqual(32, info.SizeOfUInt);
|
||||||
Assert.AreEqual(32, info.SizeOfULong);
|
Assert.AreEqual(32, info.SizeOfULong);
|
||||||
Assert.AreEqual(32, info.SizeOfPointer);
|
Assert.AreEqual(32, info.SizeOfPointer);
|
||||||
@@ -271,4 +271,4 @@ namespace DotZLibTests
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
#define MAXBITS 15
|
#define MAXBITS 15
|
||||||
|
|
||||||
const char inflate9_copyright[] =
|
const char inflate9_copyright[] =
|
||||||
" inflate9 1.2.4 Copyright 1995-2010 Mark Adler ";
|
" inflate9 1.2.4.3 Copyright 1995-2010 Mark Adler ";
|
||||||
/*
|
/*
|
||||||
If you use the zlib library in a product, an acknowledgment is welcome
|
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
|
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 */
|
static const unsigned short lext[31] = { /* Length codes 257..285 extra */
|
||||||
128, 128, 128, 128, 128, 128, 128, 128, 129, 129, 129, 129,
|
128, 128, 128, 128, 128, 128, 128, 128, 129, 129, 129, 129,
|
||||||
130, 130, 130, 130, 131, 131, 131, 131, 132, 132, 132, 132,
|
130, 130, 130, 130, 131, 131, 131, 131, 132, 132, 132, 132,
|
||||||
133, 133, 133, 133, 144, 64, 195};
|
133, 133, 133, 133, 144, 195, 66};
|
||||||
static const unsigned short dbase[32] = { /* Distance codes 0..31 base */
|
static const unsigned short dbase[32] = { /* Distance codes 0..31 base */
|
||||||
1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49,
|
1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49,
|
||||||
65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073,
|
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
|
Use instructions
|
||||||
----------------
|
----------------
|
||||||
Assemble the .asm files using MASM and put the object files into the zlib source
|
Assemble the .asm files using MASM and put the object files into the zlib source
|
||||||
directory. You can also get object files here:
|
directory. You can also get object files here:
|
||||||
|
|
||||||
http://www.winimage.com/zLibDll/zlib124_masm_obj.zip
|
http://www.winimage.com/zLibDll/zlib124_masm_obj.zip
|
||||||
|
|
||||||
define ASMV and ASMINF in your project. Include inffas8664.c in your source tree,
|
define ASMV and ASMINF in your project. Include inffas8664.c in your source tree,
|
||||||
and inffasx64.obj and gvmat64.obj as object to link.
|
and inffasx64.obj and gvmat64.obj as object to link.
|
||||||
|
|||||||
@@ -1,27 +1,27 @@
|
|||||||
|
|
||||||
Summary
|
Summary
|
||||||
-------
|
-------
|
||||||
This directory contains ASM implementations of the functions
|
This directory contains ASM implementations of the functions
|
||||||
longest_match() and inflate_fast().
|
longest_match() and inflate_fast().
|
||||||
|
|
||||||
|
|
||||||
Use instructions
|
Use instructions
|
||||||
----------------
|
----------------
|
||||||
Assemble using MASM, and copy the object files into the zlib source
|
Assemble using MASM, and copy the object files into the zlib source
|
||||||
directory, then run the appropriate makefile, as suggested below. You can
|
directory, then run the appropriate makefile, as suggested below. You can
|
||||||
donwload MASM from here:
|
donwload MASM from here:
|
||||||
|
|
||||||
http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=7a1c9da0-0510-44a2-b042-7ef370530c64
|
http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=7a1c9da0-0510-44a2-b042-7ef370530c64
|
||||||
|
|
||||||
You can also get objects files here:
|
You can also get objects files here:
|
||||||
|
|
||||||
http://www.winimage.com/zLibDll/zlib124_masm_obj.zip
|
http://www.winimage.com/zLibDll/zlib124_masm_obj.zip
|
||||||
|
|
||||||
Build instructions
|
Build instructions
|
||||||
------------------
|
------------------
|
||||||
* With Microsoft C and MASM:
|
* With Microsoft C and MASM:
|
||||||
nmake -f win32/Makefile.msc LOC="-DASMV -DASMINF" OBJA="match686.obj inffas32.obj"
|
nmake -f win32/Makefile.msc LOC="-DASMV -DASMINF" OBJA="match686.obj inffas32.obj"
|
||||||
|
|
||||||
* With Borland C and TASM:
|
* 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"
|
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
|
interface
|
||||||
|
|
||||||
const
|
const
|
||||||
ZLIB_VERSION = '1.2.4';
|
ZLIB_VERSION = '1.2.4.3';
|
||||||
|
|
||||||
type
|
type
|
||||||
alloc_func = function(opaque: Pointer; items, size: Integer): Pointer;
|
alloc_func = function(opaque: Pointer; items, size: Integer): Pointer;
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
/*
|
/*
|
||||||
* puff.c
|
* 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
|
* 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
|
* 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
|
* 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 for puff to write the data
|
||||||
* - Add option in TEST code to skip input bytes
|
* - Add option in TEST code to skip input bytes
|
||||||
* - Allow TEST code to read from piped stdin
|
* - 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 */
|
#include <setjmp.h> /* for setjmp(), longjmp(), and jmp_buf */
|
||||||
@@ -516,8 +518,7 @@ local int fixed(struct state *s)
|
|||||||
static int virgin = 1;
|
static int virgin = 1;
|
||||||
static short lencnt[MAXBITS+1], lensym[FIXLCODES];
|
static short lencnt[MAXBITS+1], lensym[FIXLCODES];
|
||||||
static short distcnt[MAXBITS+1], distsym[MAXDCODES];
|
static short distcnt[MAXBITS+1], distsym[MAXDCODES];
|
||||||
static struct huffman lencode = {lencnt, lensym};
|
static struct huffman lencode, distcode;
|
||||||
static struct huffman distcode = {distcnt, distsym};
|
|
||||||
|
|
||||||
/* build fixed huffman tables if first call (may not be thread safe) */
|
/* build fixed huffman tables if first call (may not be thread safe) */
|
||||||
if (virgin) {
|
if (virgin) {
|
||||||
@@ -540,6 +541,12 @@ local int fixed(struct state *s)
|
|||||||
lengths[symbol] = 5;
|
lengths[symbol] = 5;
|
||||||
construct(&distcode, lengths, MAXDCODES);
|
construct(&distcode, lengths, MAXDCODES);
|
||||||
|
|
||||||
|
/* construct lencode and distcode */
|
||||||
|
lencode.count = lencnt;
|
||||||
|
lencode.symbol = lensym;
|
||||||
|
distcode.count = distcnt;
|
||||||
|
distcode.symbol = distsym;
|
||||||
|
|
||||||
/* do this just once */
|
/* do this just once */
|
||||||
virgin = 0;
|
virgin = 0;
|
||||||
}
|
}
|
||||||
@@ -643,11 +650,16 @@ local int dynamic(struct state *s)
|
|||||||
short lengths[MAXCODES]; /* descriptor code lengths */
|
short lengths[MAXCODES]; /* descriptor code lengths */
|
||||||
short lencnt[MAXBITS+1], lensym[MAXLCODES]; /* lencode memory */
|
short lencnt[MAXBITS+1], lensym[MAXLCODES]; /* lencode memory */
|
||||||
short distcnt[MAXBITS+1], distsym[MAXDCODES]; /* distcode memory */
|
short distcnt[MAXBITS+1], distsym[MAXDCODES]; /* distcode memory */
|
||||||
struct huffman lencode = {lencnt, lensym}; /* length code */
|
struct huffman lencode, distcode; /* length and distance codes */
|
||||||
struct huffman distcode = {distcnt, distsym}; /* distance code */
|
|
||||||
static const short order[19] = /* permutation of code length 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};
|
{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 */
|
/* get number of lengths in each table, check lengths */
|
||||||
nlen = bits(s, 5) + 257;
|
nlen = bits(s, 5) + 257;
|
||||||
ndist = bits(s, 5) + 1;
|
ndist = bits(s, 5) + 1;
|
||||||
@@ -869,7 +881,8 @@ local void *load(char *name, size_t *len)
|
|||||||
|
|
||||||
int main(int argc, char **argv)
|
int main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
int ret, skip = 0, put = 0;
|
int ret, put = 0;
|
||||||
|
unsigned skip = 0;
|
||||||
char *arg, *name = NULL;
|
char *arg, *name = NULL;
|
||||||
unsigned char *source = NULL, *dest;
|
unsigned char *source = NULL, *dest;
|
||||||
size_t len = 0;
|
size_t len = 0;
|
||||||
@@ -881,7 +894,7 @@ int main(int argc, char **argv)
|
|||||||
if (arg[1] == 'w' && arg[2] == 0)
|
if (arg[1] == 'w' && arg[2] == 0)
|
||||||
put = 1;
|
put = 1;
|
||||||
else if (arg[1] >= '0' && arg[1] <= '9')
|
else if (arg[1] >= '0' && arg[1] <= '9')
|
||||||
skip = atoi(arg + 1);
|
skip = (unsigned)atoi(arg + 1);
|
||||||
else {
|
else {
|
||||||
fprintf(stderr, "invalid option %s\n", arg);
|
fprintf(stderr, "invalid option %s\n", arg);
|
||||||
return 3;
|
return 3;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/* puff.h
|
/* puff.h
|
||||||
Copyright (C) 2002-2008 Mark Adler, all rights reserved
|
Copyright (C) 2002-2010 Mark Adler, all rights reserved
|
||||||
version 1.9, 10 Jan 2008
|
version 2.1, 4 Apr 2010
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the author be held liable for any damages
|
warranty. In no event will the author be held liable for any damages
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
|
|
||||||
#define IDR_VERSION1 1
|
#define IDR_VERSION1 1
|
||||||
IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE
|
IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE
|
||||||
FILEVERSION 1,2,4,0
|
FILEVERSION 1,2,4,3
|
||||||
PRODUCTVERSION 1,2,4,0
|
PRODUCTVERSION 1,2,4,3
|
||||||
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
|
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
|
||||||
FILEFLAGS 0
|
FILEFLAGS 0
|
||||||
FILEOS VOS_DOS_WINDOWS32
|
FILEOS VOS_DOS_WINDOWS32
|
||||||
@@ -17,7 +17,7 @@ BEGIN
|
|||||||
|
|
||||||
BEGIN
|
BEGIN
|
||||||
VALUE "FileDescription", "zlib data compression and ZIP file I/O library\0"
|
VALUE "FileDescription", "zlib data compression and ZIP file I/O library\0"
|
||||||
VALUE "FileVersion", "1.2.4.0\0"
|
VALUE "FileVersion", "1.2.4.3\0"
|
||||||
VALUE "InternalName", "zlib\0"
|
VALUE "InternalName", "zlib\0"
|
||||||
VALUE "OriginalFilename", "zlib.dll\0"
|
VALUE "OriginalFilename", "zlib.dll\0"
|
||||||
VALUE "ProductName", "ZLib.DLL\0"
|
VALUE "ProductName", "ZLib.DLL\0"
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
|
|
||||||
#define IDR_VERSION1 1
|
#define IDR_VERSION1 1
|
||||||
IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE
|
IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE
|
||||||
FILEVERSION 1,2,4,0
|
FILEVERSION 1,2,4,3
|
||||||
PRODUCTVERSION 1,2,4,0
|
PRODUCTVERSION 1,2,4,3
|
||||||
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
|
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
|
||||||
FILEFLAGS 0
|
FILEFLAGS 0
|
||||||
FILEOS VOS_DOS_WINDOWS32
|
FILEOS VOS_DOS_WINDOWS32
|
||||||
@@ -17,7 +17,7 @@ BEGIN
|
|||||||
|
|
||||||
BEGIN
|
BEGIN
|
||||||
VALUE "FileDescription", "zlib data compression and ZIP file I/O library\0"
|
VALUE "FileDescription", "zlib data compression and ZIP file I/O library\0"
|
||||||
VALUE "FileVersion", "1.2.4.0\0"
|
VALUE "FileVersion", "1.2.4.3\0"
|
||||||
VALUE "InternalName", "zlib\0"
|
VALUE "InternalName", "zlib\0"
|
||||||
VALUE "OriginalFilename", "zlib.dll\0"
|
VALUE "OriginalFilename", "zlib.dll\0"
|
||||||
VALUE "ProductName", "ZLib.DLL\0"
|
VALUE "ProductName", "ZLib.DLL\0"
|
||||||
|
|||||||
2
crc32.c
2
crc32.c
@@ -221,7 +221,7 @@ const unsigned long FAR * ZEXPORT get_crc_table()
|
|||||||
unsigned long ZEXPORT crc32(crc, buf, len)
|
unsigned long ZEXPORT crc32(crc, buf, len)
|
||||||
unsigned long crc;
|
unsigned long crc;
|
||||||
const unsigned char FAR *buf;
|
const unsigned char FAR *buf;
|
||||||
unsigned len;
|
uInt len;
|
||||||
{
|
{
|
||||||
if (buf == Z_NULL) return 0UL;
|
if (buf == Z_NULL) return 0UL;
|
||||||
|
|
||||||
|
|||||||
@@ -52,7 +52,7 @@
|
|||||||
#include "deflate.h"
|
#include "deflate.h"
|
||||||
|
|
||||||
const char deflate_copyright[] =
|
const char deflate_copyright[] =
|
||||||
" deflate 1.2.4 Copyright 1995-2010 Jean-loup Gailly and Mark Adler ";
|
" deflate 1.2.4.3 Copyright 1995-2010 Jean-loup Gailly and Mark Adler ";
|
||||||
/*
|
/*
|
||||||
If you use the zlib library in a product, an acknowledgment is welcome
|
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
|
in the documentation of your product. If for some reason you cannot
|
||||||
|
|||||||
22
gzguts.h
22
gzguts.h
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
#ifdef _LARGEFILE64_SOURCE
|
#ifdef _LARGEFILE64_SOURCE
|
||||||
# ifndef _LARGEFILE_SOURCE
|
# ifndef _LARGEFILE_SOURCE
|
||||||
# define _LARGEFILE_SOURCE
|
# define _LARGEFILE_SOURCE 1
|
||||||
# endif
|
# endif
|
||||||
# ifdef _FILE_OFFSET_BITS
|
# ifdef _FILE_OFFSET_BITS
|
||||||
# undef _FILE_OFFSET_BITS
|
# undef _FILE_OFFSET_BITS
|
||||||
@@ -44,7 +44,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* get errno and strerror definition */
|
/* get errno and strerror definition */
|
||||||
#if defined UNDER_CE && defined NO_ERRNO_H
|
#if defined UNDER_CE
|
||||||
# include <windows.h>
|
# include <windows.h>
|
||||||
# define zstrerror() gz_strwinerror((DWORD)GetLastError())
|
# define zstrerror() gz_strwinerror((DWORD)GetLastError())
|
||||||
#else
|
#else
|
||||||
@@ -56,16 +56,12 @@
|
|||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* MVS fdopen() */
|
/* provide prototypes for these when building zlib without LFS */
|
||||||
#ifdef __MVS__
|
#if !defined(_LARGEFILE64_SOURCE) || _LFS64_LARGEFILE-0 == 0
|
||||||
#pragma map (fdopen , "\174\174FDOPEN")
|
ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *));
|
||||||
FILE *fdopen(int, const char *);
|
ZEXTERN z_off64_t ZEXPORT gzseek64 OF((gzFile, z_off64_t, int));
|
||||||
#endif
|
ZEXTERN z_off64_t ZEXPORT gztell64 OF((gzFile));
|
||||||
|
ZEXTERN z_off64_t ZEXPORT gzoffset64 OF((gzFile));
|
||||||
#ifdef _LARGEFILE64_SOURCE
|
|
||||||
# define z_off64_t off64_t
|
|
||||||
#else
|
|
||||||
# define z_off64_t z_off_t
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* default i/o buffer size -- double this for output when reading */
|
/* default i/o buffer size -- double this for output when reading */
|
||||||
@@ -117,7 +113,7 @@ typedef gz_state FAR *gz_statep;
|
|||||||
|
|
||||||
/* shared functions */
|
/* shared functions */
|
||||||
ZEXTERN void ZEXPORT gz_error OF((gz_statep, int, const char *));
|
ZEXTERN void ZEXPORT gz_error OF((gz_statep, int, const char *));
|
||||||
#if defined UNDER_CE && defined NO_ERRNO_H
|
#if defined UNDER_CE
|
||||||
ZEXTERN char ZEXPORT *gz_strwinerror OF((DWORD error));
|
ZEXTERN char ZEXPORT *gz_strwinerror OF((DWORD error));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
14
gzlib.c
14
gzlib.c
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
#include "gzguts.h"
|
#include "gzguts.h"
|
||||||
|
|
||||||
#ifdef _LARGEFILE64_SOURCE
|
#if defined(_LARGEFILE64_SOURCE) && _LFS64_LARGEFILE-0
|
||||||
# define LSEEK lseek64
|
# define LSEEK lseek64
|
||||||
#else
|
#else
|
||||||
# define LSEEK lseek
|
# define LSEEK lseek
|
||||||
@@ -15,7 +15,7 @@
|
|||||||
local void gz_reset OF((gz_statep));
|
local void gz_reset OF((gz_statep));
|
||||||
local gzFile gz_open OF((const char *, int, const char *));
|
local gzFile gz_open OF((const char *, int, const char *));
|
||||||
|
|
||||||
#if defined UNDER_CE && defined NO_ERRNO_H
|
#if defined UNDER_CE
|
||||||
|
|
||||||
/* Map the Windows error number in ERROR to a locale-dependent error message
|
/* Map the Windows error number in ERROR to a locale-dependent error message
|
||||||
string and return a pointer to it. Typically, the values for ERROR come
|
string and return a pointer to it. Typically, the values for ERROR come
|
||||||
@@ -65,7 +65,7 @@ char ZEXPORT *gz_strwinerror (error)
|
|||||||
return buf;
|
return buf;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* UNDER_CE && NO_ERRNO_H */
|
#endif /* UNDER_CE */
|
||||||
|
|
||||||
/* Reset gzip file state */
|
/* Reset gzip file state */
|
||||||
local void gz_reset(state)
|
local void gz_reset(state)
|
||||||
@@ -172,6 +172,7 @@ local gzFile gz_open(path, fd, mode)
|
|||||||
O_APPEND))),
|
O_APPEND))),
|
||||||
0666);
|
0666);
|
||||||
if (state->fd == -1) {
|
if (state->fd == -1) {
|
||||||
|
free(state->path);
|
||||||
free(state);
|
free(state);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -217,7 +218,7 @@ gzFile ZEXPORT gzdopen(fd, mode)
|
|||||||
|
|
||||||
if (fd == -1 || (path = malloc(7 + 3 * sizeof(int))) == NULL)
|
if (fd == -1 || (path = malloc(7 + 3 * sizeof(int))) == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
sprintf(path, "<fd:%d>", fd);
|
sprintf(path, "<fd:%d>", fd); /* for debugging */
|
||||||
gz = gz_open(path, fd, mode);
|
gz = gz_open(path, fd, mode);
|
||||||
free(path);
|
free(path);
|
||||||
return gz;
|
return gz;
|
||||||
@@ -305,7 +306,7 @@ z_off64_t ZEXPORT gzseek64(file, offset, whence)
|
|||||||
/* if within raw area while reading, just go there */
|
/* if within raw area while reading, just go there */
|
||||||
if (state->mode == GZ_READ && state->how == COPY &&
|
if (state->mode == GZ_READ && state->how == COPY &&
|
||||||
state->pos + offset >= state->raw) {
|
state->pos + offset >= state->raw) {
|
||||||
ret = LSEEK(state->fd, offset, SEEK_CUR);
|
ret = LSEEK(state->fd, offset - state->have, SEEK_CUR);
|
||||||
if (ret == -1)
|
if (ret == -1)
|
||||||
return -1;
|
return -1;
|
||||||
state->have = 0;
|
state->have = 0;
|
||||||
@@ -432,7 +433,8 @@ int ZEXPORT gzeof(file)
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
/* return end-of-file state */
|
/* 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 -- */
|
/* -- see zlib.h -- */
|
||||||
|
|||||||
3
gzread.c
3
gzread.c
@@ -55,7 +55,8 @@ local int gz_avail(state)
|
|||||||
if (state->err != Z_OK)
|
if (state->err != Z_OK)
|
||||||
return -1;
|
return -1;
|
||||||
if (state->eof == 0) {
|
if (state->eof == 0) {
|
||||||
if (gz_load(state, state->in, state->size, &(strm->avail_in)) == -1)
|
if (gz_load(state, state->in, state->size,
|
||||||
|
(unsigned *)&(strm->avail_in)) == -1)
|
||||||
return -1;
|
return -1;
|
||||||
strm->next_in = state->in;
|
strm->next_in = state->in;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
#define MAXBITS 15
|
#define MAXBITS 15
|
||||||
|
|
||||||
const char inflate_copyright[] =
|
const char inflate_copyright[] =
|
||||||
" inflate 1.2.4 Copyright 1995-2010 Mark Adler ";
|
" inflate 1.2.4.3 Copyright 1995-2010 Mark Adler ";
|
||||||
/*
|
/*
|
||||||
If you use the zlib library in a product, an acknowledgment is welcome
|
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
|
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};
|
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 */
|
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,
|
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, 64, 195};
|
19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 195, 66};
|
||||||
static const unsigned short dbase[32] = { /* Distance codes 0..29 base */
|
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,
|
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,
|
257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145,
|
||||||
|
|||||||
@@ -32,6 +32,9 @@
|
|||||||
#if defined(MSDOS) || defined(OS2) || defined(WIN32) || defined(__CYGWIN__)
|
#if defined(MSDOS) || defined(OS2) || defined(WIN32) || defined(__CYGWIN__)
|
||||||
# include <fcntl.h>
|
# include <fcntl.h>
|
||||||
# include <io.h>
|
# include <io.h>
|
||||||
|
# ifdef UNDER_CE
|
||||||
|
# include <stdlib.h>
|
||||||
|
# endif
|
||||||
# define SET_BINARY_MODE(file) setmode(fileno(file), O_BINARY)
|
# define SET_BINARY_MODE(file) setmode(fileno(file), O_BINARY)
|
||||||
#else
|
#else
|
||||||
# define SET_BINARY_MODE(file)
|
# define SET_BINARY_MODE(file)
|
||||||
@@ -50,11 +53,13 @@
|
|||||||
# include <unix.h> /* for fileno */
|
# include <unix.h> /* for fileno */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if !defined(Z_HAVE_UNISTD_H) && !defined(_LARGEFILE64_SOURCE)
|
||||||
#ifndef WIN32 /* unlink already in stdio.h for WIN32 */
|
#ifndef WIN32 /* unlink already in stdio.h for WIN32 */
|
||||||
extern int unlink OF((const char *));
|
extern int unlink OF((const char *));
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(UNDER_CE) && defined(NO_ERRNO_H)
|
#if defined(UNDER_CE)
|
||||||
# include <windows.h>
|
# include <windows.h>
|
||||||
# define perror(s) pwinerror(s)
|
# define perror(s) pwinerror(s)
|
||||||
|
|
||||||
@@ -116,7 +121,7 @@ static void pwinerror (s)
|
|||||||
fprintf(stderr, "%s\n", strwinerror(GetLastError ()));
|
fprintf(stderr, "%s\n", strwinerror(GetLastError ()));
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* UNDER_CE && NO_ERRNO_H */
|
#endif /* UNDER_CE */
|
||||||
|
|
||||||
#ifndef GZ_SUFFIX
|
#ifndef GZ_SUFFIX
|
||||||
# define GZ_SUFFIX ".gz"
|
# define GZ_SUFFIX ".gz"
|
||||||
|
|||||||
@@ -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:Files>
|
||||||
<QPG:Add file="../zconf.h" install="/opt/include/" user="root:sys" permission="644"/>
|
<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="../zlib.h" install="/opt/include/" user="root:sys" permission="644"/>
|
||||||
<QPG:Add file="../libz.so.1.2.4" install="/opt/lib/" user="root:bin" permission="644"/>
|
<QPG:Add file="../libz.so.1.2.4.3" 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"/>
|
<QPG:Add file="libz.so" install="/opt/lib/" component="dev" filetype="symlink" linkto="libz.so.1.2.4.3"/>
|
||||||
<QPG:Add file="libz.so.1" install="/opt/lib/" filetype="symlink" linkto="libz.so.1.2.4"/>
|
<QPG:Add file="libz.so.1" install="/opt/lib/" filetype="symlink" linkto="libz.so.1.2.4.3"/>
|
||||||
<QPG:Add file="../libz.so.1.2.4" install="/opt/lib/" component="slib"/>
|
<QPG:Add file="../libz.so.1.2.4.3" install="/opt/lib/" component="slib"/>
|
||||||
</QPG:Files>
|
</QPG:Files>
|
||||||
|
|
||||||
<QPG:PackageFilter>
|
<QPG:PackageFilter>
|
||||||
@@ -63,7 +63,7 @@
|
|||||||
</QPM:ProductDescription>
|
</QPM:ProductDescription>
|
||||||
|
|
||||||
<QPM:ReleaseDescription>
|
<QPM:ReleaseDescription>
|
||||||
<QPM:ReleaseVersion>1.2.4</QPM:ReleaseVersion>
|
<QPM:ReleaseVersion>1.2.4.3</QPM:ReleaseVersion>
|
||||||
<QPM:ReleaseUrgency>Medium</QPM:ReleaseUrgency>
|
<QPM:ReleaseUrgency>Medium</QPM:ReleaseUrgency>
|
||||||
<QPM:ReleaseStability>Stable</QPM:ReleaseStability>
|
<QPM:ReleaseStability>Stable</QPM:ReleaseStability>
|
||||||
<QPM:ReleaseNoteMinor></QPM:ReleaseNoteMinor>
|
<QPM:ReleaseNoteMinor></QPM:ReleaseNoteMinor>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" ?>
|
<?xml version="1.0" ?>
|
||||||
<package name="zlib" version="1.2.4">
|
<package name="zlib" version="1.2.4.3">
|
||||||
<library name="zlib" dlversion="1.2.4" dlname="z">
|
<library name="zlib" dlversion="1.2.4.3" dlname="z">
|
||||||
<property name="description"> zip compression library </property>
|
<property name="description"> zip compression library </property>
|
||||||
<property name="include-target-dir" value="$(@PACKAGE/install-includedir)" />
|
<property name="include-target-dir" value="$(@PACKAGE/install-includedir)" />
|
||||||
|
|
||||||
|
|||||||
@@ -30,7 +30,8 @@ IMPLIB = libzdll.a
|
|||||||
#LOC = -DASMV
|
#LOC = -DASMV
|
||||||
#LOC = -DDEBUG -g
|
#LOC = -DDEBUG -g
|
||||||
|
|
||||||
CC = gcc
|
PREFIX =
|
||||||
|
CC = $(PREFIX)gcc
|
||||||
CFLAGS = $(LOC) -O3 -Wall
|
CFLAGS = $(LOC) -O3 -Wall
|
||||||
|
|
||||||
AS = $(CC)
|
AS = $(CC)
|
||||||
@@ -39,13 +40,13 @@ ASFLAGS = $(LOC) -Wall
|
|||||||
LD = $(CC)
|
LD = $(CC)
|
||||||
LDFLAGS = $(LOC) -s
|
LDFLAGS = $(LOC) -s
|
||||||
|
|
||||||
AR = ar
|
AR = $(PREFIX)ar
|
||||||
ARFLAGS = rcs
|
ARFLAGS = rcs
|
||||||
|
|
||||||
RC = windres
|
RC = $(PREFIX)windres
|
||||||
RCFLAGS = --define GCC_WINDRES
|
RCFLAGS = --define GCC_WINDRES
|
||||||
|
|
||||||
STRIP = strip
|
STRIP = $(PREFIX)strip
|
||||||
|
|
||||||
CP = cp -fp
|
CP = cp -fp
|
||||||
# If GNU install is available, replace $(CP) with install.
|
# If GNU install is available, replace $(CP) with install.
|
||||||
@@ -106,8 +107,8 @@ zlibrc.o: win32/zlib1.rc
|
|||||||
.PHONY: install uninstall clean
|
.PHONY: install uninstall clean
|
||||||
|
|
||||||
install: zlib.h zconf.h $(LIB)
|
install: zlib.h zconf.h $(LIB)
|
||||||
-@if not exist $(INCLUDE_PATH)/nul mkdir $(INCLUDE_PATH)
|
-@mkdir -p $(INCLUDE_PATH)
|
||||||
-@if not exist $(LIBRARY_PATH)/nul mkdir $(LIBRARY_PATH)
|
-@mkdir -p $(LIBRARY_PATH)
|
||||||
-$(INSTALL) zlib.h $(INCLUDE_PATH)
|
-$(INSTALL) zlib.h $(INCLUDE_PATH)
|
||||||
-$(INSTALL) zconf.h $(INCLUDE_PATH)
|
-$(INSTALL) zconf.h $(INCLUDE_PATH)
|
||||||
-$(INSTALL) $(STATICLIB) $(LIBRARY_PATH)
|
-$(INSTALL) $(STATICLIB) $(LIBRARY_PATH)
|
||||||
|
|||||||
@@ -2,15 +2,16 @@
|
|||||||
# zlib is copyright (C) 1995-2006 Jean-loup Gailly and Mark Adler
|
# zlib is copyright (C) 1995-2006 Jean-loup Gailly and Mark Adler
|
||||||
#
|
#
|
||||||
# Usage:
|
# Usage:
|
||||||
# nmake -f win32/Makefile.msc (standard build)
|
# nmake -f win32/Makefile.msc (standard build)
|
||||||
# nmake -f win32/Makefile.msc LOC=-DFOO (nonstandard 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 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
|
# optional build flags
|
||||||
LOC =
|
LOC =
|
||||||
|
|
||||||
|
|
||||||
# variables
|
# variables
|
||||||
STATICLIB = zlib.lib
|
STATICLIB = zlib.lib
|
||||||
SHAREDLIB = zlib1.dll
|
SHAREDLIB = zlib1.dll
|
||||||
@@ -23,13 +24,13 @@ AR = lib
|
|||||||
RC = rc
|
RC = rc
|
||||||
CFLAGS = -nologo -MD -W3 -O2 -Oy- -Zi -Fd"zlib" $(LOC)
|
CFLAGS = -nologo -MD -W3 -O2 -Oy- -Zi -Fd"zlib" $(LOC)
|
||||||
WFLAGS = -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE
|
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
|
LDFLAGS = -nologo -debug -incremental:no -opt:ref
|
||||||
ARFLAGS = -nologo
|
ARFLAGS = -nologo
|
||||||
RCFLAGS = /dWIN32 /r
|
RCFLAGS = /dWIN32 /r
|
||||||
|
|
||||||
OBJS = adler32.obj compress.obj crc32.obj deflate.obj gzclose.obj gzlib.obj gzread.obj \
|
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 =
|
OBJA =
|
||||||
|
|
||||||
|
|
||||||
@@ -71,7 +72,13 @@ minigzip_d.exe: minigzip.obj $(IMPLIB)
|
|||||||
.c.obj:
|
.c.obj:
|
||||||
$(CC) -c $(WFLAGS) $(CFLAGS) $<
|
$(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) $<
|
$(AS) -c $(ASFLAGS) $<
|
||||||
|
|
||||||
adler32.obj: adler32.c zlib.h zconf.h
|
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
|
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
|
example.obj: example.c zlib.h zconf.h
|
||||||
|
|
||||||
minigzip.obj: minigzip.c zlib.h zconf.h
|
minigzip.obj: minigzip.c zlib.h zconf.h
|
||||||
|
|||||||
103
win32/README-WIN32.txt
Normal file
103
win32/README-WIN32.txt
Normal file
@@ -0,0 +1,103 @@
|
|||||||
|
ZLIB DATA COMPRESSION LIBRARY
|
||||||
|
|
||||||
|
zlib 1.2.4 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)
|
||||||
|
and rfc1952.txt (gzip format).
|
||||||
|
|
||||||
|
All functions of the compression library are documented in the file zlib.h
|
||||||
|
(volunteer to write man pages welcome, contact zlib@gzip.org). Two compiled
|
||||||
|
examples are distributed in this package, example and minigzip. The example_d
|
||||||
|
and minigzip_d flavors validate that the zlib1.dll file is working correctly.
|
||||||
|
|
||||||
|
Questions about zlib should be sent to <zlib@gzip.org>. The zlib home page
|
||||||
|
is http://zlib.net/ . Before reporting a problem, please check this site to
|
||||||
|
verify that you have the latest version of zlib; otherwise get the latest
|
||||||
|
version and check whether the problem still exists or not.
|
||||||
|
|
||||||
|
PLEASE read DLL_FAQ.txt, and the the zlib FAQ http://zlib.net/zlib_faq.html
|
||||||
|
before asking for help.
|
||||||
|
|
||||||
|
|
||||||
|
Manifest:
|
||||||
|
|
||||||
|
The package zlib-1.2.4-win32-x86.zip contains the following files:
|
||||||
|
|
||||||
|
README-WIN32.txt This document
|
||||||
|
ChangeLog Changes since previous zlib packages
|
||||||
|
DLL_FAQ.txt Frequently asked questions about zlib1.dll
|
||||||
|
zlib.3.pdf Documentation of this library in Adobe Acrobat format
|
||||||
|
|
||||||
|
example.exe A statically-bound example (using zlib.lib, not the dll)
|
||||||
|
example.pdb Symbolic information for debugging example.exe
|
||||||
|
|
||||||
|
example_d.exe A zlib1.dll bound example (using zdll.lib)
|
||||||
|
example_d.pdb Symbolic information for debugging example_d.exe
|
||||||
|
|
||||||
|
minigzip.exe A statically-bound test program (using zlib.lib, not the dll)
|
||||||
|
minigzip.pdb Symbolic information for debugging minigzip.exe
|
||||||
|
|
||||||
|
minigzip_d.exe A zlib1.dll bound test program (using zdll.lib)
|
||||||
|
minigzip_d.pdb Symbolic information for debugging minigzip_d.exe
|
||||||
|
|
||||||
|
zlib.h Install these files into the compilers' INCLUDE path to
|
||||||
|
zconf.h compile programs which use zlib.lib or zdll.lib
|
||||||
|
|
||||||
|
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 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)
|
||||||
|
zlib1.pdb Install in the same directory as zlib1.dll, in order to debug
|
||||||
|
an application crash using WinDbg or similar tools.
|
||||||
|
|
||||||
|
All .pdb files above are entirely optional, but are very useful to a developer
|
||||||
|
attempting to diagnose program misbehavior or a crash. Many additional
|
||||||
|
important files for developers can be found in the zlib124.zip source package
|
||||||
|
available from http://zlib.net/ - review that package's README file for details.
|
||||||
|
|
||||||
|
|
||||||
|
Acknowledgments:
|
||||||
|
|
||||||
|
The deflate format used by zlib was defined by Phil Katz. The deflate and
|
||||||
|
zlib specifications were written by L. Peter Deutsch. Thanks to all the
|
||||||
|
people who reported problems and suggested various improvements in zlib; they
|
||||||
|
are too numerous to cite here.
|
||||||
|
|
||||||
|
|
||||||
|
Copyright notice:
|
||||||
|
|
||||||
|
(C) 1995-2010 Jean-loup Gailly and Mark Adler
|
||||||
|
|
||||||
|
This software is provided 'as-is', without any express or implied
|
||||||
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
arising from the use of this software.
|
||||||
|
|
||||||
|
Permission is granted to anyone to use this software for any purpose,
|
||||||
|
including commercial applications, and to alter it and redistribute it
|
||||||
|
freely, subject to the following restrictions:
|
||||||
|
|
||||||
|
1. The origin of this software must not be misrepresented; you must not
|
||||||
|
claim that you wrote the original software. If you use this software
|
||||||
|
in a product, an acknowledgment in the product documentation would be
|
||||||
|
appreciated but is not required.
|
||||||
|
2. Altered source versions must be plainly marked as such, and must not be
|
||||||
|
misrepresented as being the original software.
|
||||||
|
3. This notice may not be removed or altered from any source distribution.
|
||||||
|
|
||||||
|
Jean-loup Gailly Mark Adler
|
||||||
|
jloup@gzip.org madler@alumni.caltech.edu
|
||||||
|
|
||||||
|
If you use the zlib library in a product, we would appreciate *not* receiving
|
||||||
|
lengthy legal documents to sign. The sources are provided for free but without
|
||||||
|
warranty of any kind. The library has been entirely written by Jean-loup
|
||||||
|
Gailly and Mark Adler; it does not include third-party code.
|
||||||
|
|
||||||
|
If you redistribute modified sources, we would appreciate that you include in
|
||||||
|
the file ChangeLog history information documenting your changes. Please read
|
||||||
|
the FAQ for more information on the distribution of modified source versions.
|
||||||
16
zconf.h
16
zconf.h
@@ -364,8 +364,11 @@ typedef uLong FAR uLongf;
|
|||||||
# define Z_HAVE_UNISTD_H
|
# define Z_HAVE_UNISTD_H
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef Z_HAVE_UNISTD_H
|
#ifdef STDC
|
||||||
# include <sys/types.h> /* for off_t */
|
# include <sys/types.h> /* for off_t */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(Z_HAVE_UNISTD_H) || defined(_LARGEFILE64_SOURCE)
|
||||||
# include <unistd.h> /* for SEEK_* and off_t */
|
# include <unistd.h> /* for SEEK_* and off_t */
|
||||||
# ifdef VMS
|
# ifdef VMS
|
||||||
# include <unixio.h> /* for off_t */
|
# include <unixio.h> /* for off_t */
|
||||||
@@ -375,19 +378,22 @@ typedef uLong FAR uLongf;
|
|||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef _LARGEFILE64_SOURCE
|
|
||||||
# include <sys/types.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef SEEK_SET
|
#ifndef SEEK_SET
|
||||||
# define SEEK_SET 0 /* Seek from beginning of file. */
|
# define SEEK_SET 0 /* Seek from beginning of file. */
|
||||||
# define SEEK_CUR 1 /* Seek from current position. */
|
# define SEEK_CUR 1 /* Seek from current position. */
|
||||||
# define SEEK_END 2 /* Set file pointer to EOF plus "offset" */
|
# define SEEK_END 2 /* Set file pointer to EOF plus "offset" */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef z_off_t
|
#ifndef z_off_t
|
||||||
# define z_off_t long
|
# define z_off_t long
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(_LARGEFILE64_SOURCE) && _LFS64_LARGEFILE-0
|
||||||
|
# define z_off64_t off64_t
|
||||||
|
#else
|
||||||
|
# define z_off64_t z_off_t
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(__OS400__)
|
#if defined(__OS400__)
|
||||||
# define NO_vsnprintf
|
# define NO_vsnprintf
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -366,8 +366,11 @@ typedef uLong FAR uLongf;
|
|||||||
# define Z_HAVE_UNISTD_H
|
# define Z_HAVE_UNISTD_H
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef Z_HAVE_UNISTD_H
|
#ifdef STDC
|
||||||
# include <sys/types.h> /* for off_t */
|
# include <sys/types.h> /* for off_t */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(Z_HAVE_UNISTD_H) || defined(_LARGEFILE64_SOURCE)
|
||||||
# include <unistd.h> /* for SEEK_* and off_t */
|
# include <unistd.h> /* for SEEK_* and off_t */
|
||||||
# ifdef VMS
|
# ifdef VMS
|
||||||
# include <unixio.h> /* for off_t */
|
# include <unixio.h> /* for off_t */
|
||||||
@@ -377,19 +380,22 @@ typedef uLong FAR uLongf;
|
|||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef _LARGEFILE64_SOURCE
|
|
||||||
# include <sys/types.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef SEEK_SET
|
#ifndef SEEK_SET
|
||||||
# define SEEK_SET 0 /* Seek from beginning of file. */
|
# define SEEK_SET 0 /* Seek from beginning of file. */
|
||||||
# define SEEK_CUR 1 /* Seek from current position. */
|
# define SEEK_CUR 1 /* Seek from current position. */
|
||||||
# define SEEK_END 2 /* Set file pointer to EOF plus "offset" */
|
# define SEEK_END 2 /* Set file pointer to EOF plus "offset" */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef z_off_t
|
#ifndef z_off_t
|
||||||
# define z_off_t long
|
# define z_off_t long
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(_LARGEFILE64_SOURCE) && _LFS64_LARGEFILE-0
|
||||||
|
# define z_off64_t off64_t
|
||||||
|
#else
|
||||||
|
# define z_off64_t z_off_t
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(__OS400__)
|
#if defined(__OS400__)
|
||||||
# define NO_vsnprintf
|
# define NO_vsnprintf
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
16
zconf.h.in
16
zconf.h.in
@@ -364,8 +364,11 @@ typedef uLong FAR uLongf;
|
|||||||
# define Z_HAVE_UNISTD_H
|
# define Z_HAVE_UNISTD_H
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef Z_HAVE_UNISTD_H
|
#ifdef STDC
|
||||||
# include <sys/types.h> /* for off_t */
|
# include <sys/types.h> /* for off_t */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(Z_HAVE_UNISTD_H) || defined(_LARGEFILE64_SOURCE)
|
||||||
# include <unistd.h> /* for SEEK_* and off_t */
|
# include <unistd.h> /* for SEEK_* and off_t */
|
||||||
# ifdef VMS
|
# ifdef VMS
|
||||||
# include <unixio.h> /* for off_t */
|
# include <unixio.h> /* for off_t */
|
||||||
@@ -375,19 +378,22 @@ typedef uLong FAR uLongf;
|
|||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef _LARGEFILE64_SOURCE
|
|
||||||
# include <sys/types.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef SEEK_SET
|
#ifndef SEEK_SET
|
||||||
# define SEEK_SET 0 /* Seek from beginning of file. */
|
# define SEEK_SET 0 /* Seek from beginning of file. */
|
||||||
# define SEEK_CUR 1 /* Seek from current position. */
|
# define SEEK_CUR 1 /* Seek from current position. */
|
||||||
# define SEEK_END 2 /* Set file pointer to EOF plus "offset" */
|
# define SEEK_END 2 /* Set file pointer to EOF plus "offset" */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef z_off_t
|
#ifndef z_off_t
|
||||||
# define z_off_t long
|
# define z_off_t long
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(_LARGEFILE64_SOURCE) && _LFS64_LARGEFILE-0
|
||||||
|
# define z_off64_t off64_t
|
||||||
|
#else
|
||||||
|
# define z_off64_t z_off_t
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(__OS400__)
|
#if defined(__OS400__)
|
||||||
# define NO_vsnprintf
|
# define NO_vsnprintf
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
4
zlib.3
4
zlib.3
@@ -1,4 +1,4 @@
|
|||||||
.TH ZLIB 3 "14 March 2010"
|
.TH ZLIB 3 "10 Apr 2010"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
zlib \- compression/decompression library
|
zlib \- compression/decompression library
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
@@ -125,7 +125,7 @@ before asking for help.
|
|||||||
Send questions and/or comments to zlib@gzip.org,
|
Send questions and/or comments to zlib@gzip.org,
|
||||||
or (for the Windows DLL version) to Gilles Vollant (info@winimage.com).
|
or (for the Windows DLL version) to Gilles Vollant (info@winimage.com).
|
||||||
.SH AUTHORS
|
.SH AUTHORS
|
||||||
Version 1.2.4
|
Version 1.2.4.3
|
||||||
Copyright (C) 1995-2010 Jean-loup Gailly (jloup@gzip.org)
|
Copyright (C) 1995-2010 Jean-loup Gailly (jloup@gzip.org)
|
||||||
and Mark Adler (madler@alumni.caltech.edu).
|
and Mark Adler (madler@alumni.caltech.edu).
|
||||||
.LP
|
.LP
|
||||||
|
|||||||
BIN
zlib.3.pdf
BIN
zlib.3.pdf
Binary file not shown.
44
zlib.h
44
zlib.h
@@ -1,5 +1,5 @@
|
|||||||
/* zlib.h -- interface of the 'zlib' general purpose compression library
|
/* zlib.h -- interface of the 'zlib' general purpose compression library
|
||||||
version 1.2.4, Mar 14th, 2010
|
version 1.2.4.3, April 10th, 2010
|
||||||
|
|
||||||
Copyright (C) 1995-2010 Jean-loup Gailly and Mark Adler
|
Copyright (C) 1995-2010 Jean-loup Gailly and Mark Adler
|
||||||
|
|
||||||
@@ -37,12 +37,12 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define ZLIB_VERSION "1.2.4"
|
#define ZLIB_VERSION "1.2.4.3"
|
||||||
#define ZLIB_VERNUM 0x1240
|
#define ZLIB_VERNUM 0x1243
|
||||||
#define ZLIB_VER_MAJOR 1
|
#define ZLIB_VER_MAJOR 1
|
||||||
#define ZLIB_VER_MINOR 2
|
#define ZLIB_VER_MINOR 2
|
||||||
#define ZLIB_VER_REVISION 4
|
#define ZLIB_VER_REVISION 4
|
||||||
#define ZLIB_VER_SUBREVISION 0
|
#define ZLIB_VER_SUBREVISION 3
|
||||||
|
|
||||||
/*
|
/*
|
||||||
The 'zlib' compression library provides in-memory compression and
|
The 'zlib' compression library provides in-memory compression and
|
||||||
@@ -1556,29 +1556,35 @@ ZEXTERN int ZEXPORT inflateBackInit_ OF((z_streamp strm, int windowBits,
|
|||||||
inflateBackInit_((strm), (windowBits), (window), \
|
inflateBackInit_((strm), (windowBits), (window), \
|
||||||
ZLIB_VERSION, sizeof(z_stream))
|
ZLIB_VERSION, sizeof(z_stream))
|
||||||
|
|
||||||
#ifdef _LARGEFILE64_SOURCE
|
/* provide 64-bit offset functions if _LARGEFILE64_SOURCE defined, and/or
|
||||||
|
* change the regular functions to 64 bits if _FILE_OFFSET_BITS is 64 (if
|
||||||
|
* both are true, the application gets the *64 functions, and the regular
|
||||||
|
* functions are changed to 64 bits) -- in case these are set on systems
|
||||||
|
* without large file support, _LFS64_LARGEFILE must also be true
|
||||||
|
*/
|
||||||
|
#if defined(_LARGEFILE64_SOURCE) && _LFS64_LARGEFILE-0
|
||||||
ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *));
|
ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *));
|
||||||
ZEXTERN off64_t ZEXPORT gzseek64 OF((gzFile, off64_t, int));
|
ZEXTERN z_off64_t ZEXPORT gzseek64 OF((gzFile, z_off64_t, int));
|
||||||
ZEXTERN off64_t ZEXPORT gztell64 OF((gzFile));
|
ZEXTERN z_off64_t ZEXPORT gztell64 OF((gzFile));
|
||||||
ZEXTERN off64_t ZEXPORT gzoffset64 OF((gzFile));
|
ZEXTERN z_off64_t ZEXPORT gzoffset64 OF((gzFile));
|
||||||
ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, off64_t));
|
ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off64_t));
|
||||||
ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, off64_t));
|
ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off64_t));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined(ZLIB_INTERNAL) && _FILE_OFFSET_BITS == 64
|
#if !defined(ZLIB_INTERNAL) && _FILE_OFFSET_BITS-0 == 64 && _LFS64_LARGEFILE-0
|
||||||
# define gzopen gzopen64
|
# define gzopen gzopen64
|
||||||
# define gzseek gzseek64
|
# define gzseek gzseek64
|
||||||
# define gztell gztell64
|
# define gztell gztell64
|
||||||
# define gzoffset gzoffset64
|
# define gzoffset gzoffset64
|
||||||
# define adler32_combine adler32_combine64
|
# define adler32_combine adler32_combine64
|
||||||
# define crc32_combine crc32_combine64
|
# define crc32_combine crc32_combine64
|
||||||
# ifndef _LARGEFILE64_SOURCE
|
# ifdef _LARGEFILE64_SOURCE
|
||||||
ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *));
|
ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *));
|
||||||
ZEXTERN off_t ZEXPORT gzseek64 OF((gzFile, off_t, int));
|
ZEXTERN z_off_t ZEXPORT gzseek64 OF((gzFile, z_off_t, int));
|
||||||
ZEXTERN off_t ZEXPORT gztell64 OF((gzFile));
|
ZEXTERN z_off_t ZEXPORT gztell64 OF((gzFile));
|
||||||
ZEXTERN off_t ZEXPORT gzoffset64 OF((gzFile));
|
ZEXTERN z_off_t ZEXPORT gzoffset64 OF((gzFile));
|
||||||
ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, off_t));
|
ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off_t));
|
||||||
ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, off_t));
|
ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off_t));
|
||||||
# endif
|
# endif
|
||||||
#else
|
#else
|
||||||
ZEXTERN gzFile ZEXPORT gzopen OF((const char *, const char *));
|
ZEXTERN gzFile ZEXPORT gzopen OF((const char *, const char *));
|
||||||
@@ -1589,10 +1595,12 @@ ZEXTERN int ZEXPORT inflateBackInit_ OF((z_streamp strm, int windowBits,
|
|||||||
ZEXTERN uLong ZEXPORT crc32_combine OF((uLong, uLong, z_off_t));
|
ZEXTERN uLong ZEXPORT crc32_combine OF((uLong, uLong, z_off_t));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* hack for buggy compilers */
|
||||||
#if !defined(ZUTIL_H) && !defined(NO_DUMMY_DECL)
|
#if !defined(ZUTIL_H) && !defined(NO_DUMMY_DECL)
|
||||||
struct internal_state {int dummy;}; /* hack for buggy compilers */
|
struct internal_state {int dummy;};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* undocumented functions */
|
||||||
ZEXTERN const char * ZEXPORT zError OF((int));
|
ZEXTERN const char * ZEXPORT zError OF((int));
|
||||||
ZEXTERN int ZEXPORT inflateSyncPoint OF((z_streamp));
|
ZEXTERN int ZEXPORT inflateSyncPoint OF((z_streamp));
|
||||||
ZEXTERN const uLongf * ZEXPORT get_crc_table OF((void));
|
ZEXTERN const uLongf * ZEXPORT get_crc_table OF((void));
|
||||||
|
|||||||
2
zutil.c
2
zutil.c
@@ -272,7 +272,7 @@ void zcfree (voidpf opaque, voidpf ptr)
|
|||||||
# define _hfree hfree
|
# define _hfree hfree
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
voidpf zcalloc (voidpf opaque, unsigned items, unsigned size)
|
voidpf zcalloc (voidpf opaque, uInt items, uInt size)
|
||||||
{
|
{
|
||||||
if (opaque) opaque = 0; /* to make compiler happy */
|
if (opaque) opaque = 0; /* to make compiler happy */
|
||||||
return _halloc((long)items, size);
|
return _halloc((long)items, size);
|
||||||
|
|||||||
27
zutil.h
27
zutil.h
@@ -24,19 +24,6 @@
|
|||||||
# include <stdlib.h>
|
# include <stdlib.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(UNDER_CE) && defined(NO_ERRNO_H)
|
|
||||||
# define zseterrno(ERR) SetLastError((DWORD)(ERR))
|
|
||||||
# define zerrno() ((int)GetLastError())
|
|
||||||
#else
|
|
||||||
# ifdef NO_ERRNO_H
|
|
||||||
extern int errno;
|
|
||||||
# else
|
|
||||||
# include <errno.h>
|
|
||||||
# endif
|
|
||||||
# define zseterrno(ERR) do { errno = (ERR); } while (0)
|
|
||||||
# define zerrno() errno
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef local
|
#ifndef local
|
||||||
# define local static
|
# define local static
|
||||||
#endif
|
#endif
|
||||||
@@ -167,10 +154,10 @@ extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
|
|||||||
#pragma warn -8066
|
#pragma warn -8066
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef _LARGEFILE64_SOURCE
|
/* provide prototypes for these when building zlib without LFS */
|
||||||
# define z_off64_t off64_t
|
#if !defined(_LARGEFILE64_SOURCE) || _LFS64_LARGEFILE-0 == 0
|
||||||
#else
|
ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off_t));
|
||||||
# define z_off64_t z_off_t
|
ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off_t));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* common defaults */
|
/* common defaults */
|
||||||
@@ -181,12 +168,6 @@ extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
|
|||||||
|
|
||||||
#ifndef F_OPEN
|
#ifndef F_OPEN
|
||||||
# define F_OPEN(name, mode) fopen((name), (mode))
|
# define F_OPEN(name, mode) fopen((name), (mode))
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef _LARGEFILE64_SOURCE
|
|
||||||
# define F_OPEN64(name, mode) fopen64((name), (mode))
|
|
||||||
#else
|
|
||||||
# define F_OPEN64(name, mode) fopen((name), (mode))
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* functions */
|
/* functions */
|
||||||
|
|||||||
Reference in New Issue
Block a user