[libpng16] Imported from libpng-1.6.0beta01.tar
diff --git a/ANNOUNCE b/ANNOUNCE
index be3d323..3630278 100644
--- a/ANNOUNCE
+++ b/ANNOUNCE
@@ -1,5 +1,5 @@
 
-Libpng 1.6.0alpha01 - December 8, 2011
+Libpng 1.6.0beta01 - 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.
@@ -9,111 +9,28 @@
 Source files with LF line endings (for Unix/Linux) and with a
 "configure" script
 
-   1.6.0alpha01.tar.xz (LZMA-compressed, recommended)
-   1.6.0alpha01.tar.gz
-   1.6.0alpha01.tar.bz2
+   1.6.0beta01.tar.xz (LZMA-compressed, recommended)
+   1.6.0beta01.tar.gz
+   1.6.0beta01.tar.bz2
 
 Source files with CRLF line endings (for Windows), without the
 "configure" script
 
-   lp160a01.7z  (LZMA-compressed, recommended)
-   lp160a01.zip
+   lp160b01.7z  (LZMA-compressed, recommended)
+   lp160b01.zip
 
 Other information:
 
-   1.6.0alpha01-README.txt
-   1.6.0alpha01-LICENSE.txt
+   1.6.0beta01-README.txt
+   1.6.0beta01-LICENSE.txt
 
-Changes since the last public release (1.5.6):
+Changes since the last public release (1.5.7):
 
-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
-    of a png_struct or png_info failed. This would probably have led to a
-    crash.  The pngmem.c implementation of png_malloc() included a cast
-    to png_size_t which would fail on large allocations on 16-bit systems.
-  Fix for the preprocessor of the Intel C compiler. The preprocessor
-    splits adjacent @ signs with a space; this changes the concatentation
-    token from @-@-@ to PNG_JOIN; that should work with all compiler
-    preprocessors.
-  Paeth filter speed improvements from work by Siarhei Siamashka. This
-    changes the 'Paeth' reconstruction function to improve the GCC code
-    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
-    value unnecessarily on a 16-bit int system, so the cast of the (byte)
-    compression type to (int) is specified by ANSI-C anyway.
-  Fixed FP division by zero in pngvalid.c; the 'test_pixel' code left
-    the sBIT fields in the test pixel as 0, which resulted in a floating
-    point division by zero which was irrelevant but causes systems where
-    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.
-  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
-    without throwing away useful error information.  This change adds
-    png_voidcast to allow C semantic (void*) cases or the corresponding
-    C++ static_cast operation, as appropriate.
-  Added --noexecstack to assembler file compilation. GCC does not set
-    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 [(PENDING RELEASE)]
-  Removed "zTXt" from warning in generic chunk decompression function.
-  Validate time settings passed to pngset() and png_convert_to_rfc1123()
-    (Frank Busse).
-  Allow row_stride==0 to indicate default stride in simplified API.
-  Added MINGW support to CMakeLists.txt
-  Reject invalid compression flag or method when reading the iTXt chunk.
-
-Version 1.6.0alpha01 [December 8, 2011]
+Version 1.6.0beta01 [December 15, 2011]
   Removed machine-generated configure files from the GIT repository (they will
     continue to appear in the tarball distributions).
   Restored the new 'simplified' API, which was deleted from libpng-1.5.7.
   Added example programs for the new 'simplified' API.
-  Moved pngvalid.c into contrib/libtests
-  Rebuilt Makefile.in, configure, etc., with autoconf-2.68
   Added ANSI-C (C90) headers and require them, and take advantage of the
     change. Also fixed some of the projects/* and contrib/* files that needed
     updates for libpng16 and the move of pngvalid.c.
@@ -129,19 +46,22 @@
     seems likely that it will ask 'malloc' for more than 65535 bytes with any
     image that has a sufficiently large row size (rather than simply failing
     to read such images).
-  Replaced an "#if" with "ifdef" in pngrtran.c
   New tools directory containing tools used to generate libpng code.
-  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.
-  Fixed minor memset/sizeof errors in pngvalid.c.
   Fixed race conditions in parallel make builds. With higher degrees of
     parallelism during 'make' the use of the same temporary file names such
     as 'dfn*' can result in a race where a temporary file from one arm of the
     build is deleted or overwritten in another arm.  This changes the
     temporary files for suffix rules to always use $* and ensures that the
     non-suffix rules use unique file names.
-  Updated CMakeLists.txt to account for relocated and new test programs.
+
+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
+
+Glenn R-P
+#endif
 
 Send comments/corrections/commendations to png-mng-implement at lists.sf.net:
 (subscription required; visit
diff --git a/CHANGES b/CHANGES
index 546780b..5bfd1ba 100644
--- a/CHANGES
+++ b/CHANGES
@@ -3744,21 +3744,44 @@
     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 [(PENDING RELEASE)]
+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).
-  Allow row_stride==0 to indicate default stride in simplified API.
   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.6.0alpha01 [December 8, 2011]
+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 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.
+  Fixed minor memset/sizeof errors in pngvalid.c.
+
+Version 1.6.0beta01 [December 15, 2011]
   Removed machine-generated configure files from the GIT repository (they will
     continue to appear in the tarball distributions).
   Restored the new 'simplified' API, which was deleted from libpng-1.5.7.
   Added example programs for the new 'simplified' API.
-  Moved pngvalid.c into contrib/libtests
-  Rebuilt Makefile.in, configure, etc., with autoconf-2.68
   Added ANSI-C (C90) headers and require them, and take advantage of the
     change. Also fixed some of the projects/* and contrib/* files that needed
     updates for libpng16 and the move of pngvalid.c.
@@ -3774,20 +3797,13 @@
     seems likely that it will ask 'malloc' for more than 65535 bytes with any
     image that has a sufficiently large row size (rather than simply failing
     to read such images).
-  Replaced an "#if" with "ifdef" in pngrtran.c
   New tools directory containing tools used to generate libpng code.
-  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.
-  Fixed minor memset/sizeof errors in pngvalid.c.
   Fixed race conditions in parallel make builds. With higher degrees of
     parallelism during 'make' the use of the same temporary file names such
     as 'dfn*' can result in a race where a temporary file from one arm of the
     build is deleted or overwritten in another arm.  This changes the
     temporary files for suffix rules to always use $* and ensures that the
     non-suffix rules use unique file names.
-  Updated CMakeLists.txt to account for relocated and new test programs.
-
 
 Send comments/corrections/commendations to png-mng-implement at lists.sf.net
 (subscription required; visit
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 08c90c3..9dcbd01 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -264,7 +264,7 @@
 # SET UP LINKS
 if(PNG_SHARED)
   set_target_properties(${PNG_LIB_NAME} PROPERTIES
-#   VERSION 16.${PNGLIB_RELEASE}.1.6.0alpha01
+#   VERSION 16.${PNGLIB_RELEASE}.1.6.0beta01
     VERSION 16.${PNGLIB_RELEASE}.0
     SOVERSION 16
     CLEAN_DIRECT_OUTPUT 1)
diff --git a/LICENSE b/LICENSE
index aa028ca..3dbd596 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.6.0alpha01, December 5, 2011, are
+libpng versions 1.2.6, August 15, 2004, through 1.6.0beta01, 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 aef7ff3..846aadd 100644
--- a/README
+++ b/README
@@ -1,4 +1,4 @@
-README for libpng version 1.6.0alpha01 - December 5, 2011 (shared library 16.0)
+README for libpng version 1.6.0beta01 - December 15, 2011 (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 5416148..7606db2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -18,12 +18,12 @@
 
 dnl Version number stuff here:
 
-AC_INIT([libpng], [1.6.0alpha01], [png-mng-implement@lists.sourceforge.net])
+AC_INIT([libpng], [1.6.0beta01], [png-mng-implement@lists.sourceforge.net])
 AM_INIT_AUTOMAKE
 dnl stop configure from automagically running automake
 AM_MAINTAINER_MODE
 
-PNGLIB_VERSION=1.6.0alpha01
+PNGLIB_VERSION=1.6.0beta01
 PNGLIB_MAJOR=1
 PNGLIB_MINOR=6
 PNGLIB_RELEASE=0
diff --git a/contrib/libtests/pngvalid.c b/contrib/libtests/pngvalid.c
index 5ce43d3..2b24039 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: */
@@ -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/contrib/libtests/timepng.c b/contrib/libtests/timepng.c
index 1ee384b..4e825bc 100644
--- a/contrib/libtests/timepng.c
+++ b/contrib/libtests/timepng.c
@@ -14,8 +14,11 @@
  * does no transforms.  The only output is a time as a floating point number of
  * seconds with 9 decimal digits.
  */
+#define _POSIX_C_SOURCE 199309L /* for clock_gettime */
+
 #include <stdlib.h>
 #include <stdio.h>
+#include <string.h>
 
 #include <time.h>
 
diff --git a/libpng-manual.txt b/libpng-manual.txt
index 8579c9c..d5cbe6a 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.0alpha01 - December 5, 2011
+ libpng version 1.6.0beta01 - 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.6.0alpha01 - December 5, 2011
+ libpng versions 0.97, January 1998, through 1.6.0beta01 - 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.6.0alpha01 are Y2K compliant.  It is my belief that earlier
+upward through 1.6.0beta01 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 82febeb..6aa00ec 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.6.0alpha01
+libpng \- Portable Network Graphics (PNG) Reference Library 1.6.0beta01
 .SH SYNOPSIS
 \fI\fB
 
@@ -1007,7 +1007,7 @@
 .SH LIBPNG.TXT
 libpng-manual.txt - A description on how to use and modify libpng
 
- libpng version 1.6.0alpha01 - December 5, 2011
+ libpng version 1.6.0beta01 - December 15, 2011
  Updated and distributed by Glenn Randers-Pehrson
  <glennrp at users.sourceforge.net>
  Copyright (c) 1998-2011 Glenn Randers-Pehrson
@@ -1018,7 +1018,7 @@
 
  Based on:
 
- libpng versions 0.97, January 1998, through 1.6.0alpha01 - December 5, 2011
+ libpng versions 0.97, January 1998, through 1.6.0beta01 - December 15, 2011
  Updated and distributed by Glenn Randers-Pehrson
  Copyright (c) 1998-2011 Glenn Randers-Pehrson
 
@@ -5581,13 +5581,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.6.0alpha01 are Y2K compliant.  It is my belief that earlier
+upward through 1.6.0beta01 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
@@ -5790,7 +5790,7 @@
  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.6.0alpha01        16    10600  16.so.16.0[.0]
+ 1.6.0beta01         16    10600  16.so.16.0[.0]
 
 Henceforth the source version will match the shared-library minor
 and patch numbers; the shared-library major version number will be
@@ -5847,7 +5847,7 @@
 
 Thanks to Frank J. T. Wojcik for helping with the documentation.
 
-Libpng version 1.6.0alpha01 - December 5, 2011:
+Libpng version 1.6.0beta01 - 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).
 
@@ -5870,7 +5870,7 @@
 
 This code is released under the libpng license.
 
-libpng versions 1.2.6, August 15, 2004, through 1.6.0alpha01, December 5, 2011, are
+libpng versions 1.2.6, August 15, 2004, through 1.6.0beta01, 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
@@ -5969,7 +5969,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 9e6c569..d15fe39 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.6.0alpha01
+libpng \- Portable Network Graphics (PNG) Reference Library 1.6.0beta01
 (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 70b9222..85915a8 100644
--- a/png.c
+++ b/png.c
@@ -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_0alpha01 Your_png_h_is_not_version_1_6_0alpha01;
+typedef png_libpng_version_1_6_0beta01 Your_png_h_is_not_version_1_6_0beta01;
 
 /* 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.6.0alpha01 - December 5, 2011" PNG_STRING_NEWLINE \
+     "libpng version 1.6.0beta01 - 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.6.0alpha01 - December 5, 2011\
+      return "libpng version 1.6.0beta01 - 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 9ba16de..3cfe777 100644
--- a/png.h
+++ b/png.h
@@ -1,7 +1,7 @@
 
 /* png.h - header file for PNG reference library
  *
- * libpng version 1.6.0alpha01 - December 5, 2011
+ * libpng version 1.6.0beta01 - 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.6.0alpha01 - December 5, 2011: Glenn
+ *   libpng versions 0.97, January 1998, through 1.6.0beta01 - December 15, 2011: Glenn
  *   See also "Contributing Authors", below.
  *
  * Note about libpng version numbers:
@@ -164,7 +164,7 @@
  *    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.6.0alpha01            16    10600  16.so.16.0[.0]
+ *    1.6.0beta01             16    10600  16.so.16.0[.0]
  *
  *   Henceforth the source version will match the shared-library major
  *   and minor numbers; the shared-library major version number will be
@@ -196,7 +196,7 @@
  *
  * This code is released under the libpng license.
  *
- * libpng versions 1.2.6, August 15, 2004, through 1.6.0alpha01, December 5, 2011, are
+ * libpng versions 1.2.6, August 15, 2004, through 1.6.0beta01, 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 +308,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.6.0alpha01 are Y2K compliant.  It is my belief that
+ *    upward through 1.6.0beta01 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 +372,9 @@
  */
 
 /* Version information for png.h - this should match the version in png.c */
-#define PNG_LIBPNG_VER_STRING "1.6.0alpha01"
+#define PNG_LIBPNG_VER_STRING "1.6.0beta01"
 #define PNG_HEADER_VERSION_STRING \
-     " libpng version 1.6.0alpha01 - December 5, 2011\n"
+     " libpng version 1.6.0beta01 - December 15, 2011\n"
 
 #define PNG_LIBPNG_VER_SONUM   16
 #define PNG_LIBPNG_VER_DLLNUM  16
@@ -518,7 +518,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_0alpha01;
+typedef char* png_libpng_version_1_6_0beta01;
 
 /* 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 d5b1d62..2fc4364 100644
--- a/pngconf.h
+++ b/pngconf.h
@@ -1,7 +1,7 @@
 
 /* pngconf.h - machine configurable file for libpng
  *
- * libpng version 1.6.0alpha01 - December 5, 2011
+ * libpng version 1.6.0beta01 - December 15, 2011
  *
  * Copyright (c) 1998-2011 Glenn Randers-Pehrson
  * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
diff --git a/pngtest.c b/pngtest.c
index 29a0053..ddc612b 100644
--- a/pngtest.c
+++ b/pngtest.c
@@ -1672,4 +1672,4 @@
 }
 
 /* Generate a compiler error if there is an old png.h in the search path. */
-typedef png_libpng_version_1_6_0alpha01 Your_png_h_is_not_version_1_6_0alpha01;
+typedef png_libpng_version_1_6_0beta01 Your_png_h_is_not_version_1_6_0beta01;
diff --git a/projects/vstudio/readme.txt b/projects/vstudio/readme.txt
index fdb689e..8b1de2d 100644
--- a/projects/vstudio/readme.txt
+++ b/projects/vstudio/readme.txt
@@ -1,7 +1,7 @@
 
 VisualStudio instructions
 
-libpng version 1.6.0alpha01 - December 5, 2011
+libpng version 1.6.0beta01 - December 15, 2011
 
 Copyright (c) 1998-2010 Glenn Randers-Pehrson
 
diff --git a/projects/vstudio/zlib.props b/projects/vstudio/zlib.props
index b201df9..17424eb 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.0alpha01 - December 5, 2011
+ * libpng version 1.6.0beta01 - December 15, 2011
  *
  * Copyright (c) 1998-2011 Glenn Randers-Pehrson
  *
diff --git a/scripts/README.txt b/scripts/README.txt
index f0a8a91..36cb70c 100644
--- a/scripts/README.txt
+++ b/scripts/README.txt
@@ -1,9 +1,9 @@
 
-Makefiles for  libpng version 1.6.0alpha01 - December 5, 2011
+Makefiles for  libpng version 1.6.0beta01 - December 15, 2011
 
 pnglibconf.h.prebuilt       =>  Stores configuration settings
  makefile.linux    =>  Linux/ELF makefile
-                       (gcc, creates libpng16.so.16.1.6.0alpha01)
+                       (gcc, creates libpng16.so.16.1.6.0beta01)
  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 libpng16.so.16.1.6.0alpha01)
+                       (gcc, creates libpng16.so.16.1.6.0beta01)
  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 libpng16.so.16.1.6.0alpha01)
+                       creates libpng16.so.16.1.6.0beta01)
  makefile.sgi      =>  Silicon Graphics IRIX makefile (cc, creates static lib)
  makefile.solaris  =>  Solaris 2.X makefile (gcc,
-                       creates libpng16.so.16.1.6.0alpha01)
+                       creates libpng16.so.16.1.6.0beta01)
  makefile.so9      =>  Solaris 9 makefile (gcc,
-                       creates libpng16.so.16.1.6.0alpha01)
+                       creates libpng16.so.16.1.6.0beta01)
  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 c66fd85..1cbc0d3 100755
--- a/scripts/libpng-config-head.in
+++ b/scripts/libpng-config-head.in
@@ -11,7 +11,7 @@
 
 # Modeled after libxml-config.
 
-version=1.6.0alpha01
+version=1.6.0beta01
 prefix=""
 libdir=""
 libs=""
diff --git a/scripts/libpng.pc.in b/scripts/libpng.pc.in
index 1070772..85844ba 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.0alpha01
+Version: 1.6.0beta01
 Libs: -L${libdir} -lpng16
 Cflags: -I${includedir}
diff --git a/scripts/makefile.ne12bsd b/scripts/makefile.ne12bsd
index c7fee06..93d4aac 100644
--- a/scripts/makefile.ne12bsd
+++ b/scripts/makefile.ne12bsd
@@ -17,7 +17,7 @@
 
 LIB=	png16
 SHLIB_MAJOR=	0
-SHLIB_MINOR=	1.6.0alpha01
+SHLIB_MINOR=	1.6.0beta01
 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 c07f95c..e08a0bd 100644
--- a/scripts/makefile.netbsd
+++ b/scripts/makefile.netbsd
@@ -17,7 +17,7 @@
 
 LIB=	png
 SHLIB_MAJOR=	16
-SHLIB_MINOR=	1.6.0alpha01
+SHLIB_MINOR=	1.6.0beta01
 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 5e6d251..7d32327 100644
--- a/scripts/makefile.openbsd
+++ b/scripts/makefile.openbsd
@@ -11,7 +11,7 @@
 MANDIR= ${PREFIX}/man/cat
 
 SHLIB_MAJOR=	16
-SHLIB_MINOR=	1.6.0alpha01
+SHLIB_MINOR=	1.6.0beta01
 
 LIB=	png
 SRCS=	png.c pngerror.c pngget.c pngmem.c pngpread.c \
diff --git a/scripts/pnglibconf.dfa b/scripts/pnglibconf.dfa
index 548c661..d3d199d 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 9284a61..fa90fb2 100644
--- a/scripts/pnglibconf.h.prebuilt
+++ b/scripts/pnglibconf.h.prebuilt
@@ -3,7 +3,7 @@
 
 /* pnglibconf.h - library build configuration */
 
-/* Libpng 1.6.0alpha01 - December 5, 2011 */
+/* Libpng 1.6.0beta01 - December 15, 2011 */
 
 /* Copyright (c) 1998-2011 Glenn Randers-Pehrson */
 
diff --git a/scripts/symbols.def b/scripts/symbols.def
index 97744f3..3024ccd 100644
--- a/scripts/symbols.def
+++ b/scripts/symbols.def
@@ -5,7 +5,7 @@
 LIBRARY
 
 EXPORTS
-;Version 1.6.0alpha01
+;Version 1.6.0beta01
  png_access_version_number @1
  png_set_sig_bytes @2
  png_sig_cmp @3