[libpng16] Imported from libpng-1.6.18.tar
diff --git a/ANNOUNCE b/ANNOUNCE
index 8222d7e..c0289c1 100644
--- a/ANNOUNCE
+++ b/ANNOUNCE
@@ -1,31 +1,28 @@
-Libpng 1.6.18rc03 - July 13, 2015
+Libpng 1.6.18 - July 23, 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.
+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.6.18rc03.tar.xz (LZMA-compressed, recommended)
-   1.6.18rc03.tar.gz
+   libpng-1.6.18.tar.xz (LZMA-compressed, recommended)
+   libpng-1.6.18.tar.gz
 
 Source files with CRLF line endings (for Windows), without the
 "configure" script
 
-   lp1618r03.7z  (LZMA-compressed, recommended)
-   lp1618r03.zip
+   lpng1618.7z  (LZMA-compressed, recommended)
+   lpng1618.zip
 
 Other information:
 
-   1.6.18rc03-README.txt
-   1.6.18rc03-LICENSE.txt
-   libpng-1.6.18rc03-*.asc (armored detached GPG signatures)
+   libpng-1.6.18-README.txt
+   libpng-1.6.18-LICENSE.txt
+   libpng-1.6.18-*.asc (armored detached GPG signatures)
 
 Changes since the last public release (1.6.17):
-
-Version 1.6.18beta01 [April 1, 2015]
   Removed PNG_SET_CHUNK_[CACHE|MALLOC]_LIMIT_SUPPORTED macros.  They
     have been combined with PNG_SET_USER_LIMITS_SUPPORTED (resolves
     bug report by Andrew Church).
@@ -33,43 +30,34 @@
     fixes some arithmetic errors that caused some tests to fail on
     some 32-bit platforms (Bug reports by Peter Breitenlohner [i686]
     and Petr Gajdos [i586]).
-
-Version 1.6.18beta02 [April 26, 2015]
   Suppressed some warnings from the Borland C++ 5.5.1/5.82 compiler
     (Bug report by Viktor Szaka'ts).
-
-Version 1.6.18beta03 [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.
   Added contrib/examples/simpleover.c, to demonstrate how to handle
     alpha compositing of multiple images, using the "simplified API"
     and an example PNG generation tool, contrib/examples/genpng.c
     (John Bowler).
-
-Version 1.6.18beta04 [May 20, 2015]
   PNG_RELEASE_BUILD replaces tests where the code depended on the build base
     type and can be defined on the command line, allowing testing in beta
     builds (John Bowler).
   Avoid Coverity issue 80858 (REVERSE NULL) in pngtest.c
   Avoid a harmless potential integer overflow in png_XYZ_from_xy() (Bug
     report from Christopher Ferris).
-
-Version 1.6.18beta05 [May 31, 2015]
   Backport filter selection code from libpng-1.7.0beta51, to combine
     sub_row, up_row, avg_row, and paeth_row into try_row and tst_row.
   Changed png_voidcast(), etc., to voidcast(), etc., in contrib/tools/pngfix.c
     to avoid confusion with the libpng private macros.
   Fixed old cut&paste bug in the weighted filter selection code in
     pngwutil.c, introduced in libpng-0.95, March 1997.
-
-Version 1.6.18beta06 [June 1, 2015]
   Removed WRITE_WEIGHTED_FILTERED code, to save a few kbytes of the
     compiled library size. It never worked properly and as far as we can
     tell, no one uses it. The png_set_filter_heuristics() and
     png_set_filter_heuristics_fixed() APIs are retained but deprecated
     and do nothing.
-
-Version 1.6.18beta07 [June 6, 2015]
+  Quieted some Coverity issues in pngfix.c, png-fix-itxt.c, pngvalid.c,
+    pngstest.c, and pngimage.c. Most seem harmless, but png-fix-itxt
+    would only work with iTXt chunks with length 255 or less.
   Removed non-working progressive reader 'skip' function. This
     function has apparently never been used. It was implemented
     to support back-door modification of png_struct in libpng-1.4.x
@@ -78,40 +66,21 @@
   Fixed cexcept.h in which GCC 5 now reports that one of the auto
     variables in the Try macro needs to be volatile to prevent value
     being lost over the setjmp (John Bowler).
-  Fixed NO_WRITE_FILTER and -Wconversion build breaks (John Bowler).
-  Fix g++ build breaks (John Bowler).
-  Quieted some Coverity issues in pngfix.c, png-fix-itxt.c, pngvalid.c,
-    pngstest.c, and pngimage.c. Most seem harmless, but png-fix-itxt
-    would only work with iTXt chunks with length 255 or less.
   Added #ifdef's to contrib/examples programs so people don't try
     to compile them without the minimum required support enabled
     (suggested by Flavio Medeiros).
-
-Version 1.6.18beta08 [June 30, 2015]
   Eliminated the final two Coverity defects (insecure temporary file
     handling in contrib/libtests/pngstest.c; possible overflow of
     unsigned char in contrib/tools/png-fix-itxt.c). To use the "secure"
     file handling, define PNG_USE_MKSTEMP, otherwise "tmpfile()" will
     be used.
-  Removed some unused WEIGHTED_FILTER macros from png.h and pngstruct.h
-
-Version 1.6.18beta09 [July 5, 2015]
-  Removed some useless typecasts from contrib/tools/png-fix-itxt.c
-  Fixed a new signed-unsigned comparison in pngrtran.c (Max Stepin).
+  Removed some unused WEIGHTED_FILTER macros from pngstruct.h
   Replaced arbitrary use of 'extern' with #define PNG_LINKAGE_*.  To
     preserve API compatibility, the new defines all default to "extern"
     (requested by Jan Nijtmans).
-
-Version 1.6.18rc01 [July 9, 2015]
   Belatedly added Mans Rullgard and James Yu to the list of Contributing
     Authors.
 
-Version 1.6.18rc02 [July 12, 2015]
-  Restored unused FILTER_HEURISTIC macros removed at libpng-1.6.18beta08
-    to png.h to avoid compatibility warnings.
-
-Version 1.6.18rc03 [July 13, 2015]
-
 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/CHANGES b/CHANGES
index e217eba..d678392 100644
--- a/CHANGES
+++ b/CHANGES
@@ -5299,7 +5299,11 @@
   Restored unused FILTER_HEURISTIC macros removed at libpng-1.6.18beta08
     to png.h to avoid compatibility warnings.
 
-Version 1.6.18rc03 [July 13, 2015]
+Version 1.6.18rc03 [July 15, 2015]
+  Minor changes to the man page
+
+Version 1.6.18 [July 23, 2015]
+  No changes.
 
 Send comments/corrections/commendations to png-mng-implement at lists.sf.net
 (subscription required; visit
diff --git a/CMakeLists.txt b/CMakeLists.txt
index abc43fe..62d5160 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -261,7 +261,7 @@
 # SET UP LINKS
 if(PNG_SHARED)
   set_target_properties(${PNG_LIB_NAME} PROPERTIES
-#   VERSION 16.${PNGLIB_RELEASE}.1.6.18rc03
+#   VERSION 16.${PNGLIB_RELEASE}.1.6.18
     VERSION 16.${PNGLIB_RELEASE}.0
     SOVERSION 16
     CLEAN_DIRECT_OUTPUT 1)
diff --git a/LICENSE b/LICENSE
index 91a71a2..090a360 100644
--- a/LICENSE
+++ b/LICENSE
@@ -10,7 +10,7 @@
 
 This code is released under the libpng license.
 
-libpng versions 1.0.7, July 1, 2000, through 1.6.18rc03, July 13, 2015, are
+libpng versions 1.0.7, July 1, 2000, through 1.6.18, July 23, 2015, are
 Copyright (c) 2000-2002, 2004, 2006-2015 Glenn Randers-Pehrson, and are
 distributed according to the same disclaimer and license as libpng-1.0.6
 with the following individuals added to the list of Contributing Authors:
@@ -104,4 +104,4 @@
 
 Glenn Randers-Pehrson
 glennrp at users.sourceforge.net
-July 13, 2015
+July 23, 2015
diff --git a/README b/README
index c484edf..3c181a3 100644
--- a/README
+++ b/README
@@ -1,4 +1,4 @@
-README for libpng version 1.6.18rc03 - July 13, 2015 (shared library 16.0)
+README for libpng version 1.6.18 - July 23, 2015 (shared library 16.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.ac b/configure.ac
index f64aa03..4fb0778 100644
--- a/configure.ac
+++ b/configure.ac
@@ -18,7 +18,7 @@
 
 dnl Version number stuff here:
 
-AC_INIT([libpng],[1.6.18rc03],[png-mng-implement@lists.sourceforge.net])
+AC_INIT([libpng],[1.6.18],[png-mng-implement@lists.sourceforge.net])
 AC_CONFIG_MACRO_DIR([scripts])
 
 # libpng does not follow GNU file name conventions (hence 'foreign')
@@ -39,7 +39,7 @@
 dnl AM_PREREQ([1.11.2])
 dnl stop configure from automagically running automake
 
-PNGLIB_VERSION=1.6.18rc03
+PNGLIB_VERSION=1.6.18
 PNGLIB_MAJOR=1
 PNGLIB_MINOR=6
 PNGLIB_RELEASE=18
diff --git a/contrib/libtests/pngimage.c b/contrib/libtests/pngimage.c
index 0ee0a2e..180cf0a 100644
--- a/contrib/libtests/pngimage.c
+++ b/contrib/libtests/pngimage.c
@@ -2,7 +2,7 @@
  *
  * Copyright (c) 2015 John Cunningham Bowler
  *
- * Last changed in libpng 1.6.18 [(PENDING RELEASE)]
+ * Last changed in libpng 1.6.18 [July 23, 2015]
  *
  * This code is released under the libpng license.
  * For conditions of distribution and use, see the disclaimer
diff --git a/contrib/libtests/pngstest.c b/contrib/libtests/pngstest.c
index 7860985..5a080b4 100644
--- a/contrib/libtests/pngstest.c
+++ b/contrib/libtests/pngstest.c
@@ -3,7 +3,7 @@
  *
  * Copyright (c) 2013-2015 John Cunningham Bowler
  *
- * Last changed in libpng 1.6.18 [(PENDING RELEASE)]
+ * Last changed in libpng 1.6.18 [July 23, 2015]
  *
  * This code is released under the libpng license.
  * For conditions of distribution and use, see the disclaimer
diff --git a/contrib/libtests/pngvalid.c b/contrib/libtests/pngvalid.c
index 35e204d..1efab64 100644
--- a/contrib/libtests/pngvalid.c
+++ b/contrib/libtests/pngvalid.c
@@ -1,7 +1,7 @@
 
 /* pngvalid.c - validate libpng by constructing then reading png files.
  *
- * Last changed in libpng 1.6.18 [(PENDING RELEASE)]
+ * Last changed in libpng 1.6.18 [July 23, 2015]
  * Copyright (c) 2014-2015 Glenn Randers-Pehrson
  * Written by John Cunningham Bowler
  *
diff --git a/contrib/tools/png-fix-itxt.c b/contrib/tools/png-fix-itxt.c
index 4426407..5730d9f 100644
--- a/contrib/tools/png-fix-itxt.c
+++ b/contrib/tools/png-fix-itxt.c
@@ -2,7 +2,7 @@
 /* png-fix-itxt version 1.0.0
  *
  * Copyright 2015 Glenn Randers-Pehrson
- * Last changed in libpng 1.6.18 [(PENDING RELEASE)]
+ * Last changed in libpng 1.6.18 [July 23, 2015]
  *
  * This code is released under the libpng license.
  * For conditions of distribution and use, see the disclaimer
diff --git a/contrib/tools/pngfix.c b/contrib/tools/pngfix.c
index 96c27f6..2489ac3 100644
--- a/contrib/tools/pngfix.c
+++ b/contrib/tools/pngfix.c
@@ -2,7 +2,7 @@
  *
  * Copyright (c) 2014-2015 John Cunningham Bowler
  *
- * Last changed in libpng 1.6.18 [(PENDING RELEASE)]
+ * Last changed in libpng 1.6.18 [July 23, 2015]
  *
  * This code is released under the libpng license.
  * For conditions of distribution and use, see the disclaimer
diff --git a/libpng-manual.txt b/libpng-manual.txt
index 5ba3e06..da247cf 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.6.18rc03 - July 13, 2015
+ libpng version 1.6.18 - July 23, 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.6.18rc03 - July 13, 2015
+ libpng versions 0.97, January 1998, through 1.6.18 - July 23, 2015
  Updated and distributed by Glenn Randers-Pehrson
  Copyright (c) 1998-2015 Glenn Randers-Pehrson
 
@@ -5262,13 +5262,13 @@
 
 XVI. Y2K Compliance in libpng
 
-July 13, 2015
+July 23, 2015
 
 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.6.18rc03 are Y2K compliant.  It is my belief that earlier
+upward through 1.6.18 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
diff --git a/libpng.3 b/libpng.3
index 7e3be9d..bb079d4 100644
--- a/libpng.3
+++ b/libpng.3
@@ -1,6 +1,6 @@
-.TH LIBPNG 3 "July 13, 2015"
+.TH LIBPNG 3 "July 23, 2015"
 .SH NAME
-libpng \- Portable Network Graphics (PNG) Reference Library 1.6.18rc03
+libpng \- Portable Network Graphics (PNG) Reference Library 1.6.18
 .SH SYNOPSIS
 \fB
 #include <png.h>\fP
@@ -508,7 +508,7 @@
 .SH LIBPNG.TXT
 libpng-manual.txt - A description on how to use and modify libpng
 
- libpng version 1.6.18rc03 - July 13, 2015
+ libpng version 1.6.18 - July 23, 2015
  Updated and distributed by Glenn Randers-Pehrson
  <glennrp at users.sourceforge.net>
  Copyright (c) 1998-2015 Glenn Randers-Pehrson
@@ -519,7 +519,7 @@
 
  Based on:
 
- libpng versions 0.97, January 1998, through 1.6.18rc03 - July 13, 2015
+ libpng versions 0.97, January 1998, through 1.6.18 - July 23, 2015
  Updated and distributed by Glenn Randers-Pehrson
  Copyright (c) 1998-2015 Glenn Randers-Pehrson
 
@@ -5770,13 +5770,13 @@
 
 .SH XVI. Y2K Compliance in libpng
 
-July 13, 2015
+July 23, 2015
 
 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.6.18rc03 are Y2K compliant.  It is my belief that earlier
+upward through 1.6.18 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
@@ -6033,6 +6033,7 @@
  1.6.17              16    10617  16.so.16.17[.0]
  1.6.18beta01-09     16    10618  16.so.16.18[.0]
  1.6.18rc01-03       16    10618  16.so.16.18[.0]
+ 1.6.18              16    10618  16.so.16.18[.0]
 
 Henceforth the source version will match the shared-library minor
 and patch numbers; the shared-library major version number will be
@@ -6089,7 +6090,7 @@
 
 Thanks to Frank J. T. Wojcik for helping with the documentation.
 
-Libpng version 1.6.18rc03 - July 13, 2015:
+Libpng version 1.6.18 - July 23, 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).
 
@@ -6112,7 +6113,7 @@
 
 This code is released under the libpng license.
 
-libpng versions 1.0.7, July 1, 2000, through 1.6.18rc03, July 13, 2015, are
+libpng versions 1.0.7, July 1, 2000, through 1.6.18, July 23, 2015, are
 Copyright (c) 2000-2002, 2004, 2006-2015 Glenn Randers-Pehrson, and are
 distributed according to the same disclaimer and license as libpng-1.0.6
 with the following individuals added to the list of Contributing Authors:
@@ -6206,7 +6207,7 @@
 
 Glenn Randers-Pehrson
 glennrp at users.sourceforge.net
-July 13, 2015
+July 23, 2015
 
 .\" end of man page
 
diff --git a/libpngpf.3 b/libpngpf.3
index e98edfe..f5511dd 100644
--- a/libpngpf.3
+++ b/libpngpf.3
@@ -1,6 +1,6 @@
-.TH LIBPNGPF 3 "July 13, 2015"
+.TH LIBPNGPF 3 "July 23, 2015"
 .SH NAME
-libpng \- Portable Network Graphics (PNG) Reference Library 1.6.18rc03
+libpng \- Portable Network Graphics (PNG) Reference Library 1.6.18
 (private functions)
 .SH SYNOPSIS
 \fB#include \fI"pngpriv.h"
diff --git a/png.5 b/png.5
index d1006e4..37a8525 100644
--- a/png.5
+++ b/png.5
@@ -1,4 +1,4 @@
-.TH PNG 5 "July 13, 2015"
+.TH PNG 5 "July 23, 2015"
 .SH NAME
 png \- Portable Network Graphics (PNG) format
 .SH DESCRIPTION
diff --git a/png.c b/png.c
index aa47afe..f6e353a 100644
--- a/png.c
+++ b/png.c
@@ -1,7 +1,7 @@
 
 /* png.c - location for general purpose libpng functions
  *
- * Last changed in libpng 1.6.18 [(PENDING RELEASE)]
+ * Last changed in libpng 1.6.18 [July 23, 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.)
@@ -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_6_18rc03 Your_png_h_is_not_version_1_6_18rc03;
+typedef png_libpng_version_1_6_18 Your_png_h_is_not_version_1_6_18;
 
 /* 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
@@ -766,13 +766,13 @@
 #else
 #  ifdef __STDC__
    return PNG_STRING_NEWLINE \
-      "libpng version 1.6.18rc03 - July 13, 2015" PNG_STRING_NEWLINE \
+      "libpng version 1.6.18 - July 23, 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.6.18rc03 - July 13, 2015\
+   return "libpng version 1.6.18 - July 23, 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 f13d7d6..f2013cf 100644
--- a/png.h
+++ b/png.h
@@ -1,7 +1,7 @@
 
 /* png.h - header file for PNG reference library
  *
- * libpng version 1.6.18rc03, July 13, 2015
+ * libpng version 1.6.18, July 23, 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.89, June 1996, through 0.96, May 1997: Andreas Dilger
- *   libpng versions 0.97, January 1998, through 1.6.18rc03, July 13, 2015: Glenn
+ *   libpng versions 0.97, January 1998, through 1.6.18, July 23, 2015: Glenn
  *   See also "Contributing Authors", below.
  *
  * Note about libpng version numbers:
@@ -218,6 +218,7 @@
  *    1.6.17                  16    10617  16.so.16.17[.0]
  *    1.6.18beta01-09         16    10618  16.so.16.18[.0]
  *    1.6.18rc01-03           16    10618  16.so.16.18[.0]
+ *    1.6.18                  16    10618  16.so.16.18[.0]
  *
  *   Henceforth the source version will match the shared-library major
  *   and minor numbers; the shared-library major version number will be
@@ -249,13 +250,12 @@
  *
  * This code is released under the libpng license.
  *
- * libpng versions 1.0.7, July 1, 2000, through 1.6.18rc03, July 13, 2015, are
+ * libpng versions 1.0.7, July 1, 2000, through 1.6.18, July 23, 2015, are
  * Copyright (c) 2000-2002, 2004, 2006-2015 Glenn Randers-Pehrson, and are
  * distributed according to the same disclaimer and license as libpng-1.0.6
  * with the following individuals added to the list of Contributing Authors:
  *
  *    Simon-Pierre Cadieux
- *    Eric S. Raymond
  *    Mans Rullgard
  *    Cosmin Truta
  *    Gilles Vollant
@@ -277,6 +277,7 @@
  *
  *    Tom Lane
  *    Glenn Randers-Pehrson
+ *    Eric S. Raymond
  *    Willem van Schaik
  *
  * libpng versions 0.89, June 1996, through 0.96, May 1997, are
@@ -358,13 +359,13 @@
  * Y2K compliance in libpng:
  * =========================
  *
- *    July 13, 2015
+ *    July 23, 2015
  *
  *    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.6.18rc03 are Y2K compliant.  It is my belief that
+ *    upward through 1.6.18 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
@@ -426,9 +427,9 @@
  */
 
 /* Version information for png.h - this should match the version in png.c */
-#define PNG_LIBPNG_VER_STRING "1.6.18rc03"
+#define PNG_LIBPNG_VER_STRING "1.6.18"
 #define PNG_HEADER_VERSION_STRING \
-     " libpng version 1.6.18rc03 - July 13, 2015\n"
+     " libpng version 1.6.18 - July 23, 2015\n"
 
 #define PNG_LIBPNG_VER_SONUM   16
 #define PNG_LIBPNG_VER_DLLNUM  16
@@ -442,7 +443,7 @@
  * PNG_LIBPNG_VER_STRING, omitting any leading zero:
  */
 
-#define PNG_LIBPNG_VER_BUILD  03
+#define PNG_LIBPNG_VER_BUILD  0
 
 /* Release Status */
 #define PNG_LIBPNG_BUILD_ALPHA    1
@@ -459,7 +460,7 @@
 #define PNG_LIBPNG_BUILD_SPECIAL 32 /* Cannot be OR'ed with
                                        PNG_LIBPNG_BUILD_PRIVATE */
 
-#define PNG_LIBPNG_BUILD_BASE_TYPE PNG_LIBPNG_BUILD_RC
+#define PNG_LIBPNG_BUILD_BASE_TYPE PNG_LIBPNG_BUILD_STABLE
 
 /* Careful here.  At one time, Guy wanted to use 082, but that would be octal.
  * We must not include leading zeros.
@@ -572,7 +573,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_6_18rc03;
+typedef char* png_libpng_version_1_6_18;
 
 /* Basic control structions.  Read libpng-manual.txt or libpng.3 for more info.
  *
diff --git a/pngconf.h b/pngconf.h
index fc29df3..62e37cf 100644
--- a/pngconf.h
+++ b/pngconf.h
@@ -1,7 +1,7 @@
 
 /* pngconf.h - machine configurable file for libpng
  *
- * libpng version 1.6.18rc03, (PENDING RELEASE)
+ * libpng version 1.6.18, July 23, 2015
  *
  * Copyright (c) 1998-2015 Glenn Randers-Pehrson
  * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
diff --git a/pngpread.c b/pngpread.c
index 6651c3d..2d4a862 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.6.18 [(PENDING RELEASE)]
+ * Last changed in libpng 1.6.18 [July 23, 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.)
diff --git a/pngpriv.h b/pngpriv.h
index cefb626..1997503 100644
--- a/pngpriv.h
+++ b/pngpriv.h
@@ -1,7 +1,7 @@
 
 /* pngpriv.h - private declarations for use inside libpng
  *
- * Last changed in libpng 1.6.18 [(PENDING RELEASE)]
+ * Last changed in libpng 1.6.18 [July 23, 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.)
diff --git a/pngrtran.c b/pngrtran.c
index 0de48e7..4c84d30 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.6.18 [(PENDING RELEASE)]
+ * Last changed in libpng 1.6.18 [July 23, 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.)
diff --git a/pngrutil.c b/pngrutil.c
index c0a8715..8f8edbc 100644
--- a/pngrutil.c
+++ b/pngrutil.c
@@ -1,7 +1,7 @@
 
 /* pngrutil.c - utilities to read a PNG file
  *
- * Last changed in libpng 1.6.18 [(PENDING RELEASE)]
+ * Last changed in libpng 1.6.18 [July 23, 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.)
diff --git a/pngset.c b/pngset.c
index d0f7f0a..5f62af1 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.6.18 [(PENDING RELEASE)]
+ * Last changed in libpng 1.6.18 [July 23, 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.)
diff --git a/pngstruct.h b/pngstruct.h
index a51123a..c8c0e46 100644
--- a/pngstruct.h
+++ b/pngstruct.h
@@ -1,7 +1,7 @@
 
 /* pngstruct.h - header file for PNG reference library
  *
- * Last changed in libpng 1.6.18 [(PENDING RELEASE)]
+ * Last changed in libpng 1.6.18 [July 23, 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.)
diff --git a/pngtest.c b/pngtest.c
index a3a9121..84745b6 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.18 [(PENDING RELEASE)]
+ * Last changed in libpng 1.6.18 [July 23, 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.)
@@ -2028,4 +2028,4 @@
 #endif
 
 /* Generate a compiler error if there is an old png.h in the search path. */
-typedef png_libpng_version_1_6_18rc03 Your_png_h_is_not_version_1_6_18rc03;
+typedef png_libpng_version_1_6_18 Your_png_h_is_not_version_1_6_18;
diff --git a/pngtrans.c b/pngtrans.c
index 6d5a0cf..4392017 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.6.18 [(PENDING RELEASE)]
+ * Last changed in libpng 1.6.18 [July 23, 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.)
diff --git a/pngwrite.c b/pngwrite.c
index ce410eb..3c8cbbe 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.6.18 [(PENDING RELEASE)]
+ * Last changed in libpng 1.6.18 [July 23, 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.)
@@ -125,7 +125,7 @@
        * Under certain circumstances the colorspace can be invalidated without
        * syncing the info_struct 'valid' flags; this happens if libpng detects
        * an error and calls png_error while the color space is being set, yet
-       * the * application continues writing the PNG.  So check the 'invalid'
+       * the application continues writing the PNG.  So check the 'invalid'
        * flag here too.
        */
 #ifdef PNG_GAMMA_SUPPORTED
diff --git a/pngwtran.c b/pngwtran.c
index 1a6f403..5dc9491 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.6.18 [(PENDING RELEASE)]
+ * Last changed in libpng 1.6.18 [July 23, 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.)
diff --git a/pngwutil.c b/pngwutil.c
index e2065bf..9e6019e 100644
--- a/pngwutil.c
+++ b/pngwutil.c
@@ -1,7 +1,7 @@
 
 /* pngwutil.c - utilities to write a PNG file
  *
- * Last changed in libpng 1.6.18 [(PENDING RELEASE)]
+ * Last changed in libpng 1.6.18 [July 23, 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.)
diff --git a/projects/vstudio/readme.txt b/projects/vstudio/readme.txt
index d997b97..096e86f 100644
--- a/projects/vstudio/readme.txt
+++ b/projects/vstudio/readme.txt
@@ -1,7 +1,7 @@
 
 VisualStudio instructions
 
-libpng version 1.6.18rc03 - July 13, 2015
+libpng version 1.6.18 - July 23, 2015
 
 Copyright (c) 1998-2010 Glenn Randers-Pehrson
 
diff --git a/projects/vstudio/zlib.props b/projects/vstudio/zlib.props
index ab7afb7..89c38f3 100644
--- a/projects/vstudio/zlib.props
+++ b/projects/vstudio/zlib.props
@@ -2,7 +2,7 @@
 <!--
  * zlib.props - location of zlib source
  *
- * libpng version 1.6.18rc03 - July 13, 2015
+ * libpng version 1.6.18 - July 23, 2015
  *
  * Copyright (c) 1998-2011 Glenn Randers-Pehrson
  *
diff --git a/scripts/README.txt b/scripts/README.txt
index fc5563f..7d98b66 100644
--- a/scripts/README.txt
+++ b/scripts/README.txt
@@ -1,9 +1,9 @@
 
-Makefiles for  libpng version 1.6.18rc03 - July 13, 2015
+Makefiles for  libpng version 1.6.18 - July 23, 2015
 
 pnglibconf.h.prebuilt       =>  Stores configuration settings
  makefile.linux    =>  Linux/ELF makefile
-                       (gcc, creates libpng16.so.16.1.6.18rc03)
+                       (gcc, creates libpng16.so.16.1.6.18)
  makefile.gcc      =>  Generic makefile (gcc, creates static libpng.a)
  makefile.knr      =>  Archaic UNIX Makefile that converts files with
                        ansi2knr (Requires ansi2knr.c from
@@ -33,12 +33,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 libpng16.so.16.1.6.18rc03)
+                       creates libpng16.so.16.1.6.18)
  makefile.sgi      =>  Silicon Graphics IRIX makefile (cc, creates static lib)
  makefile.solaris  =>  Solaris 2.X makefile (gcc,
-                       creates libpng16.so.16.1.6.18rc03)
+                       creates libpng16.so.16.1.6.18)
  makefile.so9      =>  Solaris 9 makefile (gcc,
-                       creates libpng16.so.16.1.6.18rc03)
+                       creates libpng16.so.16.1.6.18)
  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/def.c b/scripts/def.c
index 71222f4..ad68d3b 100644
--- a/scripts/def.c
+++ b/scripts/def.c
@@ -21,7 +21,7 @@
 PNG_DFN "OS2 CODE PRELOAD MOVEABLE DISCARDABLE"
 PNG_DFN ""
 PNG_DFN "EXPORTS"
-PNG_DFN ";Version 1.6.18rc03"
+PNG_DFN ";Version 1.6.18"
 
 #define PNG_EXPORTA(ordinal, type, name, args, attributes)\
         PNG_DFN "@" SYMBOL_PREFIX "@@" name "@"
diff --git a/scripts/libpng-config-head.in b/scripts/libpng-config-head.in
index 3750843..77fab38 100644
--- a/scripts/libpng-config-head.in
+++ b/scripts/libpng-config-head.in
@@ -11,7 +11,7 @@
 
 # Modeled after libxml-config.
 
-version=1.6.18rc03
+version=1.6.18
 prefix=""
 libdir=""
 libs=""
diff --git a/scripts/libpng.pc.in b/scripts/libpng.pc.in
index 1c75c07..d4536c5 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.6.18rc03
+Version: 1.6.18
 Libs: -L${libdir} -lpng16
 Cflags: -I${includedir}
diff --git a/scripts/makefile.ne12bsd b/scripts/makefile.ne12bsd
index 0e11473..cfcfcd3 100644
--- a/scripts/makefile.ne12bsd
+++ b/scripts/makefile.ne12bsd
@@ -17,7 +17,7 @@
 
 LIB=	png16
 SHLIB_MAJOR=	0
-SHLIB_MINOR=	1.6.18rc03
+SHLIB_MINOR=	1.6.18
 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 7675a93..079f708 100644
--- a/scripts/makefile.netbsd
+++ b/scripts/makefile.netbsd
@@ -17,7 +17,7 @@
 
 LIB=	png
 SHLIB_MAJOR=	16
-SHLIB_MINOR=	1.6.18rc03
+SHLIB_MINOR=	1.6.18
 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 f34f535..360efd1 100644
--- a/scripts/makefile.openbsd
+++ b/scripts/makefile.openbsd
@@ -11,7 +11,7 @@
 MANDIR= ${PREFIX}/man/cat
 
 SHLIB_MAJOR=	16
-SHLIB_MINOR=	1.6.18rc03
+SHLIB_MINOR=	1.6.18
 
 LIB=	png
 SRCS=	png.c pngerror.c pngget.c pngmem.c pngpread.c \
diff --git a/scripts/pnglibconf.h.prebuilt b/scripts/pnglibconf.h.prebuilt
index fe4d0a4..2719f00 100644
--- a/scripts/pnglibconf.h.prebuilt
+++ b/scripts/pnglibconf.h.prebuilt
@@ -1,8 +1,8 @@
-/* libpng 1.6.18rc03 STANDARD API DEFINITION */
+/* libpng 1.6.18 STANDARD API DEFINITION */
 
 /* pnglibconf.h - library build configuration */
 
-/* Libpng version 1.6.18rc03 - July 13, 2015 */
+/* Libpng version 1.6.18 - July 23, 2015 */
 
 /* Copyright (c) 1998-2014 Glenn Randers-Pehrson */
 
diff --git a/scripts/symbols.def b/scripts/symbols.def
index 6350c2b..2ec4605 100644
--- a/scripts/symbols.def
+++ b/scripts/symbols.def
@@ -1,4 +1,4 @@
-;Version 1.6.18rc03
+;Version 1.6.18
 ;--------------------------------------------------------------
 ; LIBPNG symbol list as a Win32 DEF file
 ; Contains all the symbols that can be exported from libpng