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

	* png.c: Add port info.
	Use snprintf() from djgpp CVS tree.

	* png.h: Add port info.

	* pngread.c: Use snprintf() from djgpp CVS tree.

	* pngrtran.c: Use snprintf() from djgpp CVS tree.

	* pngrutil.c: Use snprintf() from djgpp CVS tree.

	* pngwrite.c: Use snprintf() from djgpp CVS tree.

	* pngwutil.c: Use snprintf() from djgpp CVS tree.




diff -aprNU3 libpng-1.2.22.orig/png.c libpng-1.2.22/png.c
--- libpng-1.2.22.orig/png.c	2007-10-13 17:07:22 +0000
+++ libpng-1.2.22/png.c	2007-10-24 23:59:56 +0000
@@ -11,6 +11,15 @@
 #define PNG_INTERNAL
 #define PNG_NO_EXTERN
 #include "png.h"
+#if __DJGPP__
+  /*
+   *  As long as djdev204 has not replaced
+   *  djdev203, this version of snprintf
+   *  from djgpp CVS will be used for both
+   *  djdev204 beta and djdev203.
+   */
+# include "djgpp/stdio.h"
+#endif
 
 /* Generate a compiler error if there is an old png.h in the search path. */
 typedef version_1_2_22 Your_png_h_is_not_version_1_2_22;
@@ -20,7 +29,7 @@ typedef version_1_2_22 Your_png_h_is_not
 
 #ifdef PNG_USE_GLOBAL_ARRAYS
 /* png_libpng_ver was changed to a function in version 1.0.5c */
-PNG_CONST char png_libpng_ver[18] = PNG_LIBPNG_VER_STRING;
+PNG_CONST char png_libpng_ver[37] = PNG_LIBPNG_VER_STRING;
 
 #ifdef PNG_READ_SUPPORTED
 
diff -aprNU3 libpng-1.2.22.orig/png.h libpng-1.2.22/png.h
--- libpng-1.2.22.orig/png.h	2007-10-13 17:07:22 +0000
+++ libpng-1.2.22/png.h	2007-10-25 00:00:22 +0000
@@ -372,9 +372,9 @@
  */
 
 /* Version information for png.h - this should match the version in png.c */
-#define PNG_LIBPNG_VER_STRING "1.2.22"
+#define PNG_LIBPNG_VER_STRING "1.2.22  (DJGPP port (r2))"
 #define PNG_HEADER_VERSION_STRING \
-   " libpng version 1.2.22 - October 13, 2007\n"
+   " libpng version 1.2.22 - October 13, 2007  (DJGPP port (r2))\n"
 
 #define PNG_LIBPNG_VER_SONUM   0
 #define PNG_LIBPNG_VER_DLLNUM  13
@@ -498,7 +498,7 @@ extern "C" {
  * the version above.
  */
 #ifdef PNG_USE_GLOBAL_ARRAYS
-PNG_EXPORT_VAR (PNG_CONST char) png_libpng_ver[18];
+PNG_EXPORT_VAR (PNG_CONST char) png_libpng_ver[37];
   /* need room for 99.99.99beta99z */
 #else
 #define png_libpng_ver png_get_header_ver(NULL)
diff -aprNU3 libpng-1.2.22.orig/pngread.c libpng-1.2.22/pngread.c
--- libpng-1.2.22.orig/pngread.c	2007-10-13 17:07:22 +0000
+++ libpng-1.2.22/pngread.c	2007-10-24 23:59:56 +0000
@@ -13,6 +13,15 @@
 
 #define PNG_INTERNAL
 #include "png.h"
+#if __DJGPP__
+  /*
+   *  As long as djdev204 has not replaced
+   *  djdev203, this version of snprintf
+   *  from djgpp CVS will be used for both
+   *  djdev204 beta and djdev203.
+   */
+# include "djgpp/stdio.h"
+#endif
 
 #if defined(PNG_READ_SUPPORTED)
 
diff -aprNU3 libpng-1.2.22.orig/pngrtran.c libpng-1.2.22/pngrtran.c
--- libpng-1.2.22.orig/pngrtran.c	2007-10-13 17:07:24 +0000
+++ libpng-1.2.22/pngrtran.c	2007-10-24 23:59:56 +0000
@@ -15,6 +15,15 @@
 
 #define PNG_INTERNAL
 #include "png.h"
+#if __DJGPP__
+  /*
+   *  As long as djdev204 has not replaced
+   *  djdev203, this version of snprintf
+   *  from djgpp CVS will be used for both
+   *  djdev204 beta and djdev203.
+   */
+# include "djgpp/stdio.h"
+#endif
 
 #if defined(PNG_READ_SUPPORTED)
 
diff -aprNU3 libpng-1.2.22.orig/pngrutil.c libpng-1.2.22/pngrutil.c
--- libpng-1.2.22.orig/pngrutil.c	2007-10-13 17:07:24 +0000
+++ libpng-1.2.22/pngrutil.c	2007-10-24 23:59:56 +0000
@@ -13,6 +13,15 @@
 
 #define PNG_INTERNAL
 #include "png.h"
+#if __DJGPP__
+  /*
+   *  As long as djdev204 has not replaced
+   *  djdev203, this version of snprintf
+   *  from djgpp CVS will be used for both
+   *  djdev204 beta and djdev203.
+   */
+# include "djgpp/stdio.h"
+#endif
 
 #if defined(PNG_READ_SUPPORTED)
 
diff -aprNU3 libpng-1.2.22.orig/pngwrite.c libpng-1.2.22/pngwrite.c
--- libpng-1.2.22.orig/pngwrite.c	2007-10-13 17:07:24 +0000
+++ libpng-1.2.22/pngwrite.c	2007-10-24 23:59:56 +0000
@@ -11,6 +11,16 @@
 /* get internal access to png.h */
 #define PNG_INTERNAL
 #include "png.h"
+#if __DJGPP__
+  /*
+   *  As long as djdev204 has not replaced
+   *  djdev203, this version of snprintf
+   *  from djgpp CVS will be used for both
+   *  djdev204 beta and djdev203.
+   */
+# include "djgpp/stdio.h"
+#endif
+
 #ifdef PNG_WRITE_SUPPORTED
 
 /* Writes all the PNG information.  This is the suggested way to use the
diff -aprNU3 libpng-1.2.22.orig/pngwutil.c libpng-1.2.22/pngwutil.c
--- libpng-1.2.22.orig/pngwutil.c	2007-10-13 17:07:24 +0000
+++ libpng-1.2.22/pngwutil.c	2007-10-24 23:59:56 +0000
@@ -10,6 +10,16 @@
 
 #define PNG_INTERNAL
 #include "png.h"
+#if __DJGPP__
+  /*
+   *  As long as djdev204 has not replaced
+   *  djdev203, this version of snprintf
+   *  from djgpp CVS will be used for both
+   *  djdev204 beta and djdev203.
+   */
+# include "djgpp/stdio.h"
+#endif
+
 #ifdef PNG_WRITE_SUPPORTED
 
 /* Place a 32-bit number into a buffer in PNG byte order.  We work
