2008-04-13 Juan Manuel Guerrero  <juan.guerrero@gmx.de>

	* png.c: Add port info.
	Use snprintf() from libsupp to support djdev203 builds.

	* png.h: Add port info.

	* pngread.c: Use snprintf() from libsupp to support djdev203 builds.

	* pngrtran.c:  Use snprintf() from libsupp to support djdev203 builds.

	* pngrutil.c: Use snprintf() from libsupp to support djdev203 builds.

	* pngwrite.c: Use snprintf() from libsupp to support djdev203 builds.

	* pngwutil.c: Use snprintf() from libsupp to support djdev203 builds.




diff -aprNU5 libpng-1.2.26.orig/png.c libpng-1.2.26/png.c
--- libpng-1.2.26.orig/png.c	2008-04-02 17:27:26 +0000
+++ libpng-1.2.26/png.c	2008-04-13 22:56:52 +0000
@@ -9,20 +9,31 @@
  */
 
 #define PNG_INTERNAL
 #define PNG_NO_EXTERN
 #include "png.h"
+#ifdef __DJGPP__
+#if 0
+  /*
+   *  As long as djdev203 is still supported
+   *  snprintf() must be supplied by libsupp.a.
+   */
+# include <libsupp.h>
+#else
+# include "djgpp/snprintf.h"
+#endif
+#endif
 
 /* Generate a compiler error if there is an old png.h in the search path. */
 typedef version_1_2_26 Your_png_h_is_not_version_1_2_26;
 
 /* Version information for C files.  This had better match the version
  * string defined in png.h.  */
 
 #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[38] = PNG_LIBPNG_VER_STRING;
 
 #ifdef PNG_READ_SUPPORTED
 
 /* png_sig was changed to a function in version 1.0.5c */
 /* Place to hold the signature string for a PNG file. */
diff -aprNU5 libpng-1.2.26.orig/png.h libpng-1.2.26/png.h
--- libpng-1.2.26.orig/png.h	2008-04-02 17:27:26 +0000
+++ libpng-1.2.26/png.h	2008-04-13 22:56:52 +0000
@@ -382,13 +382,13 @@
  * with some code on which to build.  This file is useful for looking
  * at the actual function definitions and structure components.
  */
 
 /* Version information for png.h - this should match the version in png.c */
-#define PNG_LIBPNG_VER_STRING "1.2.26"
+#define PNG_LIBPNG_VER_STRING "1.2.26  (DJGPP port (r1))"
 #define PNG_HEADER_VERSION_STRING \
-   " libpng version 1.2.26 - April 2, 2008\n"
+   " libpng version 1.2.26 - April 2, 2008  (DJGPP port (r1))\n"
 
 #define PNG_LIBPNG_VER_SONUM   0
 #define PNG_LIBPNG_VER_DLLNUM  13
 
 /* These should match the first 3 components of PNG_LIBPNG_VER_STRING: */
@@ -508,11 +508,11 @@ extern "C" {
 #if !defined(PNG_NO_EXTERN) || defined(PNG_ALWAYS_EXTERN)
 /* Version information for C files, stored in png.c.  This had better match
  * 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[38];
   /* need room for 99.99.99beta99z */
 #else
 #define png_libpng_ver png_get_header_ver(NULL)
 #endif
 
diff -aprNU5 libpng-1.2.26.orig/pngread.c libpng-1.2.26/pngread.c
--- libpng-1.2.26.orig/pngread.c	2008-04-02 17:27:26 +0000
+++ libpng-1.2.26/pngread.c	2008-04-13 22:57:58 +0000
@@ -11,10 +11,21 @@
  * read a PNG file or stream.
  */
 
 #define PNG_INTERNAL
 #include "png.h"
+#ifdef __DJGPP__
+#if 0
+  /*
+   *  As long as djdev203 is still supported
+   *  snprintf() must be supplied by libsupp.a.
+   */
+# include <libsupp.h>
+#else
+# include "djgpp/snprintf.h"
+#endif
+#endif
 
 #if defined(PNG_READ_SUPPORTED)
 
 /* Create a PNG structure for reading, and allocate any memory needed. */
 png_structp PNGAPI
diff -aprNU5 libpng-1.2.26.orig/pngrtran.c libpng-1.2.26/pngrtran.c
--- libpng-1.2.26.orig/pngrtran.c	2008-04-02 17:27:28 +0000
+++ libpng-1.2.26/pngrtran.c	2008-04-13 22:56:52 +0000
@@ -13,10 +13,21 @@
  * in pngtrans.c.
  */
 
 #define PNG_INTERNAL
 #include "png.h"
+#ifdef __DJGPP__
+#if 0
+  /*
+   *  As long as djdev203 is still supported
+   *  snprintf() must be supplied by libsupp.a.
+   */
+# include <libsupp.h>
+#else
+# include "djgpp/snprintf.h"
+#endif
+#endif
 
 #if defined(PNG_READ_SUPPORTED)
 
 /* Set the action on getting a CRC error for an ancillary or critical chunk. */
 void PNGAPI
diff -aprNU5 libpng-1.2.26.orig/pngrutil.c libpng-1.2.26/pngrutil.c
--- libpng-1.2.26.orig/pngrutil.c	2008-04-02 17:27:28 +0000
+++ libpng-1.2.26/pngrutil.c	2008-04-13 22:56:52 +0000
@@ -11,10 +11,21 @@
  * libpng itself during the course of reading an image.
  */
 
 #define PNG_INTERNAL
 #include "png.h"
+#ifdef __DJGPP__
+#if 0
+  /*
+   *  As long as djdev203 is still supported
+   *  snprintf() must be supplied by libsupp.a.
+   */
+# include <libsupp.h>
+#else
+# include "djgpp/snprintf.h"
+#endif
+#endif
 
 #if defined(PNG_READ_SUPPORTED)
 
 #if defined(_WIN32_WCE) && (_WIN32_WCE<0x500)
 #  define WIN32_WCE_OLD
diff -aprNU5 libpng-1.2.26.orig/pngwrite.c libpng-1.2.26/pngwrite.c
--- libpng-1.2.26.orig/pngwrite.c	2008-04-02 17:27:28 +0000
+++ libpng-1.2.26/pngwrite.c	2008-04-13 22:56:52 +0000
@@ -9,10 +9,21 @@
  */
 
 /* get internal access to png.h */
 #define PNG_INTERNAL
 #include "png.h"
+#ifdef __DJGPP__
+#if 0
+  /*
+   *  As long as djdev203 is still supported
+   *  snprintf() must be supplied by libsupp.a.
+   */
+# include <libsupp.h>
+#else
+# include "djgpp/snprintf.h"
+#endif
+#endif
 #ifdef PNG_WRITE_SUPPORTED
 
 /* Writes all the PNG information.  This is the suggested way to use the
  * library.  If you have a new chunk to add, make a function to write it,
  * and put it in the correct location here.  If you want the chunk written
diff -aprNU5 libpng-1.2.26.orig/pngwutil.c libpng-1.2.26/pngwutil.c
--- libpng-1.2.26.orig/pngwutil.c	2008-04-02 17:27:28 +0000
+++ libpng-1.2.26/pngwutil.c	2008-04-13 22:56:52 +0000
@@ -8,10 +8,21 @@
  * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
  */
 
 #define PNG_INTERNAL
 #include "png.h"
+#ifdef __DJGPP__
+#if 0
+  /*
+   *  As long as djdev203 is still supported
+   *  snprintf() must be supplied by libsupp.a.
+   */
+# include <libsupp.h>
+#else
+# include "djgpp/snprintf.h"
+#endif
+#endif
 #ifdef PNG_WRITE_SUPPORTED
 
 /* Place a 32-bit number into a buffer in PNG byte order.  We work
  * with unsigned numbers for convenience, although one supported
  * ancillary chunk uses signed (two's complement) numbers.
