[libpng15] Imported from libpng-1.5.7.tar
diff --git a/ANNOUNCE b/ANNOUNCE
index 913e841..d89d11d 100644
--- a/ANNOUNCE
+++ b/ANNOUNCE
@@ -1,32 +1,29 @@
 
-Libpng 1.5.7rc03 - December 8, 2011
+Libpng 1.5.7 - December 15, 2011
 
-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.
+This is a public release of libpng, intended for use in production codes.
 
 Files available for download:
 
 Source files with LF line endings (for Unix/Linux) and with a
 "configure" script
 
-   1.5.7rc03.tar.xz (LZMA-compressed, recommended)
-   1.5.7rc03.tar.gz
-   1.5.7rc03.tar.bz2
+   libpng-1.5.7.tar.xz (LZMA-compressed, recommended)
+   libpng-1.5.7.tar.gz
+   libpng-1.5.7.tar.bz2
 
 Source files with CRLF line endings (for Windows), without the
 "configure" script
 
-   lp157r03.7z  (LZMA-compressed, recommended)
-   lp157r03.zip
+   lpng157.7z  (LZMA-compressed, recommended)
+   lpng157.zip
 
 Other information:
 
-   1.5.7rc03-README.txt
-   1.5.7rc03-LICENSE.txt
+   libpng-1.5.7-README.txt
+   libpng-1.5.7-LICENSE.txt
 
 Changes since the last public release (1.5.6):
-
-Version 1.5.7beta01 [November 4, 2011]
   Added support for ARM processor (Mans Rullgard)
   Fixed bug in pngvalid on early allocation failure; fixed type cast in
     pngmem.c; pngvalid would attempt to call png_error() if the allocation
@@ -42,8 +39,6 @@
     generation on x86. The changes are only part of the suggested ones;
     just the changes that definitely improve speed and remain simple.
     The changes also slightly increase the clarity of the code.
-
-Version 1.5.7beta02 [November 11, 2011]
   Check compression_type parameter in png_get_iCCP and remove spurious
     casts. The compression_type parameter is always assigned to, so must
     be non-NULL. The cast of the profile length potentially truncated the
@@ -55,29 +50,19 @@
     FP exceptions cause a crash. Added code to pngvalid to turn on FP
     exceptions if the appropriate glibc support is there to ensure this is
     tested in the future.
-  Updated scripts/pnglibconf.mak and scripts/makefile.std to handle the
-    new PNG_JOIN macro.
   Added versioning to pnglibconf.h comments.
-  Simplified read/write API initial version; basic read/write tested on
-    a variety of images, limited documentation (in the header file.)
   Installed more accurate linear to sRGB conversion tables. The slightly
     modified tables reduce the number of 16-bit values that
     convert to an off-by-one 8-bit value.  The "makesRGB.c" code that was used
     to generate the tables is now in a contrib/sRGBtables sub-directory.
-
-Version 1.5.7beta03 [November 17, 2011]
-  Removed PNG_CONST from the sRGB table declarations in pngpriv.h and png.c
   Added run-time detection of NEON support.
-  Added contrib/libtests; includes simplified API test and timing test and
-    a color conversion utility for rapid checking of failed 'pngstest' results.
   Multiple transform bug fixes plus a work-round for double gamma correction.
     libpng does not support more than one transform that requires linear data
     at once - if this is tried typically the results is double gamma
     correction. Since the simplified APIs can need rgb to gray combined with
     a compose operation it is necessary to do one of these outside the main
     libpng transform code. This check-in also contains fixes to various bugs
-    in the simplified APIs themselves and to some bugs in compose and rgb to
-    gray (on palette) itself.
+    in compose and rgb to gray (on palette).
   Fixes for C++ compilation using g++ When libpng source is compiled
     using g++. The compiler imposes C++ rules on the C source; thus it
     is desireable to make the source work with either C or C++ rules
@@ -88,48 +73,26 @@
     this on assembler compilation, even though it does on C compilation.
     This creates security issues if assembler code is enabled; the
     work-around is to set it by default in the flags for $(CCAS)
-  Work around compilers that don't support declaration of const data. Some
-    compilers fault 'extern const' data declarations (because the data is
-    not initialized); this turns on const-ness only for compilers where
-    this is known to work.
-
-Version 1.5.7beta04 [November 17, 2011]
-  Since the gcc driver does not recognize the --noexecstack flag, we must
-    use the -Wa prefix to have it passed through to the assembler.
-    Also removed a duplicate setting of this flag.
-  Added files that were omitted from the libpng-1.5.7beta03 zip distribution.
-
-Version 1.5.7beta05 [November 25, 2011]
   Removed "zTXt" from warning in generic chunk decompression function.
   Validate time settings passed to pngset() and png_convert_to_rfc1123()
     (Frank Busse).
   Added MINGW support to CMakeLists.txt
   Reject invalid compression flag or method when reading the iTXt chunk.
-  Backed out 'simplified' API changes. The API seems too complex and there
-    is a lack of consensus or enthusiasm for the proposals.  The API also
-    reveals significant bugs inside libpng (double gamma correction and the
-    known bug of being unable to retrieve a corrected palette). It seems
-    better to wait until the bugs, at least, are corrected.
   Moved pngvalid.c into contrib/libtests
   Rebuilt Makefile.in, configure, etc., with autoconf-2.68
-
-Version 1.5.7rc01 [December 1, 2011]
   Replaced an "#if" with "#ifdef" in pngrtran.c
   Revised #if PNG_DO_BC block in png.c (use #ifdef and add #else)
-
-Version 1.5.7rc02 [December 5, 2011]
-  Revised project files and contrib/pngvalid/pngvalid.c to account for
-    the relocation of pngvalid into contrib/libtests.
   Revised pngconf.h to use " __declspec(restrict)" only when MSC_VER >= 1400,
     as in libpng-1.5.4.
   Put CRLF line endings in the owatcom project files.
-
-Version 1.5.7rc03 [December 8, 2011]
   Updated CMakeLists.txt to account for the relocation of pngvalid.c
+  Minor fixes to pngvalid.c for gcc 4.6.2 compatibility to remove warnings
+    reported by earlier versions.
 
-Send comments/corrections/commendations to png-mng-implement at lists.sf.net:
+Send comments/corrections/commendations to png-mng-implement at lists.sf.net
 (subscription required; visit
 https://lists.sourceforge.net/lists/listinfo/png-mng-implement
-to subscribe) or to glennrp at users.sourceforge.net
+to subscribe)
+or to glennrp at users.sourceforge.net
 
 Glenn R-P
diff --git a/CHANGES b/CHANGES
index 890f0cb..f7a68e9 100644
--- a/CHANGES
+++ b/CHANGES
@@ -3769,9 +3769,13 @@
     as in libpng-1.5.4.
   Put CRLF line endings in the owatcom project files.
 
-Version 1.5.7rc03 [December 8, 2011]
+Version 1.5.7rc03 [December 7, 2011]
   Updated CMakeLists.txt to account for the relocation of pngvalid.c
 
+Version 1.5.7 [December 15, 2011]
+  Minor fixes to pngvalid.c for gcc 4.6.2 compatibility to remove warnings
+    reported by earlier versions.
+
 Send comments/corrections/commendations to png-mng-implement at lists.sf.net
 (subscription required; visit
 https://lists.sourceforge.net/lists/listinfo/png-mng-implement
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e37afd1..87cb16d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -229,7 +229,7 @@
 # SET UP LINKS
 if(PNG_SHARED)
   set_target_properties(${PNG_LIB_NAME} PROPERTIES
-#   VERSION 15.${PNGLIB_RELEASE}.1.5.7rc03
+#   VERSION 15.${PNGLIB_RELEASE}.1.5.7
     VERSION 15.${PNGLIB_RELEASE}.0
     SOVERSION 15
     CLEAN_DIRECT_OUTPUT 1)
diff --git a/LICENSE b/LICENSE
index 62b6af8..e23bca4 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.5.7rc02, December 5, 2011, are
+libpng versions 1.2.6, August 15, 2004, through 1.5.7, December 15, 2011, are
 Copyright (c) 2004, 2006-2011 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
-December 5, 2011
+December 15, 2011
diff --git a/README b/README
index f0a4d85..ec6a6a2 100644
--- a/README
+++ b/README
@@ -1,4 +1,4 @@
-README for libpng version 1.5.7rc02 - December 5, 2011 (shared library 15.0)
+README for libpng version 1.5.7 - December 15, 2011 (shared library 15.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/configure b/configure
index a6babd7..0eb468b 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for libpng 1.5.7rc02.
+# Generated by GNU Autoconf 2.68 for libpng 1.5.7.
 #
 # Report bugs to <png-mng-implement@lists.sourceforge.net>.
 #
@@ -570,8 +570,8 @@
 # Identity of this package.
 PACKAGE_NAME='libpng'
 PACKAGE_TARNAME='libpng'
-PACKAGE_VERSION='1.5.7rc02'
-PACKAGE_STRING='libpng 1.5.7rc02'
+PACKAGE_VERSION='1.5.7'
+PACKAGE_STRING='libpng 1.5.7'
 PACKAGE_BUGREPORT='png-mng-implement@lists.sourceforge.net'
 PACKAGE_URL=''
 
@@ -1320,7 +1320,7 @@
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures libpng 1.5.7rc02 to adapt to many kinds of systems.
+\`configure' configures libpng 1.5.7 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1390,7 +1390,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of libpng 1.5.7rc02:";;
+     short | recursive ) echo "Configuration of libpng 1.5.7:";;
    esac
   cat <<\_ACEOF
 
@@ -1501,7 +1501,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-libpng configure 1.5.7rc02
+libpng configure 1.5.7
 generated by GNU Autoconf 2.68
 
 Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1924,7 +1924,7 @@
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by libpng $as_me 1.5.7rc02, which was
+It was created by libpng $as_me 1.5.7, which was
 generated by GNU Autoconf 2.68.  Invocation command line was
 
   $ $0 $@
@@ -2739,7 +2739,7 @@
 
 # Define the identity of the package.
  PACKAGE='libpng'
- VERSION='1.5.7rc02'
+ VERSION='1.5.7'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -2803,7 +2803,7 @@
 
 
 
-PNGLIB_VERSION=1.5.7rc02
+PNGLIB_VERSION=1.5.7
 PNGLIB_MAJOR=1
 PNGLIB_MINOR=5
 PNGLIB_RELEASE=7
@@ -13414,7 +13414,7 @@
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by libpng $as_me 1.5.7rc02, which was
+This file was extended by libpng $as_me 1.5.7, which was
 generated by GNU Autoconf 2.68.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -13480,7 +13480,7 @@
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-libpng config.status 1.5.7rc02
+libpng config.status 1.5.7
 configured by $0, generated by GNU Autoconf 2.68,
   with options \\"\$ac_cs_config\\"
 
diff --git a/configure.ac b/configure.ac
index 38535ed..550553e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -18,12 +18,12 @@
 
 dnl Version number stuff here:
 
-AC_INIT([libpng], [1.5.7rc02], [png-mng-implement@lists.sourceforge.net])
+AC_INIT([libpng], [1.5.7], [png-mng-implement@lists.sourceforge.net])
 AM_INIT_AUTOMAKE
 dnl stop configure from automagically running automake
 AM_MAINTAINER_MODE
 
-PNGLIB_VERSION=1.5.7rc02
+PNGLIB_VERSION=1.5.7
 PNGLIB_MAJOR=1
 PNGLIB_MINOR=5
 PNGLIB_RELEASE=7
diff --git a/contrib/libtests/pngvalid.c b/contrib/libtests/pngvalid.c
index 4c5f306..36f0b4d 100644
--- a/contrib/libtests/pngvalid.c
+++ b/contrib/libtests/pngvalid.c
@@ -36,7 +36,7 @@
 #include "../../png.h"
 
 #if PNG_LIBPNG_VER < 10500
-/* This delibarately lacks the PNG_CONST. */
+/* This deliberately lacks the PNG_CONST. */
 typedef png_byte *png_const_bytep;
 
 /* This is copied from 1.5.1 png.h: */
@@ -4091,7 +4091,7 @@
          png_error(pp, "validate: invalid PLTE result");
       /* But there is no palette, so record this: */
       *npalette = 0;
-      memset(palette, 113, sizeof palette);
+      memset(palette, 113, sizeof (store_palette));
    }
 
    trans_alpha = 0;
@@ -5277,7 +5277,7 @@
 transform_display_init(transform_display *dp, png_modifier *pm, png_uint_32 id,
     PNG_CONST image_transform *transform_list)
 {
-   memset(dp, 0, sizeof dp);
+   memset(dp, 0, sizeof *dp);
 
    /* Standard fields */
    standard_display_init(&dp->this, &pm->this, id, 0/*do_interlace*/,
@@ -9388,7 +9388,7 @@
    size_t cp = 0;
    char command[1024];
 
-   context(&pm.this, fault);
+   anon_context(&pm.this);
 
    /* Add appropriate signal handlers, just the ANSI specified ones: */
    signal(SIGABRT, signal_handler);
@@ -9750,7 +9750,7 @@
 #endif
    }
 
-   Catch(fault)
+   Catch_anonymous
    {
       fprintf(stderr, "pngvalid: test aborted (probably failed in cleanup)\n");
       if (!pm.this.verbose)
diff --git a/example.c b/example.c
index 8368ff5..ec53a8c 100644
--- a/example.c
+++ b/example.c
@@ -2,7 +2,7 @@
 #if 0 /* in case someone actually tries to compile this */
 
 /* example.c - an example of using libpng
- * Last changed in libpng 1.5.7 [(PENDING RELEASE)]
+ * Last changed in libpng 1.5.7 [December 15, 2011]
  * Maintained 1998-2011 Glenn Randers-Pehrson
  * Maintained 1996, 1997 Andreas Dilger
  * Written 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
diff --git a/libpng-manual.txt b/libpng-manual.txt
index 63fba96..59690d2 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.5.7rc02 - December 5, 2011
+ libpng version 1.5.7 - December 15, 2011
  Updated and distributed by Glenn Randers-Pehrson
  <glennrp at users.sourceforge.net>
  Copyright (c) 1998-2011 Glenn Randers-Pehrson
@@ -11,7 +11,7 @@
 
  Based on:
 
- libpng versions 0.97, January 1998, through 1.5.7rc02 - December 5, 2011
+ libpng versions 0.97, January 1998, through 1.5.7 - December 15, 2011
  Updated and distributed by Glenn Randers-Pehrson
  Copyright (c) 1998-2011 Glenn Randers-Pehrson
 
@@ -4573,13 +4573,13 @@
 
 XIV. Y2K Compliance in libpng
 
-December 5, 2011
+December 15, 2011
 
 Since the PNG Development group is an ad-hoc body, we can't make
 an official declaration.
 
 This is your unofficial assurance that libpng from version 0.71 and
-upward through 1.5.7rc02 are Y2K compliant.  It is my belief that earlier
+upward through 1.5.7 are Y2K compliant.  It is my belief that earlier
 versions were also Y2K compliant.
 
 Libpng only has three year fields.  One is a 2-byte unsigned integer that
diff --git a/libpng.3 b/libpng.3
index 2cd0e1b..0d22762 100644
--- a/libpng.3
+++ b/libpng.3
@@ -1,6 +1,6 @@
-.TH LIBPNG 3 "December 5, 2011"
+.TH LIBPNG 3 "December 15, 2011"
 .SH NAME
-libpng \- Portable Network Graphics (PNG) Reference Library 1.5.7rc02
+libpng \- Portable Network Graphics (PNG) Reference Library 1.5.7
 .SH SYNOPSIS
 \fI\fB
 
@@ -977,7 +977,7 @@
 .SH LIBPNG.TXT
 libpng-manual.txt - A description on how to use and modify libpng
 
- libpng version 1.5.7rc02 - December 5, 2011
+ libpng version 1.5.7 - December 15, 2011
  Updated and distributed by Glenn Randers-Pehrson
  <glennrp at users.sourceforge.net>
  Copyright (c) 1998-2011 Glenn Randers-Pehrson
@@ -988,7 +988,7 @@
 
  Based on:
 
- libpng versions 0.97, January 1998, through 1.5.7rc02 - December 5, 2011
+ libpng versions 0.97, January 1998, through 1.5.7 - December 15, 2011
  Updated and distributed by Glenn Randers-Pehrson
  Copyright (c) 1998-2011 Glenn Randers-Pehrson
 
@@ -5551,13 +5551,13 @@
 
 .SH XIV. Y2K Compliance in libpng
 
-December 5, 2011
+December 15, 2011
 
 Since the PNG Development group is an ad-hoc body, we can't make
 an official declaration.
 
 This is your unofficial assurance that libpng from version 0.71 and
-upward through 1.5.7rc02 are Y2K compliant.  It is my belief that earlier
+upward through 1.5.7 are Y2K compliant.  It is my belief that earlier
 versions were also Y2K compliant.
 
 Libpng only has three year fields.  One is a 2-byte unsigned integer that
@@ -5760,7 +5760,8 @@
  1.5.6rc01-03        15    10506  15.so.15.6[.0]
  1.5.6               15    10506  15.so.15.6[.0]
  1.5.7beta01-05      15    10507  15.so.15.7[.0]
- 1.5.7rc01           15    10507  15.so.15.7[.0]
+ 1.5.7rc01-03        15    10507  15.so.15.7[.0]
+ 1.5.7               15    10507  15.so.15.7[.0]
 
 Henceforth the source version will match the shared-library minor
 and patch numbers; the shared-library major version number will be
@@ -5817,7 +5818,7 @@
 
 Thanks to Frank J. T. Wojcik for helping with the documentation.
 
-Libpng version 1.5.7rc02 - December 5, 2011:
+Libpng version 1.5.7 - December 15, 2011:
 Initially created in 1995 by Guy Eric Schalnat, then of Group 42, Inc.
 Currently maintained by Glenn Randers-Pehrson (glennrp at users.sourceforge.net).
 
@@ -5840,7 +5841,7 @@
 
 This code is released under the libpng license.
 
-libpng versions 1.2.6, August 15, 2004, through 1.5.7rc02, December 5, 2011, are
+libpng versions 1.2.6, August 15, 2004, through 1.5.7, December 15, 2011, are
 Copyright (c) 2004,2006-2007 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
@@ -5939,7 +5940,7 @@
 
 Glenn Randers-Pehrson
 glennrp at users.sourceforge.net
-December 5, 2011
+December 15, 2011
 
 .\" end of man page
 
diff --git a/libpngpf.3 b/libpngpf.3
index 67dc703..12a1677 100644
--- a/libpngpf.3
+++ b/libpngpf.3
@@ -1,6 +1,6 @@
-.TH LIBPNGPF 3 "December 5, 2011"
+.TH LIBPNGPF 3 "December 15, 2011"
 .SH NAME
-libpng \- Portable Network Graphics (PNG) Reference Library 1.5.7rc02
+libpng \- Portable Network Graphics (PNG) Reference Library 1.5.7
 (private functions)
 .SH SYNOPSIS
 \fB#include \fI"pngpriv.h"
diff --git a/png.5 b/png.5
index 61685ba..7d1c12b 100644
--- a/png.5
+++ b/png.5
@@ -1,4 +1,4 @@
-.TH PNG 5 "December 5, 2011"
+.TH PNG 5 "December 15, 2011"
 .SH NAME
 png \- Portable Network Graphics (PNG) format
 .SH DESCRIPTION
diff --git a/png.c b/png.c
index 5823510..0807448 100644
--- a/png.c
+++ b/png.c
@@ -1,7 +1,7 @@
 
 /* png.c - location for general purpose libpng functions
  *
- * Last changed in libpng 1.5.7 [(PENDING RELEASE)]
+ * Last changed in libpng 1.5.7 [December 15, 2011]
  * Copyright (c) 1998-2011 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.)
@@ -14,7 +14,7 @@
 #include "pngpriv.h"
 
 /* Generate a compiler error if there is an old png.h in the search path. */
-typedef png_libpng_version_1_5_7rc02 Your_png_h_is_not_version_1_5_7rc02;
+typedef png_libpng_version_1_5_7 Your_png_h_is_not_version_1_5_7;
 
 /* Tells libpng that we have already handled the first "num_bytes" bytes
  * of the PNG file signature.  If the PNG data is embedded into another
@@ -655,13 +655,13 @@
 #else
 #  ifdef __STDC__
    return PNG_STRING_NEWLINE \
-     "libpng version 1.5.7rc02 - December 5, 2011" PNG_STRING_NEWLINE \
+     "libpng version 1.5.7 - December 15, 2011" PNG_STRING_NEWLINE \
      "Copyright (c) 1998-2011 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.5.7rc02 - December 5, 2011\
+      return "libpng version 1.5.7 - December 15, 2011\
       Copyright (c) 1998-2011 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 9d24162..e22ec5c 100644
--- a/png.h
+++ b/png.h
@@ -1,7 +1,7 @@
 
 /* png.h - header file for PNG reference library
  *
- * libpng version 1.5.7rc02 - December 5, 2011
+ * libpng version 1.5.7 - December 15, 2011
  * Copyright (c) 1998-2011 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.)
@@ -11,7 +11,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.5.7rc02 - December 5, 2011: Glenn
+ *   libpng versions 0.97, January 1998, through 1.5.7 - December 15, 2011: Glenn
  *   See also "Contributing Authors", below.
  *
  * Note about libpng version numbers:
@@ -164,7 +164,8 @@
  *    1.5.6rc01-03            15    10506  15.so.15.6[.0]
  *    1.5.6                   15    10506  15.so.15.6[.0]
  *    1.5.7beta01-05          15    10507  15.so.15.7[.0]
- *    1.5.7rc01               15    10507  15.so.15.7[.0]
+ *    1.5.7rc01-03            15    10507  15.so.15.7[.0]
+ *    1.5.7                   15    10507  15.so.15.7[.0]
  *
  *   Henceforth the source version will match the shared-library major
  *   and minor numbers; the shared-library major version number will be
@@ -196,7 +197,7 @@
  *
  * This code is released under the libpng license.
  *
- * libpng versions 1.2.6, August 15, 2004, through 1.5.7rc02, December 5, 2011, are
+ * libpng versions 1.2.6, August 15, 2004, through 1.5.7, December 15, 2011, are
  * Copyright (c) 2004, 2006-2011 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:
@@ -308,13 +309,13 @@
  * Y2K compliance in libpng:
  * =========================
  *
- *    December 5, 2011
+ *    December 15, 2011
  *
  *    Since the PNG Development group is an ad-hoc body, we can't make
  *    an official declaration.
  *
  *    This is your unofficial assurance that libpng from version 0.71 and
- *    upward through 1.5.7rc02 are Y2K compliant.  It is my belief that
+ *    upward through 1.5.7 are Y2K compliant.  It is my belief that
  *    earlier versions were also Y2K compliant.
  *
  *    Libpng only has two year fields.  One is a 2-byte unsigned integer
@@ -372,9 +373,9 @@
  */
 
 /* Version information for png.h - this should match the version in png.c */
-#define PNG_LIBPNG_VER_STRING "1.5.7rc02"
+#define PNG_LIBPNG_VER_STRING "1.5.7"
 #define PNG_HEADER_VERSION_STRING \
-     " libpng version 1.5.7rc02 - December 5, 2011\n"
+     " libpng version 1.5.7 - December 15, 2011\n"
 
 #define PNG_LIBPNG_VER_SONUM   15
 #define PNG_LIBPNG_VER_DLLNUM  15
@@ -388,7 +389,7 @@
  * PNG_LIBPNG_VER_STRING, omitting any leading zero:
  */
 
-#define PNG_LIBPNG_VER_BUILD  02
+#define PNG_LIBPNG_VER_BUILD  0
 
 /* Release Status */
 #define PNG_LIBPNG_BUILD_ALPHA    1
@@ -535,7 +536,7 @@
 /* This triggers a compiler error in png.c, if png.c and png.h
  * do not agree upon the version number.
  */
-typedef char* png_libpng_version_1_5_7rc02;
+typedef char* png_libpng_version_1_5_7;
 
 /* Three color definitions.  The order of the red, green, and blue, (and the
  * exact size) is not important, although the size of the fields need to
diff --git a/pngconf.h b/pngconf.h
index 9b49de4..d07054d 100644
--- a/pngconf.h
+++ b/pngconf.h
@@ -1,7 +1,7 @@
 
 /* pngconf.h - machine configurable file for libpng
  *
- * libpng version 1.5.7rc02 - December 5, 2011
+ * libpng version 1.5.7 - December 15, 2011
  *
  * Copyright (c) 1998-2011 Glenn Randers-Pehrson
  * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
diff --git a/pngerror.c b/pngerror.c
index c287655..7604bdd 100644
--- a/pngerror.c
+++ b/pngerror.c
@@ -1,7 +1,7 @@
 
 /* pngerror.c - stub functions for i/o and memory allocation
  *
- * Last changed in libpng 1.5.7 [(PENDING RELEASE)]
+ * Last changed in libpng 1.5.7 [December 15, 2011]
  * Copyright (c) 1998-2011 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/pngget.c b/pngget.c
index 41529d3..43400cd 100644
--- a/pngget.c
+++ b/pngget.c
@@ -1,7 +1,7 @@
 
 /* pngget.c - retrieval of values from info struct
  *
- * Last changed in libpng 1.5.7 [(PENDING RELEASE)]
+ * Last changed in libpng 1.5.7 [December 15, 2011]
  * Copyright (c) 1998-2011 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/pngmem.c b/pngmem.c
index 756eb01..bf5ff03 100644
--- a/pngmem.c
+++ b/pngmem.c
@@ -1,7 +1,7 @@
 
 /* pngmem.c - stub functions for memory allocation
  *
- * Last changed in libpng 1.5.7 [(PENDING RELEASE)]
+ * Last changed in libpng 1.5.7 [December 15, 2011]
  * Copyright (c) 1998-2011 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/pngpread.c b/pngpread.c
index 726cff0..20d3f23 100644
--- a/pngpread.c
+++ b/pngpread.c
@@ -1,7 +1,7 @@
 
 /* pngpread.c - read a png file in push mode
  *
- * Last changed in libpng 1.5.7 [(PENDING RELEASE)]
+ * Last changed in libpng 1.5.7 [December 15, 2011]
  * Copyright (c) 1998-2011 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/pngpriv.h b/pngpriv.h
index 2fdf09b..67e486c 100644
--- a/pngpriv.h
+++ b/pngpriv.h
@@ -6,7 +6,7 @@
  * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
  * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
  *
- * Last changed in libpng 1.5.7 [(PENDING RELEASE)]
+ * Last changed in libpng 1.5.7 [December 15, 2011]
  *
  * This code is released under the libpng license.
  * For conditions of distribution and use, see the disclaimer
diff --git a/pngread.c b/pngread.c
index 6427f9a..0643754 100644
--- a/pngread.c
+++ b/pngread.c
@@ -1,7 +1,7 @@
 
 /* pngread.c - read a PNG file
  *
- * Last changed in libpng 1.5.7 [(PENDING RELEASE)]
+ * Last changed in libpng 1.5.7 [December 15, 2011]
  * Copyright (c) 1998-2011 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 8502221..1079595 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.5.7 [(PENDING RELEASE)]
+ * Last changed in libpng 1.5.7 [December 15, 2011]
  * Copyright (c) 1998-2011 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 6809382..52a73cf 100644
--- a/pngrutil.c
+++ b/pngrutil.c
@@ -1,7 +1,7 @@
 
 /* pngrutil.c - utilities to read a PNG file
  *
- * Last changed in libpng 1.5.7 [(PENDING RELEASE)]
+ * Last changed in libpng 1.5.7 [December 15, 2011]
  * Copyright (c) 1998-2011 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 48290ba..92db389 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.5.7 [(PENDING RELEASE)]
+ * Last changed in libpng 1.5.7 [December 15, 2011]
  * Copyright (c) 1998-2011 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 5eec080..c52aef3 100644
--- a/pngtest.c
+++ b/pngtest.c
@@ -1817,4 +1817,4 @@
 }
 
 /* Generate a compiler error if there is an old png.h in the search path. */
-typedef png_libpng_version_1_5_7rc02 Your_png_h_is_not_version_1_5_7rc02;
+typedef png_libpng_version_1_5_7 Your_png_h_is_not_version_1_5_7;
diff --git a/pngwrite.c b/pngwrite.c
index 92a9b95..6d3fd4c 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.5.7 [(PENDING RELEASE)]
+ * Last changed in libpng 1.5.7 [December 15, 2011]
  * Copyright (c) 1998-2011 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 ae42f10..a18faa1 100644
--- a/projects/vstudio/readme.txt
+++ b/projects/vstudio/readme.txt
@@ -1,7 +1,7 @@
 
 VisualStudio instructions
 
-libpng version 1.5.7rc02 - December 5, 2011
+libpng version 1.5.7 - December 15, 2011
 
 Copyright (c) 1998-2010 Glenn Randers-Pehrson
 
diff --git a/projects/vstudio/zlib.props b/projects/vstudio/zlib.props
index d16ec89..c13867c 100644
--- a/projects/vstudio/zlib.props
+++ b/projects/vstudio/zlib.props
@@ -2,7 +2,7 @@
 <!--
  * zlib.props - location of zlib source
  *
- * libpng version 1.5.7rc02 - December 5, 2011
+ * libpng version 1.5.7 - December 15, 2011
  *
  * Copyright (c) 1998-2011 Glenn Randers-Pehrson
  *
diff --git a/scripts/README.txt b/scripts/README.txt
index 5aa6ccf..485aba2 100644
--- a/scripts/README.txt
+++ b/scripts/README.txt
@@ -1,9 +1,9 @@
 
-Makefiles for  libpng version 1.5.7rc02 - December 5, 2011
+Makefiles for  libpng version 1.5.7 - December 15, 2011
 
 pnglibconf.h.prebuilt       =>  Stores configuration settings
  makefile.linux    =>  Linux/ELF makefile
-                       (gcc, creates libpng15.so.15.1.5.7rc02)
+                       (gcc, creates libpng15.so.15.1.5.7)
  makefile.gcc      =>  Generic makefile (gcc, creates static libpng.a)
  makefile.knr      =>  Archaic UNIX Makefile that converts files with
                        ansi2knr (Requires ansi2knr.c from
@@ -20,7 +20,7 @@
  makefile.dec      =>  DEC Alpha UNIX makefile
  makefile.dj2      =>  DJGPP 2 makefile
  makefile.elf      =>  Linux/ELF makefile symbol versioning,
-                       (gcc, creates libpng15.so.15.1.5.7rc02)
+                       (gcc, creates libpng15.so.15.1.5.7)
  makefile.freebsd  =>  FreeBSD makefile
  makefile.gcc      =>  Generic gcc makefile
  makefile.hpgcc    =>  HPUX makefile using gcc
@@ -35,12 +35,12 @@
  makefile.os2      =>  OS/2 Makefile (gcc and emx, requires libpng.def)
  makefile.sco      =>  For SCO OSr5  ELF and Unixware 7 with Native cc
  makefile.sggcc    =>  Silicon Graphics (gcc,
-                       creates libpng15.so.15.1.5.7rc02)
+                       creates libpng15.so.15.1.5.7)
  makefile.sgi      =>  Silicon Graphics IRIX makefile (cc, creates static lib)
  makefile.solaris  =>  Solaris 2.X makefile (gcc,
-                       creates libpng15.so.15.1.5.7rc02)
+                       creates libpng15.so.15.1.5.7)
  makefile.so9      =>  Solaris 9 makefile (gcc,
-                       creates libpng15.so.15.1.5.7rc02)
+                       creates libpng15.so.15.1.5.7)
  makefile.std      =>  Generic UNIX makefile (cc, creates static libpng.a)
  makefile.sunos    =>  Sun makefile
  makefile.32sunu   =>  Sun Ultra 32-bit makefile
diff --git a/scripts/libpng-config-head.in b/scripts/libpng-config-head.in
index 5df2dd4..49a9339 100755
--- a/scripts/libpng-config-head.in
+++ b/scripts/libpng-config-head.in
@@ -11,7 +11,7 @@
 
 # Modeled after libxml-config.
 
-version=1.5.7rc02
+version=1.5.7
 prefix=""
 libdir=""
 libs=""
diff --git a/scripts/libpng.pc.in b/scripts/libpng.pc.in
index 8594343..3ec77d6 100644
--- a/scripts/libpng.pc.in
+++ b/scripts/libpng.pc.in
@@ -5,6 +5,6 @@
 
 Name: libpng
 Description: Loads and saves PNG files
-Version: 1.5.7rc02
+Version: 1.5.7
 Libs: -L${libdir} -lpng15
 Cflags: -I${includedir}
diff --git a/scripts/makefile.ne12bsd b/scripts/makefile.ne12bsd
index 6348460..e534a01 100644
--- a/scripts/makefile.ne12bsd
+++ b/scripts/makefile.ne12bsd
@@ -17,7 +17,7 @@
 
 LIB=	png15
 SHLIB_MAJOR=	0
-SHLIB_MINOR=	1.5.7rc02
+SHLIB_MINOR=	1.5.7
 SRCS=	png.c pngset.c pngget.c pngrutil.c pngtrans.c pngwutil.c \
 	pngread.c pngrio.c pngwio.c pngwrite.c pngrtran.c \
 	pngwtran.c pngmem.c pngerror.c pngpread.c
diff --git a/scripts/makefile.netbsd b/scripts/makefile.netbsd
index 5cdb4f0..262bdbd 100644
--- a/scripts/makefile.netbsd
+++ b/scripts/makefile.netbsd
@@ -17,7 +17,7 @@
 
 LIB=	png
 SHLIB_MAJOR=	15
-SHLIB_MINOR=	1.5.7rc02
+SHLIB_MINOR=	1.5.7
 SRCS=	png.c pngset.c pngget.c pngrutil.c pngtrans.c pngwutil.c \
 	pngread.c pngrio.c pngwio.c pngwrite.c pngrtran.c \
 	pngwtran.c pngmem.c pngerror.c pngpread.c
diff --git a/scripts/makefile.openbsd b/scripts/makefile.openbsd
index 1ab1b3f..ad2b874 100644
--- a/scripts/makefile.openbsd
+++ b/scripts/makefile.openbsd
@@ -11,7 +11,7 @@
 MANDIR= ${PREFIX}/man/cat
 
 SHLIB_MAJOR=	15
-SHLIB_MINOR=	1.5.7rc02
+SHLIB_MINOR=	1.5.7
 
 LIB=	png
 SRCS=	png.c pngerror.c pngget.c pngmem.c pngpread.c \
diff --git a/scripts/options.awk b/scripts/options.awk
index 27b549a..a8dff04 100755
--- a/scripts/options.awk
+++ b/scripts/options.awk
@@ -1,7 +1,7 @@
 #!/bin/awk -f
 # scripts/options.awk - library build configuration control
 #
-# last changed in libpng version 1.5.7 - (PENDING RELEASE)
+# last changed in libpng version 1.5.7 - December 15, 2011
 #
 # Copyright (c) 1998-2011 Glenn Randers-Pehrson
 #
diff --git a/scripts/pnglibconf.dfa b/scripts/pnglibconf.dfa
index 8f8ec86..a740d68 100644
--- a/scripts/pnglibconf.dfa
+++ b/scripts/pnglibconf.dfa
@@ -296,7 +296,7 @@
 # processing after that has happened.  You need to be sure to enable
 # READ_SCALE_16_TO_8 or READ_STRIP_16_TO_8 when you disable READ_16BIT for
 # this to work properly.  You should disable the other option if you need to
-# ensure a particular convertion (otherwise the app can chose.)
+# ensure a particular conversion (otherwise the app can chose.)
 
 option READ_16BIT requires READ enables 16BIT
 
diff --git a/scripts/pnglibconf.h.prebuilt b/scripts/pnglibconf.h.prebuilt
index 9011ffe..0a79991 100644
--- a/scripts/pnglibconf.h.prebuilt
+++ b/scripts/pnglibconf.h.prebuilt
@@ -3,7 +3,7 @@
 
 /* pnglibconf.h - library build configuration */
 
-/* Libpng 1.5.7rc02 - December 5, 2011 */
+/* Libpng 1.5.7 - December 15, 2011 */
 
 /* Copyright (c) 1998-2011 Glenn Randers-Pehrson */
 
diff --git a/scripts/symbols.def b/scripts/symbols.def
index bbb02f8..a2f15e4 100644
--- a/scripts/symbols.def
+++ b/scripts/symbols.def
@@ -5,7 +5,7 @@
 LIBRARY
 
 EXPORTS
-;Version 1.5.7rc02
+;Version 1.5.7
  png_access_version_number @1
  png_set_sig_bytes @2
  png_sig_cmp @3