zlib 1.2.4
diff --git a/ChangeLog b/ChangeLog
index 1dea1d0..6d046ee 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,7 +1,7 @@
 
                 ChangeLog file for zlib
 
-Changes in 1.2.4 (13 Mar 2010)
+Changes in 1.2.4 (14 Mar 2010)
 - Fix VER3 extraction in configure for no fourth subversion
 - Update zlib.3, add docs to Makefile.in to make .pdf out of it
 - Add zlib.3.pdf to distribution
@@ -30,6 +30,8 @@
 - Fix name change from inflate.h in contrib/inflate86/inffas86.c
 - Check if temporary file exists before removing in make_vms.com [Zinser]
 - Fix make install and uninstall for --static option
+- Fix usage of _MSC_VER in gzguts.h and zutil.h [Truta]
+- Update readme.txt in contrib/masmx64 and masmx86 to assemble
 
 Changes in 1.2.3.9 (21 Feb 2010)
 - Expunge gzio.c
diff --git a/FAQ b/FAQ
index 5603207..1a22750 100644
--- a/FAQ
+++ b/FAQ
@@ -25,7 +25,7 @@
 
  4. compress() returns Z_BUF_ERROR.
 
-    Make sure that before the call of compress, the length of the compressed
+    Make sure that before the call of compress(), the length of the compressed
     buffer is equal to the available size of the compressed buffer and not
     zero.  For Visual Basic, check that this parameter is passed by reference
     ("as any"), not by value ("as long").
@@ -108,8 +108,8 @@
 
 16. Can zlib decode Flate data in an Adobe PDF file?
 
-    Yes. See http://www.fastio.com/ (ClibPDF), or http://www.pdflib.com/ .
-    To modify PDF forms, see http://sourceforge.net/projects/acroformtool/ .
+    Yes. See http://www.pdflib.com/ . To modify PDF forms, see
+    http://sourceforge.net/projects/acroformtool/ .
 
 17. Why am I getting this "register_frame_info not found" error on Solaris?
 
@@ -152,8 +152,8 @@
     Yes.  However any library routines that zlib uses and any application-
     provided memory allocation routines must also be thread-safe.  zlib's gz*
     functions use stdio library routines, and most of zlib's functions use the
-    library memory allocation routines by default.  zlib's Init functions allow
-    for the application to provide custom memory allocation routines.
+    library memory allocation routines by default.  zlib's *Init* functions
+    allow for the application to provide custom memory allocation routines.
 
     Of course, you should only operate on any given zlib or gzip stream from a
     single thread at a time.
@@ -354,7 +354,7 @@
 
     No.  The files in contrib are not part of zlib.  They were contributed by
     other authors and are provided as a convenience to the user within the zlib
-    distribution.  Each of the items in contrib have their own license.
+    distribution.  Each item in contrib has its own license.
 
 43. Is zlib subject to export controls?  What is its ECCN?
 
diff --git a/contrib/infback9/inftree9.c b/contrib/infback9/inftree9.c
index 4e04db9..510bba6 100644
--- a/contrib/infback9/inftree9.c
+++ b/contrib/infback9/inftree9.c
@@ -64,7 +64,7 @@
     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, 198, 71};
+        133, 133, 133, 133, 144, 64, 195};
     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,
diff --git a/contrib/masmx64/readme.txt b/contrib/masmx64/readme.txt
index cd697c4..1115d9b 100644
--- a/contrib/masmx64/readme.txt
+++ b/contrib/masmx64/readme.txt
@@ -12,7 +12,10 @@
 

 Use instructions

 ----------------

-Copy these files into the zlib source directory.

+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.

diff --git a/contrib/masmx86/readme.txt b/contrib/masmx86/readme.txt
index 413580e..90230f2 100644
--- a/contrib/masmx86/readme.txt
+++ b/contrib/masmx86/readme.txt
@@ -7,9 +7,15 @@
 
 Use instructions
 ----------------
-Copy these files into the zlib source directory, then run the
-appropriate makefile, as suggested below.
+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
 ------------------
diff --git a/contrib/vstudio/vc10/zlibvc.def b/contrib/vstudio/vc10/zlibvc.def
index b3b7cab..0269ef7 100644
--- a/contrib/vstudio/vc10/zlibvc.def
+++ b/contrib/vstudio/vc10/zlibvc.def
@@ -115,9 +115,7 @@
 

 ; zlib1 v1.2.4 added:

         adler32_combine                         @140

-        adler32_combine64                       @141

         crc32_combine                           @142

-        crc32_combine64                         @143

         deflateSetHeader                        @144

         deflateTune                             @145

         gzbuffer                                @146

@@ -125,10 +123,6 @@
         gzclose_w                               @148

         gzdirect                                @149

         gzoffset                                @150

-        gzoffset64                              @151

-        gzopen64                                @152

-        gzseek64                                @153

-        gztell64                                @154

         inflateGetHeader                        @156

         inflateMark                             @157

         inflatePrime                            @158

diff --git a/contrib/vstudio/vc9/zlibvc.def b/contrib/vstudio/vc9/zlibvc.def
index b3b7cab..0269ef7 100644
--- a/contrib/vstudio/vc9/zlibvc.def
+++ b/contrib/vstudio/vc9/zlibvc.def
@@ -115,9 +115,7 @@
 

 ; zlib1 v1.2.4 added:

         adler32_combine                         @140

-        adler32_combine64                       @141

         crc32_combine                           @142

-        crc32_combine64                         @143

         deflateSetHeader                        @144

         deflateTune                             @145

         gzbuffer                                @146

@@ -125,10 +123,6 @@
         gzclose_w                               @148

         gzdirect                                @149

         gzoffset                                @150

-        gzoffset64                              @151

-        gzopen64                                @152

-        gzseek64                                @153

-        gztell64                                @154

         inflateGetHeader                        @156

         inflateMark                             @157

         inflatePrime                            @158

diff --git a/gzguts.h b/gzguts.h
index 84a9797..0e7ed43 100644
--- a/gzguts.h
+++ b/gzguts.h
@@ -27,7 +27,7 @@
 #  define NO_GZCOMPRESS
 #endif
 
-#ifdef WIN32
+#ifdef _MSC_VER
 #  include <io.h>
 #  define vsnprintf _vsnprintf
 #endif
diff --git a/inftrees.c b/inftrees.c
index 5bfc691..ccf7fa9 100644
--- a/inftrees.c
+++ b/inftrees.c
@@ -62,7 +62,7 @@
         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, 198, 71};
+        19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 64, 195};
     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,
diff --git a/win32/Makefile.gcc.old b/win32/Makefile.gcc.old
deleted file mode 100644
index f670be4..0000000
--- a/win32/Makefile.gcc.old
+++ /dev/null
@@ -1,140 +0,0 @@
-# Makefile for zlib, derived from Makefile.dj2.
-# Modified for mingw32 by C. Spieler, 6/16/98.
-# Updated for zlib 1.2.x by Christian Spieler and Cosmin Truta, Mar-2003.
-# Last updated: 1-Aug-2003.
-# Tested under Cygwin and MinGW.
-
-# Copyright (C) 1995-2003 Jean-loup Gailly.
-# For conditions of distribution and use, see copyright notice in zlib.h
-
-# To compile, or to compile and test, type:
-#
-#   make -fmakefile.gcc;  make test testdll -fmakefile.gcc
-#
-# To use the asm code, type:
-#   cp contrib/asm?86/match.S ./match.S
-#   make LOC=-DASMV OBJA=match.o -fmakefile.gcc
-#
-# To install libz.a, zconf.h and zlib.h in the system directories, type:
-#
-#   make install -fmakefile.gcc
-
-# Note:
-# If the platform is *not* MinGW (e.g. it is Cygwin or UWIN),
-# the DLL name should be changed from "zlib1.dll".
-
-STATICLIB = libz.a
-SHAREDLIB = zlib1.dll
-IMPLIB    = libzdll.a
-
-#LOC = -DASMV
-#LOC = -DDEBUG -g
-
-CC = gcc
-CFLAGS = $(LOC) -O3 -Wall
-
-AS = $(CC)
-ASFLAGS = $(LOC) -Wall
-
-LD = $(CC)
-LDFLAGS = $(LOC) -s
-
-AR = ar
-ARFLAGS = rcs
-
-RC = windres
-RCFLAGS = --define GCC_WINDRES
-
-CP = cp -fp
-# If GNU install is available, replace $(CP) with install.
-INSTALL = $(CP)
-RM = rm -f
-
-prefix = /usr/local
-exec_prefix = $(prefix)
-
-OBJS = adler32.o compress.o crc32.o deflate.o infback.o \
-       inffast.o inflate.o inftrees.o trees.o uncompr.o zutil.o
-OBJA =
-
-all: $(STATICLIB) $(SHAREDLIB) $(IMPLIB) example minigzip example_d minigzip_d
-
-test: example minigzip
-	./example
-	echo hello world | ./minigzip | ./minigzip -d
-
-testdll: example_d minigzip_d
-	./example_d
-	echo hello world | ./minigzip_d | ./minigzip_d -d
-
-.c.o:
-	$(CC) $(CFLAGS) -c -o $@ $<
-
-.S.o:
-	$(AS) $(ASFLAGS) -c -o $@ $<
-
-$(STATICLIB): $(OBJS) $(OBJA)
-	$(AR) $(ARFLAGS) $@ $(OBJS) $(OBJA)
-
-$(IMPLIB): $(SHAREDLIB)
-
-$(SHAREDLIB): win32/zlib.def $(OBJS) $(OBJA) zlibrc.o
-	dllwrap --driver-name $(CC) --def win32/zlib.def \
-	  --implib $(IMPLIB) -o $@ $(OBJS) $(OBJA) zlibrc.o
-	strip $@
-
-example: example.o $(STATICLIB)
-	$(LD) $(LDFLAGS) -o $@ example.o $(STATICLIB)
-
-minigzip: minigzip.o $(STATICLIB)
-	$(LD) $(LDFLAGS) -o $@ minigzip.o $(STATICLIB)
-
-example_d: example.o $(IMPLIB)
-	$(LD) $(LDFLAGS) -o $@ example.o $(IMPLIB)
-
-minigzip_d: minigzip.o $(IMPLIB)
-	$(LD) $(LDFLAGS) -o $@ minigzip.o $(IMPLIB)
-
-zlibrc.o: win32/zlib1.rc
-	$(RC) $(RCFLAGS) -o $@ win32/zlib1.rc
-
-
-# INCLUDE_PATH and LIBRARY_PATH must be set.
-
-.PHONY: install uninstall clean
-
-install: zlib.h zconf.h $(LIB)
-	-@if not exist $(INCLUDE_PATH)/nul mkdir $(INCLUDE_PATH)
-	-@if not exist $(LIBRARY_PATH)/nul mkdir $(LIBRARY_PATH)
-	-$(INSTALL) zlib.h $(INCLUDE_PATH)
-	-$(INSTALL) zconf.h $(INCLUDE_PATH)
-	-$(INSTALL) $(STATICLIB) $(LIBRARY_PATH)
-	-$(INSTALL) $(IMPLIB) $(LIBRARY_PATH)
-
-uninstall:
-	-$(RM) $(INCLUDE_PATH)/zlib.h
-	-$(RM) $(INCLUDE_PATH)/zconf.h
-	-$(RM) $(LIBRARY_PATH)/$(STATICLIB)
-	-$(RM) $(LIBRARY_PATH)/$(IMPLIB)
-
-clean:
-	-$(RM) $(STATICLIB)
-	-$(RM) $(SHAREDLIB)
-	-$(RM) $(IMPLIB)
-	-$(RM) *.o
-	-$(RM) *.exe
-	-$(RM) foo.gz
-
-adler32.o: zlib.h zconf.h
-compress.o: zlib.h zconf.h
-crc32.o: crc32.h zlib.h zconf.h
-deflate.o: deflate.h zutil.h zlib.h zconf.h
-example.o: zlib.h zconf.h
-inffast.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h
-inflate.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h
-infback.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h
-inftrees.o: zutil.h zlib.h zconf.h inftrees.h
-minigzip.o: zlib.h zconf.h
-trees.o: deflate.h zutil.h zlib.h zconf.h trees.h
-uncompr.o: zlib.h zconf.h
-zutil.o: zutil.h zlib.h zconf.h
diff --git a/zlib.3 b/zlib.3
index c01df46..52999c7 100644
--- a/zlib.3
+++ b/zlib.3
@@ -1,4 +1,4 @@
-.TH ZLIB 3 "13 March 2010"
+.TH ZLIB 3 "14 March 2010"
 .SH NAME
 zlib \- compression/decompression library
 .SH SYNOPSIS
diff --git a/zlib.3.pdf b/zlib.3.pdf
index 1412154..05ed2d0 100644
--- a/zlib.3.pdf
+++ b/zlib.3.pdf
Binary files differ
diff --git a/zlib.h b/zlib.h
index 1ad1ac3..f5785be 100644
--- a/zlib.h
+++ b/zlib.h
@@ -1,5 +1,5 @@
 /* zlib.h -- interface of the 'zlib' general purpose compression library
-  version 1.2.4, Mar 13th, 2010
+  version 1.2.4, Mar 14th, 2010
 
   Copyright (C) 1995-2010 Jean-loup Gailly and Mark Adler
 
diff --git a/zutil.h b/zutil.h
index 93d6553..025035d 100644
--- a/zutil.h
+++ b/zutil.h
@@ -17,7 +17,7 @@
 #include "zlib.h"
 
 #ifdef STDC
-#  if !(defined(_WIN32_WCE) && defined(_MSV_VER))
+#  if !(defined(_WIN32_WCE) && defined(_MSC_VER))
 #    include <stddef.h>
 #  endif
 #  include <string.h>