[libpng17] Imported from libpng-1.7.0beta60.tar
diff --git a/ANNOUNCE b/ANNOUNCE
index bbb6a57..9537ae0 100644
--- a/ANNOUNCE
+++ b/ANNOUNCE
@@ -1,5 +1,5 @@
 
-Libpng 1.7.0beta60 - April 29, 2015
+Libpng 1.7.0beta60 - May 6, 2015
 
 This is not intended to be a public release.  It will be replaced
 within a few weeks by a public version or by another test version.
@@ -795,7 +795,7 @@
   Suppressed some warnings from the Borland C++ 5.5.1/5.82 compiler
     (Bug report by Viktor Szaka'ts).
 
-Version 1.7.0beta60 [April 29, 2015]
+Version 1.7.0beta60 [May 6, 2015]
   Replaced "unexpected" with an integer (0xabadca11) in pngset.c
     where a long was expected, to avoid a compiler warning when PNG_DEBUG > 1.
 
diff --git a/CHANGES b/CHANGES
index 76a1e2c..a1f8523 100644
--- a/CHANGES
+++ b/CHANGES
@@ -5085,7 +5085,7 @@
   Suppressed some warnings from the Borland C++ 5.5.1/5.82 compiler
     (Bug report by Viktor Szaka'ts).
 
-Version 1.7.0beta60 [April 29, 2015]
+Version 1.7.0beta60 [May 6, 2015]
   Replaced "unexpected" with an integer (0xabadca11) in pngset.c
     where a long was expected, to avoid a compiler warning when PNG_DEBUG > 1.
 
diff --git a/LICENSE b/LICENSE
index ea3d1fe..649757f 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.7.0beta60, April 19, 2015, are
+libpng versions 1.2.6, August 15, 2004, through 1.7.0beta60, May 6, 2015, are
 Copyright (c) 2004, 2006-2015 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
-April 19, 2015
+May 6, 2015
diff --git a/README b/README
index aba54b2..51abee5 100644
--- a/README
+++ b/README
@@ -1,4 +1,4 @@
-README for libpng version 1.7.0beta60 - April 19, 2015 (shared library 17.0)
+README for libpng version 1.7.0beta60 - May 6, 2015 (shared library 17.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/libpng-manual.txt b/libpng-manual.txt
index 5a909e6..0afe744 100644
--- a/libpng-manual.txt
+++ b/libpng-manual.txt
@@ -1,6 +1,6 @@
 libpng-manual.txt - A description on how to use and modify libpng
 
- libpng version 1.7.0beta60 - April 19, 2015
+ libpng version 1.7.0beta60 - May 6, 2015
  Updated and distributed by Glenn Randers-Pehrson
  <glennrp at users.sourceforge.net>
  Copyright (c) 1998-2015 Glenn Randers-Pehrson
@@ -11,7 +11,7 @@
 
  Based on:
 
- libpng versions 0.97, January 1998, through 1.7.0beta60 - April 19, 2015
+ libpng versions 0.97, January 1998, through 1.7.0beta60 - May 6, 2015
  Updated and distributed by Glenn Randers-Pehrson
  Copyright (c) 1998-2015 Glenn Randers-Pehrson
 
@@ -5341,7 +5341,7 @@
 
 XVII. Y2K Compliance in libpng
 
-April 19, 2015
+May 6, 2015
 
 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 9c04ec0..5d0ede4 100644
--- a/libpng.3
+++ b/libpng.3
@@ -1,4 +1,4 @@
-.TH LIBPNG 3 "April 19, 2015"
+.TH LIBPNG 3 "May 6, 2015"
 .SH NAME
 libpng \- Portable Network Graphics (PNG) Reference Library 1.7.0beta60
 .SH SYNOPSIS
@@ -494,7 +494,7 @@
 .SH LIBPNG.TXT
 libpng-manual.txt - A description on how to use and modify libpng
 
- libpng version 1.7.0beta60 - April 19, 2015
+ libpng version 1.7.0beta60 - May 6, 2015
  Updated and distributed by Glenn Randers-Pehrson
  <glennrp at users.sourceforge.net>
  Copyright (c) 1998-2015 Glenn Randers-Pehrson
@@ -505,7 +505,7 @@
 
  Based on:
 
- libpng versions 0.97, January 1998, through 1.7.0beta60 - April 19, 2015
+ libpng versions 0.97, January 1998, through 1.7.0beta60 - May 6, 2015
  Updated and distributed by Glenn Randers-Pehrson
  Copyright (c) 1998-2015 Glenn Randers-Pehrson
 
@@ -5835,7 +5835,7 @@
 
 .SH XVII. Y2K Compliance in libpng
 
-April 19, 2015
+May 6, 2015
 
 Since the PNG Development group is an ad-hoc body, we can't make
 an official declaration.
@@ -6152,7 +6152,7 @@
 
 Thanks to Frank J. T. Wojcik for helping with the documentation.
 
-Libpng version 1.7.0beta60 - April 19, 2015:
+Libpng version 1.7.0beta60 - May 6, 2015:
 Initially created in 1995 by Guy Eric Schalnat, then of Group 42, Inc.
 Currently maintained by Glenn Randers-Pehrson (glennrp at users.sourceforge.net).
 
@@ -6175,7 +6175,7 @@
 
 This code is released under the libpng license.
 
-libpng versions 1.2.6, August 15, 2004, through 1.7.0beta60, April 19, 2015, are
+libpng versions 1.2.6, August 15, 2004, through 1.7.0beta60, May 6, 2015, are
 Copyright (c) 2004,2006-2015 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
@@ -6274,7 +6274,7 @@
 
 Glenn Randers-Pehrson
 glennrp at users.sourceforge.net
-April 19, 2015
+May 6, 2015
 
 .\" end of man page
 
diff --git a/libpngpf.3 b/libpngpf.3
index 9b149c9..7c92cf6 100644
--- a/libpngpf.3
+++ b/libpngpf.3
@@ -1,4 +1,4 @@
-.TH LIBPNGPF 3 "April 19, 2015"
+.TH LIBPNGPF 3 "May 6, 2015"
 .SH NAME
 libpng \- Portable Network Graphics (PNG) Reference Library 1.7.0beta60
 (private functions)
diff --git a/png.5 b/png.5
index de12bc7..766fe3e 100644
--- a/png.5
+++ b/png.5
@@ -1,4 +1,4 @@
-.TH PNG 5 "April 19, 2015"
+.TH PNG 5 "May 6, 2015"
 .SH NAME
 png \- Portable Network Graphics (PNG) format
 .SH DESCRIPTION
diff --git a/png.c b/png.c
index 8920a7b..cb6b351 100644
--- a/png.c
+++ b/png.c
@@ -689,13 +689,13 @@
 #else
 #  ifdef __STDC__
    return PNG_STRING_NEWLINE \
-     "libpng version 1.7.0beta60 - April 19, 2015" PNG_STRING_NEWLINE \
+     "libpng version 1.7.0beta60 - May 6, 2015" PNG_STRING_NEWLINE \
      "Copyright (c) 1998-2015 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 "libpng version 1.7.0beta60 - April 19, 2015\
+      return "libpng version 1.7.0beta60 - May 6, 2015\
       Copyright (c) 1998-2015 Glenn Randers-Pehrson\
       Copyright (c) 1996-1997 Andreas Dilger\
       Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.";
diff --git a/png.h b/png.h
index 9c195a3..4ed3c4f 100644
--- a/png.h
+++ b/png.h
@@ -1,7 +1,7 @@
 
 /* png.h - header file for PNG reference library
  *
- * libpng version 1.7.0beta60, April 19, 2015
+ * libpng version 1.7.0beta60, May 6, 2015
  *
  * Copyright (c) 1998-2015 Glenn Randers-Pehrson
  * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
@@ -12,7 +12,7 @@
  * Authors and maintainers:
  *   libpng versions 0.71, May 1995, through 0.88, January 1996: Guy Schalnat
  *   libpng versions 0.89c, June 1996, through 0.96, May 1997: Andreas Dilger
- *   libpng versions 0.97, January 1998, through 1.7.0beta60, April 19, 2015: Glenn
+ *   libpng versions 0.97, January 1998, through 1.7.0beta60, May 6, 2015: Glenn
  *   See also "Contributing Authors", below.
  *
  * Note about libpng version numbers:
@@ -248,7 +248,7 @@
  *
  * This code is released under the libpng license.
  *
- * libpng versions 1.2.6, August 15, 2004, through 1.7.0beta60, April 19, 2015, are
+ * libpng versions 1.2.6, August 15, 2004, through 1.7.0beta60, May 6, 2015, are
  * Copyright (c) 2004, 2006-2015 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:
@@ -360,7 +360,7 @@
  * Y2K compliance in libpng:
  * =========================
  *
- *    April 19, 2015
+ *    May 6, 2015
  *
  *    Since the PNG Development group is an ad-hoc body, we can't make
  *    an official declaration.
@@ -430,7 +430,7 @@
 /* Version information for png.h - this should match the version in png.c */
 #define PNG_LIBPNG_VER_STRING "1.7.0beta60"
 #define PNG_HEADER_VERSION_STRING \
-     " libpng version 1.7.0beta60 - April 19, 2015\n"
+     " libpng version 1.7.0beta60 - May 6, 2015\n"
 
 #define PNG_LIBPNG_VER_SONUM   17
 #define PNG_LIBPNG_VER_DLLNUM  17
diff --git a/pngconf.h b/pngconf.h
index 75d72bd..86ad7d2 100644
--- a/pngconf.h
+++ b/pngconf.h
@@ -1,7 +1,7 @@
 
 /* pngconf.h - machine configurable file for libpng
  *
- * libpng version 1.7.0beta60, April 19, 2015
+ * libpng version 1.7.0beta60, May 6, 2015
  *
  * Copyright (c) 1998-2015 Glenn Randers-Pehrson
  * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
diff --git a/pngpriv.h b/pngpriv.h
index 1b94551..79c9bb6 100644
--- a/pngpriv.h
+++ b/pngpriv.h
@@ -374,6 +374,12 @@
 
 /* The affirm mechanism results in a minimal png_error in released versions
  * ('STABLE' versions) and a more descriptive abort in all other cases.
+ *
+ * The PNG_RELEASE_BUILD macro, defined above, controls the behavior of
+ * 'affirm': if set to 1 affirm will call png_error (or png_err) rather than
+ * abort.  The png_error text is the minimal (file location) text in this case,
+ * if it is produced. This flag indicates a STABLE (or RC) build.
+ *
  * The macros rely on the naming convention throughout this code - png_ptr
  * exists and is of type png_const_structrp or a compatible type - and the
  * presence in each file of a uniquely defined macro PNG_SRC_FILE; a number
@@ -389,21 +395,6 @@
  * future and to allow hardware files to use affirm, the encoding is a bit-wise
  * encoding based on the current number of lines.
  *
- * The following works out the value for two numeric #defines:
- *
- *  PNG_RELEASE_BUILD: Set to 1 if affirm should png_error (or png_err) rather
- *                     than abort.  The png_error text is the minimal (file
- *                     location) text in this case, if it is produced.  This
- *                     flag indicates a STABLE (or RC) build.
- *  PNG_AFFIRM_TEXT:   Set to 1 if affirm text should be produced, either the
- *                     minimal text or, if PNG_RELEASE_BUILD is 0, the more
- *                     verbose text including the 'condition' string.  This
- *                     value depends on whether the build supports an
- *                     appropriate way of outputting the message.
- *
- * Note that these are not configurable: this is just the affirm code; there's
- * no reason to allow configuration of these options.
- *
  * 'debug' is a version of 'affirm' that is completely removed from RELEASE
  * builds.  This is used when either an unexpected condition is completely
  * handled or when it can't be handled even by png_error, for example after a
@@ -412,6 +403,15 @@
  * UNTESTED is used to mark code that has not been tested; it causes an assert
  * if the code is executed and (therefore) tested.  UNTESTED should not remain
  * in release candidate code.
+ *
+ * PNG_AFFIRM_TEXT is set to 1 if affirm text should be produced, either
+ * the minimal text or, if PNG_RELEASE_BUILD is 0, the more verbose text
+ * including the 'condition' string.  This value depends on whether the
+ * build supports an appropriate way of outputting the message.
+ *
+ * Note that PNG_AFFIRM_TEXT is not configurable but is worked out here: this
+ * is just the affirm code; * there's no reason to allow configuration of this
+ * option.
  */
 #define PNG_AFFIRM_TEXT (PNG_RELEASE_BUILD ?\
          (defined PNG_ERROR_TEXT_SUPPORTED) :\
@@ -1045,7 +1045,7 @@
 #  define png_handled(pp, m)    ((void)0)
 #  define PNG_BYTE(b)           (b)
 #  define PNG_UINT_16(b)        (u)
-#endif
+#endif /* RANGE_CHECK */
 
 /* Utility macro to mark a handled error condition ; when control reaches this
  * there has been an arithmetic overflow but it is being handled.  Use the
diff --git a/pngrio.c b/pngrio.c
index 83a21bf..b0ffb69 100644
--- a/pngrio.c
+++ b/pngrio.c
@@ -1,7 +1,7 @@
 
 /* pngrio.c - functions for data input
  *
- * Last changed in libpng 1.6.17 [(PENDING RELEASE)]
+ * Last changed in libpng 1.7.0 [(PENDING RELEASE)]
  * Copyright (c) 1998-2015 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 0fa8cb3..83148e6 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.6.17 [(PENDING RELEASE)]
+ * Last changed in libpng 1.6.17 [March 26, 2015]
  * Copyright (c) 1998-2015 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.)
@@ -469,7 +469,7 @@
 #if defined(PNG_USER_MEM_SUPPORTED) && PNG_DEBUG
 
 /* Allocate memory.  For reasonable files, size should never exceed
- * 64K.  However, zlib may allocate more then 64K if you don't tell
+ * 64K.  However, zlib may allocate more than 64K if you don't tell
  * it not to.  See zconf.h and png.h for more information.  zlib does
  * need to allocate exactly 64K, so whatever you call here must
  * have the ability to do that.
diff --git a/pngwio.c b/pngwio.c
index b58f829..34bc2ba 100644
--- a/pngwio.c
+++ b/pngwio.c
@@ -1,8 +1,8 @@
 
 /* pngwio.c - functions for data output
  *
- * Last changed in libpng 1.6.15 [November 20, 2014]
- * Copyright (c) 1998-2014 Glenn Randers-Pehrson
+ * Last changed in libpng 1.7.0 [(PENDING RELEASE)]
+ * Copyright (c) 1998-2015 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/projects/vstudio/readme.txt b/projects/vstudio/readme.txt
index 1b5377b..9d88823 100644
--- a/projects/vstudio/readme.txt
+++ b/projects/vstudio/readme.txt
@@ -1,7 +1,7 @@
 
 VisualStudio instructions
 
-libpng version 1.7.0beta60 - April 19, 2015
+libpng version 1.7.0beta60 - May 6, 2015
 
 Copyright (c) 1998-2010 Glenn Randers-Pehrson
 
diff --git a/projects/vstudio/zlib.props b/projects/vstudio/zlib.props
index 9dfbc53..4d75c8f 100644
--- a/projects/vstudio/zlib.props
+++ b/projects/vstudio/zlib.props
@@ -2,7 +2,7 @@
 <!--
  * zlib.props - location of zlib source
  *
- * libpng version 1.7.0beta60 - April 19, 2015
+ * libpng version 1.7.0beta60 - May 6, 2015
  *
  * Copyright (c) 1998-2011 Glenn Randers-Pehrson
  *
diff --git a/scripts/README.txt b/scripts/README.txt
index c688127..0275c44 100644
--- a/scripts/README.txt
+++ b/scripts/README.txt
@@ -1,5 +1,5 @@
 
-Makefiles for  libpng version 1.7.0beta60 - April 19, 2015
+Makefiles for  libpng version 1.7.0beta60 - May 6, 2015
 
 pnglibconf.h.prebuilt       =>  Stores configuration settings
  makefile.linux    =>  Linux/ELF makefile
diff --git a/scripts/pnglibconf.h.prebuilt b/scripts/pnglibconf.h.prebuilt
index a83c065..a2e471a 100644
--- a/scripts/pnglibconf.h.prebuilt
+++ b/scripts/pnglibconf.h.prebuilt
@@ -2,7 +2,7 @@
 
 /* pnglibconf.h - library build configuration */
 
-/* Libpng version 1.7.0beta60 - April 19, 2015 */
+/* Libpng version 1.7.0beta60 - May 6, 2015 */
 
 /* Copyright (c) 1998-2014 Glenn Randers-Pehrson */