[master] Imported from libpng-1.2.41beta15.tar
diff --git a/ANNOUNCE b/ANNOUNCE
index 3a525f9..b03fdaa 100644
--- a/ANNOUNCE
+++ b/ANNOUNCE
@@ -117,6 +117,7 @@
   Added PNG_CONVERT_tIME_SUPPORTED macro.
 
 version 1.2.41beta14 [November 8, 2009]
+  versions 1.2.41beta05 through 1.2.41beta13 were abandoned.
   Make inclusion of time.h in pngconf.h depend on PNG_CONVERT_tIME_SUPPORTED
   Make #define PNG_CONVERT_tIME_SUPPORTED depend on PNG_WRITE_tIME_SUPPORTED
   Reverted iTXt compatibility stuff from 1.2.41beta05, 1.2.41beta11, and
@@ -127,6 +128,18 @@
     and removed reference to png_calloc from scripts/*.def
 
 version 1.2.41beta15 [November 9, 2009]
+  Added PNG_DEPSTRUCT, PNG_DEPRECATED, PNG_USE_RESULT, PNG_NORETURN, and
+    PNG_ALLOCATED macros to detect deprecated direct access to the
+    png_struct or info_struct members and other deprecated usage in
+    applications (John Bowler).
+  Updated scripts/makefile* to add "-DPNG_CONFIGURE_LIBPNG" to CFLAGS,
+    to prevent warnings about direct access to png structs by libpng
+    functions while building libpng.  They need to be tested, especially
+    those using compilers other than gcc.
+  Updated projects/visualc6 and visualc71 with "/d PNG_CONFIGURE_LIBPNG".
+  Removed three direct references to read_info_ptr members in pngtest.c
+    that were detected by the new PNG_DEPSTRUCT macro.
+
 
 Send comments/corrections/commendations to png-mng-implement at lists.sf.net
 
diff --git a/CHANGES b/CHANGES
index f55e84a..3cbe3ca 100644
--- a/CHANGES
+++ b/CHANGES
@@ -2547,6 +2547,8 @@
   Added PNG_CONVERT_tIME_SUPPORTED macro.
 
 version 1.2.41beta14 [November 8, 2009]
+  versions 1.2.41beta05 through 1.2.41beta13 were abandoned.
+  The 1.0.x/1.2.x series will only receive security updates from now on.
   Make inclusion of time.h in pngconf.h depend on PNG_CONVERT_tIME_SUPPORTED
   Make #define PNG_CONVERT_tIME_SUPPORTED depend on PNG_WRITE_tIME_SUPPORTED
   Reverted iTXt compatibility stuff from 1.2.41beta05, 1.2.41beta11, and
@@ -2577,8 +2579,6 @@
 
 Glenn R-P
 */
-versions 1.2.41beta01 through 1.2.41beta13 were abandoned [November 5, 2009].
-  The 1.0.x/1.2.x series will only receive security updates from now on.
 
 Send comments/corrections/commendations to png-mng-implement at lists.sf.net
 (subscription required; visit
diff --git a/INSTALL b/INSTALL
index 0ca21b5..799df5c 100644
--- a/INSTALL
+++ b/INSTALL
@@ -1,5 +1,5 @@
 
-Installing libpng version 1.2.41beta15 - November 8, 2009
+Installing libpng version 1.2.41beta15 - November 9, 2009
 
 On Unix/Linux and similar systems, you can simply type
 
diff --git a/LICENSE b/LICENSE
index f2d596f..5e982d0 100644
--- a/LICENSE
+++ b/LICENSE
@@ -10,7 +10,7 @@
 
 This code is released under the libpng license.
 
-libpng versions 1.2.6, August 15, 2004, through 1.2.41beta15, November 8, 2009, are
+libpng versions 1.2.6, August 15, 2004, through 1.2.41beta15, November 9, 2009, are
 Copyright (c) 2004, 2006-2009 Glenn Randers-Pehrson, and are
 distributed according to the same disclaimer and license as libpng-1.2.5
 with the following individual added to the list of Contributing Authors
@@ -108,4 +108,4 @@
 
 Glenn Randers-Pehrson
 glennrp at users.sourceforge.net
-November 8, 2009
+November 9, 2009
diff --git a/README b/README
index 437aa18..e85ed67 100644
--- a/README
+++ b/README
@@ -1,4 +1,4 @@
-README for libpng version 1.2.41beta15 - November 8, 2009 (shared library 12.0)
+README for libpng version 1.2.41beta15 - November 9, 2009 (shared library 12.0)
 See the note about version numbers near the top of png.h
 
 See INSTALL for instructions on how to install libpng.
diff --git a/Y2KINFO b/Y2KINFO
index 4ab0416..46efcb3 100644
--- a/Y2KINFO
+++ b/Y2KINFO
@@ -1,7 +1,7 @@
    Y2K compliance in libpng:
    =========================
 
-      November 8, 2009
+      November 9, 2009
 
       Since the PNG Development group is an ad-hoc body, we can't make
       an official declaration.
diff --git a/libpng-1.2.41beta15.txt b/libpng-1.2.41beta15.txt
index 97fa0fe..b3e8358 100644
--- a/libpng-1.2.41beta15.txt
+++ b/libpng-1.2.41beta15.txt
@@ -1,6 +1,6 @@
 libpng.txt - A description on how to use and modify libpng
 
- libpng version 1.2.41beta15 - November 8, 2009
+ libpng version 1.2.41beta15 - November 9, 2009
  Updated and distributed by Glenn Randers-Pehrson
  <glennrp at users.sourceforge.net>
  Copyright (c) 1998-2009 Glenn Randers-Pehrson
@@ -11,7 +11,7 @@
 
  Based on:
 
- libpng versions 0.97, January 1998, through 1.2.41beta15 - November 8, 2009
+ libpng versions 0.97, January 1998, through 1.2.41beta15 - November 9, 2009
  Updated and distributed by Glenn Randers-Pehrson
  Copyright (c) 1998-2009 Glenn Randers-Pehrson
 
@@ -3039,38 +3039,6 @@
 which also expands tRNS to alpha was replaced with
     png_set_expand_gray_1_2_4_to_8()
 which does not. It has been deprecated since libpng-1.0.18 and 1.2.9.
-
-Functions png_set_benign_errors(), png_benign_error(), and
-png_chunk_benign_error() were added.
-
-Support for setting the maximum amount of memory that the application
-will allocate for reading chunks was added, as a security measure.
-The functions png_set_chunk_cache_max() and png_get_chunk_cache_max()
-were added to the library.
-
-We implemented support for I/O states. Added png_ptr member io_state, and
-functions png_get_io_chunk_name() and png_get_io_state() in pngget.c
-
-The png_calloc() function was added and is used in place of
-of "png_malloc(); png_memset();" except in the case in png_read_png()
-where the array consists of pointers; in this case a "for" loop is used
-after the png_malloc() to set the pointers to NULL.
-
-We added PNG_TRANSFORM_GRAY_TO_RGB to the available high-level
-input transforms.
-
-We added the png_set_premultiply_alpha and
-png_do_read_premultiply_alpha() functions.
-
-The call to png_do_chop() in pngrtran.c, which reduces 16-bit input
-files to 8-bit bit depth, was relocated ahead of the building
-of gamma tables.  This allows us to build 8-bit tables instead
-of 16-bit tables, when only 8-bit tables are needed. This avoids 
-wasting some computing resources when the application has called
-the png_set_strip_16() function and encounters a 16-bit PNG file.
-
-Checking for and reporting of errors in the IHDR chunk is more thorough.
-
 IX.  (Omitted)
 X. Detecting libpng
 
@@ -3209,7 +3177,7 @@
 
 XIII. Y2K Compliance in libpng
 
-November 8, 2009
+November 9, 2009
 
 Since the PNG Development group is an ad-hoc body, we can't make
 an official declaration.
diff --git a/libpng.3 b/libpng.3
index fd77a40..4cb8ac7 100644
--- a/libpng.3
+++ b/libpng.3
@@ -1,4 +1,4 @@
-.TH LIBPNG 3 "November 8, 2009"
+.TH LIBPNG 3 "November 9, 2009"
 .SH NAME
 libpng \- Portable Network Graphics (PNG) Reference Library 1.2.41beta15
 .SH SYNOPSIS
@@ -821,7 +821,7 @@
 .SH LIBPNG.TXT
 libpng.txt - A description on how to use and modify libpng
 
- libpng version 1.2.41beta15 - November 8, 2009
+ libpng version 1.2.41beta15 - November 9, 2009
  Updated and distributed by Glenn Randers-Pehrson
  <glennrp at users.sourceforge.net>
  Copyright (c) 1998-2009 Glenn Randers-Pehrson
@@ -832,7 +832,7 @@
 
  Based on:
 
- libpng versions 0.97, January 1998, through 1.2.41beta15 - November 8, 2009
+ libpng versions 0.97, January 1998, through 1.2.41beta15 - November 9, 2009
  Updated and distributed by Glenn Randers-Pehrson
  Copyright (c) 1998-2009 Glenn Randers-Pehrson
 
@@ -3860,38 +3860,6 @@
 which also expands tRNS to alpha was replaced with
     png_set_expand_gray_1_2_4_to_8()
 which does not. It has been deprecated since libpng-1.0.18 and 1.2.9.
-
-Functions png_set_benign_errors(), png_benign_error(), and
-png_chunk_benign_error() were added.
-
-Support for setting the maximum amount of memory that the application
-will allocate for reading chunks was added, as a security measure.
-The functions png_set_chunk_cache_max() and png_get_chunk_cache_max()
-were added to the library.
-
-We implemented support for I/O states. Added png_ptr member io_state, and
-functions png_get_io_chunk_name() and png_get_io_state() in pngget.c
-
-The png_calloc() function was added and is used in place of
-of "png_malloc(); png_memset();" except in the case in png_read_png()
-where the array consists of pointers; in this case a "for" loop is used
-after the png_malloc() to set the pointers to NULL.
-
-We added PNG_TRANSFORM_GRAY_TO_RGB to the available high-level
-input transforms.
-
-We added the png_set_premultiply_alpha and
-png_do_read_premultiply_alpha() functions.
-
-The call to png_do_chop() in pngrtran.c, which reduces 16-bit input
-files to 8-bit bit depth, was relocated ahead of the building
-of gamma tables.  This allows us to build 8-bit tables instead
-of 16-bit tables, when only 8-bit tables are needed. This avoids 
-wasting some computing resources when the application has called
-the png_set_strip_16() function and encounters a 16-bit PNG file.
-
-Checking for and reporting of errors in the IHDR chunk is more thorough.
-
 .SH IX.  (Omitted)
 .SH X. Detecting libpng
 
@@ -4030,7 +3998,7 @@
 
 .SH XIII. Y2K Compliance in libpng
 
-November 8, 2009
+November 9, 2009
 
 Since the PNG Development group is an ad-hoc body, we can't make
 an official declaration.
@@ -4376,7 +4344,7 @@
 
 Thanks to Frank J. T. Wojcik for helping with the documentation.
 
-Libpng version 1.2.41beta15 - November 8, 2009:
+Libpng version 1.2.41beta15 - November 9, 2009:
 Initially created in 1995 by Guy Eric Schalnat, then of Group 42, Inc.
 Currently maintained by Glenn Randers-Pehrson (glennrp at users.sourceforge.net).
 
@@ -4399,7 +4367,7 @@
 
 This code is released under the libpng license.
 
-libpng versions 1.2.6, August 15, 2004, through 1.2.41beta15, November 8, 2009, are
+libpng versions 1.2.6, August 15, 2004, through 1.2.41beta15, November 9, 2009, are
 Copyright (c) 2004,2006-2008 Glenn Randers-Pehrson, and are
 distributed according to the same disclaimer and license as libpng-1.2.5
 with the following individual added to the list of Contributing Authors
@@ -4498,7 +4466,7 @@
 
 Glenn Randers-Pehrson
 glennrp at users.sourceforge.net
-November 8, 2009
+November 9, 2009
 
 .\" end of man page
 
diff --git a/libpngpf.3 b/libpngpf.3
index a7c510a..5ba9c12 100644
--- a/libpngpf.3
+++ b/libpngpf.3
@@ -1,4 +1,4 @@
-.TH LIBPNGPF 3 "November 8, 2009"
+.TH LIBPNGPF 3 "November 9, 2009"
 .SH NAME
 libpng \- Portable Network Graphics (PNG) Reference Library 1.2.41beta15
 (private functions)
diff --git a/png.5 b/png.5
index 7cbe5bd..d0a10ba 100644
--- a/png.5
+++ b/png.5
@@ -1,4 +1,4 @@
-.TH PNG 5 "November 8, 2009"
+.TH PNG 5 "November 9, 2009"
 .SH NAME
 png \- Portable Network Graphics (PNG) format
 .SH DESCRIPTION
diff --git a/png.c b/png.c
index 1c2f968..4cee48a 100644
--- a/png.c
+++ b/png.c
@@ -1,7 +1,7 @@
 
 /* png.c - location for general purpose libpng functions
  *
- * Last changed in libpng 1.2.41 [November 8, 2009]
+ * Last changed in libpng 1.2.41 [November 9, 2009]
  * Copyright (c) 1998-2009 Glenn Randers-Pehrson
  * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
  * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
@@ -722,13 +722,13 @@
 #else
 #ifdef __STDC__
    return ((png_charp) PNG_STRING_NEWLINE \
-     "libpng version 1.2.41beta15 - November 8, 2009" PNG_STRING_NEWLINE \
+     "libpng version 1.2.41beta15 - November 9, 2009" PNG_STRING_NEWLINE \
      "Copyright (c) 1998-2009 Glenn Randers-Pehrson" PNG_STRING_NEWLINE \
      "Copyright (c) 1996-1997 Andreas Dilger" PNG_STRING_NEWLINE \
      "Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc." \
      PNG_STRING_NEWLINE);
 #else
-      return ((png_charp) "libpng version 1.2.41beta15 - November 8, 2009\
+      return ((png_charp) "libpng version 1.2.41beta15 - November 9, 2009\
       Copyright (c) 1998-2009 Glenn Randers-Pehrson\
       Copyright (c) 1996-1997 Andreas Dilger\
       Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.");
diff --git a/pngget.c b/pngget.c
index 96816f7..096cc5d 100644
--- a/pngget.c
+++ b/pngget.c
@@ -1,7 +1,7 @@
 
 /* pngget.c - retrieval of values from info struct
  *
- * Last changed in libpng 1.2.41 [November 8, 2009]
+ * Last changed in libpng 1.2.41 [November 9, 2009]
  * Copyright (c) 1998-2009 Glenn Randers-Pehrson
  * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
  * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
diff --git a/pngread.c b/pngread.c
index 93c5f54..ae47a06 100644
--- a/pngread.c
+++ b/pngread.c
@@ -1,7 +1,7 @@
 
 /* pngread.c - read a PNG file
  *
- * Last changed in libpng 1.2.41 [November 8, 2009]
+ * Last changed in libpng 1.2.41 [November 9, 2009]
  * Copyright (c) 1998-2009 Glenn Randers-Pehrson
  * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
  * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
diff --git a/pngrio.c b/pngrio.c
index 84b1449..705e675 100644
--- a/pngrio.c
+++ b/pngrio.c
@@ -1,7 +1,7 @@
 
 /* pngrio.c - functions for data input
  *
- * Last changed in libpng 1.2.41 [November 8, 2009]
+ * Last changed in libpng 1.2.41 [November 9, 2009]
  * Copyright (c) 1998-2009 Glenn Randers-Pehrson
  * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
  * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
diff --git a/pngrtran.c b/pngrtran.c
index fd334f6..2e6bf28 100644
--- a/pngrtran.c
+++ b/pngrtran.c
@@ -1,7 +1,7 @@
 
 /* pngrtran.c - transforms the data in a row for PNG readers
  *
- * Last changed in libpng 1.2.41 [November 8, 2009]
+ * Last changed in libpng 1.2.41 [November 9, 2009]
  * Copyright (c) 1998-2009 Glenn Randers-Pehrson
  * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
  * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
diff --git a/pngrutil.c b/pngrutil.c
index f013b4b..2b75323 100644
--- a/pngrutil.c
+++ b/pngrutil.c
@@ -1,7 +1,7 @@
 
 /* pngrutil.c - utilities to read a PNG file
  *
- * Last changed in libpng 1.2.41 [November 8, 2009]
+ * Last changed in libpng 1.2.41 [November 9, 2009]
  * Copyright (c) 1998-2009 Glenn Randers-Pehrson
  * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
  * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
diff --git a/pngset.c b/pngset.c
index b183733..d26976c 100644
--- a/pngset.c
+++ b/pngset.c
@@ -1,7 +1,7 @@
 
 /* pngset.c - storage of image information into info struct
  *
- * Last changed in libpng 1.2.41 [November 8, 2009]
+ * Last changed in libpng 1.2.41 [November 9, 2009]
  * Copyright (c) 1998-2009 Glenn Randers-Pehrson
  * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
  * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
diff --git a/pngtest.c b/pngtest.c
index 02bffbb..22b302d 100644
--- a/pngtest.c
+++ b/pngtest.c
@@ -1,7 +1,7 @@
 
 /* pngtest.c - a simple test program to test libpng
  *
- * Last changed in libpng 1.2.41 [November 8, 2009]
+ * Last changed in libpng 1.2.41 [November 9, 2009]
  * Copyright (c) 1998-2009 Glenn Randers-Pehrson
  * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
  * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
diff --git a/pngtrans.c b/pngtrans.c
index 7df1c3d..873046c 100644
--- a/pngtrans.c
+++ b/pngtrans.c
@@ -1,7 +1,7 @@
 
 /* pngtrans.c - transforms the data in a row (used by both readers and writers)
  *
- * Last changed in libpng 1.2.41 [November 8, 2009]
+ * Last changed in libpng 1.2.41 [November 9, 2009]
  * Copyright (c) 1998-2009 Glenn Randers-Pehrson
  * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
  * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
diff --git a/pngwio.c b/pngwio.c
index 48981b7..77446da 100644
--- a/pngwio.c
+++ b/pngwio.c
@@ -1,7 +1,7 @@
 
 /* pngwio.c - functions for data output
  *
- * Last changed in libpng 1.2.41 [November 8, 2009]
+ * Last changed in libpng 1.2.41 [November 9, 2009]
  * Copyright (c) 1998-2009 Glenn Randers-Pehrson
  * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
  * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
diff --git a/pngwrite.c b/pngwrite.c
index e7e21e9..6c9edd5 100644
--- a/pngwrite.c
+++ b/pngwrite.c
@@ -1,7 +1,7 @@
 
 /* pngwrite.c - general routines to write a PNG file
  *
- * Last changed in libpng 1.2.41 [November 8, 2009]
+ * Last changed in libpng 1.2.41 [November 9, 2009]
  * Copyright (c) 1998-2009 Glenn Randers-Pehrson
  * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
  * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
diff --git a/pngwtran.c b/pngwtran.c
index 55aa0b6..c01cc7e 100644
--- a/pngwtran.c
+++ b/pngwtran.c
@@ -1,7 +1,7 @@
 
 /* pngwtran.c - transforms the data in a row for PNG writers
  *
- * Last changed in libpng 1.2.41 [November 8, 2009]
+ * Last changed in libpng 1.2.41 [November 9, 2009]
  * Copyright (c) 1998-2009 Glenn Randers-Pehrson
  * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
  * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
diff --git a/pngwutil.c b/pngwutil.c
index a1db122..d18b7f6 100644
--- a/pngwutil.c
+++ b/pngwutil.c
@@ -1,7 +1,7 @@
 
 /* pngwutil.c - utilities to write a PNG file
  *
- * Last changed in libpng 1.2.41 [November 8, 2009]
+ * Last changed in libpng 1.2.41 [November 9, 2009]
  * Copyright (c) 1998-2009 Glenn Randers-Pehrson
  * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
  * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)