2010-10-10  Juan Manuel Guerrero  <juan.guerrero@gmx.de>

	* gzwrite.c [__DJGPP__]: Include header with [v]snprintf prototypes.

	* zutil.h [HAVE_VSNPRINTF]:  The DJGPP provides [v]snprintf so do not
	define NO_vsnprintf.






diff -aprNU5 zlib-1.2.5.orig/gzwrite.c zlib-1.2.5/gzwrite.c
--- zlib-1.2.5.orig/gzwrite.c	2010-03-13 02:27:24 +0000
+++ zlib-1.2.5/gzwrite.c	2010-10-10 01:26:08 +0000
@@ -2,10 +2,13 @@
  * Copyright (C) 2004, 2005, 2010 Mark Adler
  * For conditions of distribution and use, see copyright notice in zlib.h
  */
 
 #include "gzguts.h"
+#ifdef __DJGPP__
+# include "djgpp/snprintf.h"
+#endif
 
 /* Local functions */
 local int gz_init OF((gz_statep));
 local int gz_comp OF((gz_statep, int));
 local int gz_zero OF((gz_statep, z_off64_t));
diff -aprNU5 zlib-1.2.5.orig/zutil.h zlib-1.2.5/zutil.h
--- zlib-1.2.5.orig/zutil.h	2010-04-18 19:29:24 +0000
+++ zlib-1.2.5/zutil.h	2010-10-10 01:26:10 +0000
@@ -186,15 +186,18 @@ extern const char * const z_errmsg[10];
 #  ifndef HAVE_VSNPRINTF
 #    define HAVE_VSNPRINTF
 #  endif
 #endif
 #ifndef HAVE_VSNPRINTF
-#  ifdef MSDOS
+#  if defined(MSDOS) && !defined(__DJGPP__)
      /* vsnprintf may exist on some MS-DOS compilers (DJGPP?),
         but for now we just assume it doesn't. */
 #    define NO_vsnprintf
 #  endif
+#  ifdef __DJGPP__
+#    define HAVE_VSNPRINTF
+#  endif
 #  ifdef __TURBOC__
 #    define NO_vsnprintf
 #  endif
 #  ifdef WIN32
      /* In Win32, vsnprintf is available as the "non-ANSI" _vsnprintf. */
