Imported from libpng-1.4.0beta35.tar
diff --git a/ANNOUNCE b/ANNOUNCE
index f6f1e2a..c70bb20 100644
--- a/ANNOUNCE
+++ b/ANNOUNCE
@@ -1,5 +1,5 @@
 
-Libpng 1.4.0beta34 - September 6, 2008
+Libpng 1.4.0beta35 - October 6, 2008
 
 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,27 +9,27 @@
 Source files with LF line endings (for Unix/Linux) and with a
 "configure" script
 
-   1.4.0beta34.tar.gz
-   1.4.0beta34.tar.bz2
+   1.4.0beta35.tar.gz
+   1.4.0beta35.tar.bz2
 
 Source files with LF line endings (for Unix/Linux) without the
 "configure" script
 
-   1.4.0beta34-no-config.tar.gz
-   1.4.0beta34-no-config.tar.bz2
+   1.4.0beta35-no-config.tar.gz
+   1.4.0beta35-no-config.tar.bz2
 
 Source files with CRLF line endings (for Windows), without the
 "configure" script
 
-   lp140b34.zip
-   lp140b34.tar.bz2
+   lp140b35.zip
+   lp140b35.tar.bz2
 
 Other information:
 
-   1.4.0beta34-README.txt
-   1.4.0beta34-KNOWNBUGS.txt
-   1.4.0beta34-LICENSE.txt
-   1.4.0beta34-Y2K-compliance.txt
+   1.4.0beta35-README.txt
+   1.4.0beta35-KNOWNBUGS.txt
+   1.4.0beta35-LICENSE.txt
+   1.4.0beta35-Y2K-compliance.txt
 
 Changes since the last public release (1.2.10):
 
@@ -324,7 +324,13 @@
 
 version 1.4.0beta34 [September 6, 2008]
   Shortened tIME_string to 29 bytes in pngtest.c
-  Fixed off-by-one error introduced in in libpng-1.2.30beta04/pngpread.c
+  Fixed off-by-one error introduced in png_push_read_zTXt() function in
+    libpng-1.2.30beta04/pngpread.c (Harald van Dijk)
+
+version 1.4.0beta35 [October 6, 2008]
+  Changed "trans_values" to "trans_color".
+  Change png_set_gray_1_2_4_to_8() to png_set_expand_gray_1_2_4_to_8()
+    in example.c (debian bug report)
 
 version 1.4.0betaN [future]
   Build shared libraries with -lz and sometimes -lm.
diff --git a/CHANGES b/CHANGES
index 3527ad6..11b4607 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1997,7 +1997,15 @@
 
 version 1.4.0beta34 [September 6, 2008]
   Shortened tIME_string to 29 bytes in pngtest.c
-  Fixed off-by-one error introduced in in libpng-1.2.30beta04/pngpread.c
+  Fixed off-by-one error introduced in png_push_read_zTXt() function in
+    libpng-1.2.30beta04/pngpread.c (Harald van Dijk)
+
+version 1.4.0beta35 [October 6, 2008]
+  Changed "trans_values" to "trans_color".
+  Changed so-number from 0 to 14.  Some OS do not like 0.
+  Revised makefile.darwin to fix shared library numbering.
+  Change png_set_gray_1_2_4_to_8() to png_set_expand_gray_1_2_4_to_8()
+    in example.c (debian bug report)
 
 version 1.4.0betaN [future]
   Build shared libraries with -lz and sometimes -lm.
diff --git a/INSTALL b/INSTALL
index e4f255d..a2f9bdc 100644
--- a/INSTALL
+++ b/INSTALL
@@ -1,5 +1,5 @@
 
-Installing libpng version 1.4.0beta34 - September 6, 2008
+Installing libpng version 1.4.0beta35 - October 6, 2008
 
 On Unix/Linux and similar systems, you can simply type
 
@@ -44,7 +44,7 @@
 correspond to the version of zlib that's installed.
 
 You can rename the directories that you downloaded (they
-might be called "libpng-1.4.0beta34" or "lpng109" and "zlib-1.2.1"
+might be called "libpng-1.4.0beta35" or "lpng109" and "zlib-1.2.1"
 or "zlib121") so that you have directories called "zlib" and "libpng".
 
 Your directory structure should look like this:
@@ -95,14 +95,14 @@
  CMakeLists.txt    =>  "cmake" script
  makefile.std      =>  Generic UNIX makefile (cc, creates static libpng.a)
  makefile.elf      =>  Linux/ELF makefile symbol versioning,
-                       gcc, creates libpng14.so.0.1.4.0beta34)
+                       gcc, creates libpng14.so.14.1.4.0beta35)
  makefile.linux    =>  Linux/ELF makefile
-                       (gcc, creates libpng14.so.0.1.4.0beta34)
+                       (gcc, creates libpng14.so.14.1.4.0beta35)
  makefile.gcmmx    =>  Linux/ELF makefile
-                       (gcc, creates libpng14.so.0.1.4.0beta34,
+                       (gcc, creates libpng14.so.14.1.4.0beta35,
                        uses assembler code tuned for Intel MMX platform)
  makefile.nommx    =>  Linux/ELF makefile
-                       (gcc, creates libpng14.so.0.1.4.0beta34
+                       (gcc, creates libpng14.so.14.1.4.0beta35
                        does not use Intel MMX assembler code)
  makefile.gcc      =>  Generic makefile (gcc, creates static libpng.a)
  makefile.knr      =>  Archaic UNIX Makefile that converts files with
@@ -125,12 +125,12 @@
  makefile.openbsd  =>  OpenBSD makefile
  makefile.sgi      =>  Silicon Graphics IRIX makefile (cc, creates static lib)
  makefile.sggcc    =>  Silicon Graphics (gcc,
-                       creates libpng14.so.0.1.4.0beta34)
+                       creates libpng14.so.14.1.4.0beta35)
  makefile.sunos    =>  Sun makefile
  makefile.solaris  =>  Solaris 2.X makefile (gcc,
-                       creates libpng14.so.0.1.4.0beta34)
+                       creates libpng14.so.14.1.4.0beta35)
  makefile.so9      =>  Solaris 9 makefile (gcc,
-                       creates libpng14.so.0.1.4.0beta34)
+                       creates libpng14.so.14.1.4.0beta35)
  makefile.32sunu   =>  Sun Ultra 32-bit makefile
  makefile.64sunu   =>  Sun Ultra 64-bit makefile
  makefile.sco      =>  For SCO OSr5  ELF and Unixware 7 with Native cc
diff --git a/KNOWNBUG b/KNOWNBUG
index 2b207ef..06d6a96 100644
--- a/KNOWNBUG
+++ b/KNOWNBUG
@@ -1,5 +1,5 @@
 
-Known bugs in libpng version 1.4.0beta34
+Known bugs in libpng version 1.4.0beta35
 
 1. April 22, 2001: pnggccrd.c has been reported to crash on NetBSD when
    reading interlaced PNG files, when assembler code is enabled but running
diff --git a/LICENSE b/LICENSE
index 289707a..260aa24 100644
--- a/LICENSE
+++ b/LICENSE
@@ -8,7 +8,7 @@
 If you modify libpng you may insert additional notices immediately following
 this sentence.
 
-libpng versions 1.2.6, August 15, 2004, through 1.4.0beta34, September 6, 2008, are
+libpng versions 1.2.6, August 15, 2004, through 1.4.0beta35, October 6, 2008, 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
@@ -106,4 +106,4 @@
 
 Glenn Randers-Pehrson
 glennrp at users.sourceforge.net
-September 6, 2008
+October 6, 2008
diff --git a/Makefile.am b/Makefile.am
index 3191da1..8b755a0 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -86,7 +86,7 @@
 	${srcdir}/contrib/pngsuite/* \
 	${srcdir}/contrib/visupng/* \
 	$(TESTS) \
-	example.c libpng-1.4.0beta34.txt pngvcrd.c 
+	example.c libpng-1.4.0beta35.txt pngvcrd.c 
 
 CLEANFILES= pngout.png libpng14.pc libpng14-config libpng.vers \
 libpng.sym
diff --git a/Makefile.in b/Makefile.in
index 39f8c31..4c73b19 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -331,7 +331,7 @@
 	${srcdir}/contrib/pngsuite/* \
 	${srcdir}/contrib/visupng/* \
 	$(TESTS) \
-	example.c libpng-1.4.0beta34.txt pngvcrd.c 
+	example.c libpng-1.4.0beta35.txt pngvcrd.c 
 
 CLEANFILES = pngout.png libpng14.pc libpng14-config libpng.vers \
 libpng.sym
diff --git a/README b/README
index 565b785..f9250a2 100644
--- a/README
+++ b/README
@@ -1,4 +1,4 @@
-README for libpng version 1.4.0beta34 - September 6, 2008 (shared library 14.0)
+README for libpng version 1.4.0beta35 - October 6, 2008 (shared library 14.0)
 See the note about version numbers near the top of png.h
 
 See INSTALL for instructions on how to install libpng.
@@ -184,11 +184,11 @@
        descrip.mms      =>  VMS makefile for MMS or MMK
        makefile.std     =>  Generic UNIX makefile (cc, creates static libpng.a)
        makefile.elf     =>  Linux/ELF makefile symbol versioning,
-                            gcc, creates libpng14.so.0.1.4.0beta34)
+                            gcc, creates libpng14.so.14.1.4.0beta35)
        makefile.linux   =>  Linux/ELF makefile
-                            (gcc, creates libpng14.so.0.1.4.0beta34)
+                            (gcc, creates libpng14.so.14.1.4.0beta35)
        makefile.gcmmx   =>  Linux/ELF makefile
-                            (gcc, creates libpng14.so.0.1.4.0beta34,
+                            (gcc, creates libpng14.so.14.1.4.0beta35,
                             uses assembler code tuned for Intel MMX platform)
        makefile.gcc     =>  Generic makefile (gcc, creates static libpng.a)
        makefile.knr     =>  Archaic UNIX Makefile that converts files with
@@ -210,12 +210,12 @@
        makefile.openbsd =>  OpenBSD makefile
        makefile.sgi     =>  Silicon Graphics IRIX (cc, creates static lib)
        makefile.sggcc   =>  Silicon Graphics
-                            (gcc, creates libpng14.so.0.1.4.0beta34)
+                            (gcc, creates libpng14.so.14.1.4.0beta35)
        makefile.sunos   =>  Sun makefile
        makefile.solaris =>  Solaris 2.X makefile
-                            (gcc, creates libpng14.so.0.1.4.0beta34)
+                            (gcc, creates libpng14.so.14.1.4.0beta35)
        makefile.so9     =>  Solaris 9 makefile
-                            (gcc, creates libpng14.so.0.1.4.0beta34)
+                            (gcc, creates libpng14.so.14.1.4.0beta35)
        makefile.32sunu  =>  Sun Ultra 32-bit makefile
        makefile.64sunu  =>  Sun Ultra 64-bit makefile
        makefile.sco     =>  For SCO OSr5  ELF and Unixware 7 with Native cc
diff --git a/configure b/configure
index ebf5555..4458984 100755
--- a/configure
+++ b/configure
Binary files differ
diff --git a/configure.ac b/configure.ac
index 5182e91..2c51140 100644
--- a/configure.ac
+++ b/configure.ac
@@ -18,12 +18,12 @@
 
 dnl Version number stuff here:
 
-AC_INIT([libpng], [1.4.0beta34], [png-mng-implement@lists.sourceforge.net])
+AC_INIT([libpng], [1.4.0beta35], [png-mng-implement@lists.sourceforge.net])
 AM_INIT_AUTOMAKE
 dnl stop configure from automagically running automake
 AM_MAINTAINER_MODE
 
-PNGLIB_VERSION=1.4.0beta34
+PNGLIB_VERSION=1.4.0beta35
 PNGLIB_MAJOR=1
 PNGLIB_MINOR=4
 PNGLIB_RELEASE=0
diff --git a/example.c b/example.c
index 894897c..9c5a88e 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.4.0 [September 6, 2008]
+ * Last changed in libpng 1.4.0 [October 6, 2008]
  * This file has been placed in the public domain by the authors.
  * Maintained 1998-2008 Glenn Randers-Pehrson
  * Maintained 1996, 1997 Andreas Dilger)
@@ -204,7 +204,7 @@
 
    /* Expand grayscale images to the full 8 bits from 1, 2, or 4 bits/pixel */
    if (color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8)
-      png_set_gray_1_2_4_to_8(png_ptr);
+      png_set_expand_gray_1_2_4_to_8(png_ptr);
 
    /* Expand paletted or RGB images with transparency to full alpha channels
     * so the data will be available as RGBA quartets.
diff --git a/libpng-1.4.0beta34.txt b/libpng-1.4.0beta35.txt
similarity index 95%
rename from libpng-1.4.0beta34.txt
rename to libpng-1.4.0beta35.txt
index 753b7f9..6f2ba3b 100644
--- a/libpng-1.4.0beta34.txt
+++ b/libpng-1.4.0beta35.txt
@@ -1,6 +1,6 @@
 libpng.txt - A description on how to use and modify libpng
 
- libpng version 1.4.0beta34 - September 6, 2008
+ libpng version 1.4.0beta35 - October 6, 2008
  Updated and distributed by Glenn Randers-Pehrson
  <glennrp at users.sourceforge.net>
  Copyright (c) 1998-2005 Glenn Randers-Pehrson
@@ -82,9 +82,7 @@
 instances of the structures.  Each thread should have its own
 png_struct and png_info instances, and thus its own image.
 Libpng does not protect itself against two threads using the
-same instance of a structure.  Note: thread safety may be defeated
-by use of some of the MMX assembler code in pnggccrd.c, which is only
-compiled when the user defines PNG_THREAD_UNSAFE_OK.
+same instance of a structure.
 
 II. Structures
 
@@ -585,10 +583,10 @@
                      given color type (png_color_16)
 
     png_get_tRNS(png_ptr, info_ptr, &trans, &num_trans,
-                     &trans_values);
+                     &trans_color);
     trans          - array of transparent entries for
                      palette (PNG_INFO_tRNS)
-    trans_values   - graylevel or color sample values of
+    trans_color    - graylevel or color sample values of
                      the single transparent color for
                      non-paletted images (PNG_INFO_tRNS)
     num_trans      - number of transparent entries
@@ -1817,10 +1815,10 @@
                      (png_color_16)
 
     png_set_tRNS(png_ptr, info_ptr, trans, num_trans,
-       trans_values);
+       trans_color);
     trans          - array of transparent entries for
                      palette (PNG_INFO_tRNS)
-    trans_values   - graylevel or color sample values of
+    trans_color    - graylevel or color sample values of
                      the single transparent color for
                      non-paletted images (PNG_INFO_tRNS)
     num_trans      - number of transparent entries
@@ -2742,126 +2740,7 @@
 having level = 0 will be printed.  There aren't any such statements in
 this version of libpng, but if you insert some they will be printed.
 
-VI.  Runtime optimization
-
-A new feature in libpng 1.2.0 is the ability to dynamically switch between
-standard and optimized versions of some routines.  Currently these are
-limited to three computationally intensive tasks when reading PNG files:
-decoding row filters, expanding interlacing, and combining interlaced or
-transparent row data with previous row data.  Currently the optimized
-versions are available only for x86 (Intel, AMD, etc.) platforms with
-MMX support, though this may change in future versions.  (For example,
-the non-MMX assembler optimizations for zlib might become similarly
-runtime-selectable in future releases, in which case libpng could be
-extended to support them.  Alternatively, the compile-time choice of
-floating-point versus integer routines for gamma correction might become
-runtime-selectable.)
-
-Because such optimizations tend to be very platform- and compiler-dependent,
-both in how they are written and in how they perform, the new runtime code
-in libpng has been written to allow programs to query, enable, and disable
-either specific optimizations or all such optimizations.  For example, to
-enable all possible optimizations (bearing in mind that some "optimizations"
-may actually run more slowly in rare cases):
-
-    #if defined(PNG_LIBPNG_VER) && (PNG_LIBPNG_VER >= 10200)
-       png_uint_32 mask, flags;
-
-       flags = png_get_asm_flags(png_ptr);
-       mask = png_get_asm_flagmask(PNG_SELECT_READ | PNG_SELECT_WRITE);
-       png_set_asm_flags(png_ptr, flags | mask);
-    #endif
-
-To enable only optimizations relevant to reading PNGs, use PNG_SELECT_READ
-by itself when calling png_get_asm_flagmask(); similarly for optimizing
-only writing.  To disable all optimizations:
-
-    #if defined(PNG_LIBPNG_VER) && (PNG_LIBPNG_VER >= 10200)
-       flags = png_get_asm_flags(png_ptr);
-       mask = png_get_asm_flagmask(PNG_SELECT_READ | PNG_SELECT_WRITE);
-       png_set_asm_flags(png_ptr, flags & ~mask);
-    #endif
-
-To enable or disable only MMX-related features, use png_get_mmx_flagmask()
-in place of png_get_asm_flagmask().  The mmx version takes one additional
-parameter:
-
-    #if defined(PNG_LIBPNG_VER) && (PNG_LIBPNG_VER >= 10200)
-       int selection = PNG_SELECT_READ | PNG_SELECT_WRITE;
-       int compilerID;
-
-       mask = png_get_mmx_flagmask(selection, &compilerID);
-    #endif
-
-On return, compilerID will indicate which version of the MMX assembler
-optimizations was compiled.  Currently two flavors exist:  Microsoft
-Visual C++ (compilerID == 1) and GNU C (a.k.a. gcc/gas, compilerID == 2).
-On non-x86 platforms or on systems compiled without MMX optimizations, a
-value of -1 is used.
-
-Note that both png_get_asm_flagmask() and png_get_mmx_flagmask() return
-all valid, settable optimization bits for the version of the library that's
-currently in use.  In the case of shared (dynamically linked) libraries,
-this may include optimizations that did not exist at the time the code was
-written and compiled.  It is also possible, of course, to enable only known,
-specific optimizations; for example:
-
-    #if defined(PNG_LIBPNG_VER) && (PNG_LIBPNG_VER >= 10200)
-       flags = PNG_ASM_FLAG_MMX_READ_COMBINE_ROW  \
-             | PNG_ASM_FLAG_MMX_READ_INTERLACE    \
-             | PNG_ASM_FLAG_MMX_READ_FILTER_SUB   \
-             | PNG_ASM_FLAG_MMX_READ_FILTER_UP    \
-             | PNG_ASM_FLAG_MMX_READ_FILTER_AVG   \
-             | PNG_ASM_FLAG_MMX_READ_FILTER_PAETH ;
-       png_set_asm_flags(png_ptr, flags);
-    #endif
-
-This method would enable only the MMX read-optimizations available at the
-time of libpng 1.2.0's release, regardless of whether a later version of
-the DLL were actually being used.  (Also note that these functions did not
-exist in versions older than 1.2.0, so any attempt to run a dynamically
-linked app on such an older version would fail.)
-
-To determine whether the processor supports MMX instructions at all, use
-the png_mmx_support() function:
-
-    #if defined(PNG_LIBPNG_VER) && (PNG_LIBPNG_VER >= 10200)
-       mmxsupport = png_mmx_support();
-    #endif
-
-It returns -1 if MMX support is not compiled into libpng, 0 if MMX code
-is compiled but MMX is not supported by the processor, or 1 if MMX support
-is fully available.  Note that png_mmx_support(), png_get_mmx_flagmask(),
-and png_get_asm_flagmask() all may be called without allocating and ini-
-tializing any PNG structures (for example, as part of a usage screen or
-"about" box).
-
-The following code can be used to prevent an application from using the
-thread_unsafe features, even if libpng was built with PNG_THREAD_UNSAFE_OK
-defined:
-
-#if defined(PNG_USE_PNGGCCRD) && defined(PNG_MMX_CODE_SUPPORTED) \
-  && defined(PNG_THREAD_UNSAFE_OK)
-    /* Disable thread-unsafe features of pnggccrd */
-    if (png_access_version_number() >= 10200)
-    {
-      png_uint_32 mmx_disable_mask = 0;
-      png_uint_32 asm_flags;
-
-      mmx_disable_mask |= ( PNG_ASM_FLAG_MMX_READ_COMBINE_ROW  \
-                          | PNG_ASM_FLAG_MMX_READ_FILTER_SUB   \
-                          | PNG_ASM_FLAG_MMX_READ_FILTER_AVG   \
-                          | PNG_ASM_FLAG_MMX_READ_FILTER_PAETH );
-      asm_flags = png_get_asm_flags(png_ptr);
-      png_set_asm_flags(png_ptr, asm_flags & ~mmx_disable_mask);
-    }
-#endif
-
-For more extensive examples of runtime querying, enabling and disabling
-of optimized features, see contrib/gregbook/readpng2.c in the libpng
-source-code distribution.
-
-VII.  MNG support
+VI.  MNG support
 
 The MNG specification (available at http://www.libpng.org/pub/mng) allows
 certain extensions to PNG for PNG images that are embedded in MNG datastreams.
@@ -2937,13 +2816,13 @@
 
 IX. Y2K Compliance in libpng
 
-September 6, 2008
+October 6, 2008
 
 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.4.0beta34 are Y2K compliant.  It is my belief that earlier
+upward through 1.4.0beta35 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 d2228fc..3f6b277 100644
--- a/libpng.3
+++ b/libpng.3
@@ -1,6 +1,6 @@
-.TH LIBPNG 3 "September 6, 2008"
+.TH LIBPNG 3 "October 6, 2008"
 .SH NAME
-libpng \- Portable Network Graphics (PNG) Reference Library 1.4.0beta34
+libpng \- Portable Network Graphics (PNG) Reference Library 1.4.0beta35
 .SH SYNOPSIS
 \fI\fB
 
@@ -278,7 +278,7 @@
 
 \fI\fB
 
-\fBpng_uint_32 png_get_tRNS (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_bytep \fP\fI*trans\fP\fB, int \fP\fI*num_trans\fP\fB, png_color_16p \fI*trans_values\fP\fB);\fP
+\fBpng_uint_32 png_get_tRNS (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_bytep \fP\fI*trans\fP\fB, int \fP\fI*num_trans\fP\fB, png_color_16p \fI*trans_color\fP\fB);\fP
 
 \fI\fB
 
@@ -678,7 +678,7 @@
 
 \fI\fB
 
-\fBvoid png_set_tRNS (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_bytep \fP\fItrans\fP\fB, int \fP\fInum_trans\fP\fB, png_color_16p \fItrans_values\fP\fB);\fP
+\fBvoid png_set_tRNS (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_bytep \fP\fItrans\fP\fB, int \fP\fInum_trans\fP\fB, png_color_16p \fItrans_color\fP\fB);\fP
 
 \fI\fB
 
@@ -809,7 +809,7 @@
 .SH LIBPNG.TXT
 libpng.txt - A description on how to use and modify libpng
 
- libpng version 1.4.0beta34 - September 6, 2008
+ libpng version 1.4.0beta35 - October 6, 2008
  Updated and distributed by Glenn Randers-Pehrson
  <glennrp at users.sourceforge.net>
  Copyright (c) 1998-2005 Glenn Randers-Pehrson
@@ -891,9 +891,7 @@
 instances of the structures.  Each thread should have its own
 png_struct and png_info instances, and thus its own image.
 Libpng does not protect itself against two threads using the
-same instance of a structure.  Note: thread safety may be defeated
-by use of some of the MMX assembler code in pnggccrd.c, which is only
-compiled when the user defines PNG_THREAD_UNSAFE_OK.
+same instance of a structure.
 
 .SH II. Structures
 
@@ -1394,10 +1392,10 @@
                      given color type (png_color_16)
 
     png_get_tRNS(png_ptr, info_ptr, &trans, &num_trans,
-                     &trans_values);
+                     &trans_color);
     trans          - array of transparent entries for
                      palette (PNG_INFO_tRNS)
-    trans_values   - graylevel or color sample values of
+    trans_color    - graylevel or color sample values of
                      the single transparent color for
                      non-paletted images (PNG_INFO_tRNS)
     num_trans      - number of transparent entries
@@ -2626,10 +2624,10 @@
                      (png_color_16)
 
     png_set_tRNS(png_ptr, info_ptr, trans, num_trans,
-       trans_values);
+       trans_color);
     trans          - array of transparent entries for
                      palette (PNG_INFO_tRNS)
-    trans_values   - graylevel or color sample values of
+    trans_color    - graylevel or color sample values of
                      the single transparent color for
                      non-paletted images (PNG_INFO_tRNS)
     num_trans      - number of transparent entries
@@ -3551,126 +3549,7 @@
 having level = 0 will be printed.  There aren't any such statements in
 this version of libpng, but if you insert some they will be printed.
 
-.SH VI.  Runtime optimization
-
-A new feature in libpng 1.2.0 is the ability to dynamically switch between
-standard and optimized versions of some routines.  Currently these are
-limited to three computationally intensive tasks when reading PNG files:
-decoding row filters, expanding interlacing, and combining interlaced or
-transparent row data with previous row data.  Currently the optimized
-versions are available only for x86 (Intel, AMD, etc.) platforms with
-MMX support, though this may change in future versions.  (For example,
-the non-MMX assembler optimizations for zlib might become similarly
-runtime-selectable in future releases, in which case libpng could be
-extended to support them.  Alternatively, the compile-time choice of
-floating-point versus integer routines for gamma correction might become
-runtime-selectable.)
-
-Because such optimizations tend to be very platform- and compiler-dependent,
-both in how they are written and in how they perform, the new runtime code
-in libpng has been written to allow programs to query, enable, and disable
-either specific optimizations or all such optimizations.  For example, to
-enable all possible optimizations (bearing in mind that some "optimizations"
-may actually run more slowly in rare cases):
-
-    #if defined(PNG_LIBPNG_VER) && (PNG_LIBPNG_VER >= 10200)
-       png_uint_32 mask, flags;
-
-       flags = png_get_asm_flags(png_ptr);
-       mask = png_get_asm_flagmask(PNG_SELECT_READ | PNG_SELECT_WRITE);
-       png_set_asm_flags(png_ptr, flags | mask);
-    #endif
-
-To enable only optimizations relevant to reading PNGs, use PNG_SELECT_READ
-by itself when calling png_get_asm_flagmask(); similarly for optimizing
-only writing.  To disable all optimizations:
-
-    #if defined(PNG_LIBPNG_VER) && (PNG_LIBPNG_VER >= 10200)
-       flags = png_get_asm_flags(png_ptr);
-       mask = png_get_asm_flagmask(PNG_SELECT_READ | PNG_SELECT_WRITE);
-       png_set_asm_flags(png_ptr, flags & ~mask);
-    #endif
-
-To enable or disable only MMX-related features, use png_get_mmx_flagmask()
-in place of png_get_asm_flagmask().  The mmx version takes one additional
-parameter:
-
-    #if defined(PNG_LIBPNG_VER) && (PNG_LIBPNG_VER >= 10200)
-       int selection = PNG_SELECT_READ | PNG_SELECT_WRITE;
-       int compilerID;
-
-       mask = png_get_mmx_flagmask(selection, &compilerID);
-    #endif
-
-On return, compilerID will indicate which version of the MMX assembler
-optimizations was compiled.  Currently two flavors exist:  Microsoft
-Visual C++ (compilerID == 1) and GNU C (a.k.a. gcc/gas, compilerID == 2).
-On non-x86 platforms or on systems compiled without MMX optimizations, a
-value of -1 is used.
-
-Note that both png_get_asm_flagmask() and png_get_mmx_flagmask() return
-all valid, settable optimization bits for the version of the library that's
-currently in use.  In the case of shared (dynamically linked) libraries,
-this may include optimizations that did not exist at the time the code was
-written and compiled.  It is also possible, of course, to enable only known,
-specific optimizations; for example:
-
-    #if defined(PNG_LIBPNG_VER) && (PNG_LIBPNG_VER >= 10200)
-       flags = PNG_ASM_FLAG_MMX_READ_COMBINE_ROW  \
-             | PNG_ASM_FLAG_MMX_READ_INTERLACE    \
-             | PNG_ASM_FLAG_MMX_READ_FILTER_SUB   \
-             | PNG_ASM_FLAG_MMX_READ_FILTER_UP    \
-             | PNG_ASM_FLAG_MMX_READ_FILTER_AVG   \
-             | PNG_ASM_FLAG_MMX_READ_FILTER_PAETH ;
-       png_set_asm_flags(png_ptr, flags);
-    #endif
-
-This method would enable only the MMX read-optimizations available at the
-time of libpng 1.2.0's release, regardless of whether a later version of
-the DLL were actually being used.  (Also note that these functions did not
-exist in versions older than 1.2.0, so any attempt to run a dynamically
-linked app on such an older version would fail.)
-
-To determine whether the processor supports MMX instructions at all, use
-the png_mmx_support() function:
-
-    #if defined(PNG_LIBPNG_VER) && (PNG_LIBPNG_VER >= 10200)
-       mmxsupport = png_mmx_support();
-    #endif
-
-It returns -1 if MMX support is not compiled into libpng, 0 if MMX code
-is compiled but MMX is not supported by the processor, or 1 if MMX support
-is fully available.  Note that png_mmx_support(), png_get_mmx_flagmask(),
-and png_get_asm_flagmask() all may be called without allocating and ini-
-tializing any PNG structures (for example, as part of a usage screen or
-"about" box).
-
-The following code can be used to prevent an application from using the
-thread_unsafe features, even if libpng was built with PNG_THREAD_UNSAFE_OK
-defined:
-
-#if defined(PNG_USE_PNGGCCRD) && defined(PNG_MMX_CODE_SUPPORTED) \
-  && defined(PNG_THREAD_UNSAFE_OK)
-    /* Disable thread-unsafe features of pnggccrd */
-    if (png_access_version_number() >= 10200)
-    {
-      png_uint_32 mmx_disable_mask = 0;
-      png_uint_32 asm_flags;
-
-      mmx_disable_mask |= ( PNG_ASM_FLAG_MMX_READ_COMBINE_ROW  \
-                          | PNG_ASM_FLAG_MMX_READ_FILTER_SUB   \
-                          | PNG_ASM_FLAG_MMX_READ_FILTER_AVG   \
-                          | PNG_ASM_FLAG_MMX_READ_FILTER_PAETH );
-      asm_flags = png_get_asm_flags(png_ptr);
-      png_set_asm_flags(png_ptr, asm_flags & ~mmx_disable_mask);
-    }
-#endif
-
-For more extensive examples of runtime querying, enabling and disabling
-of optimized features, see contrib/gregbook/readpng2.c in the libpng
-source-code distribution.
-
-.SH VII.  MNG support
+.SH VI.  MNG support
 
 The MNG specification (available at http://www.libpng.org/pub/mng) allows
 certain extensions to PNG for PNG images that are embedded in MNG datastreams.
@@ -3746,13 +3625,13 @@
 
 .SH IX. Y2K Compliance in libpng
 
-September 6, 2008
+October 6, 2008
 
 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.4.0beta34 are Y2K compliant.  It is my belief that earlier
+upward through 1.4.0beta35 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
@@ -3919,7 +3798,7 @@
  1.2.12              13    10212  12.so.0.12[.0]
  1.4.0beta9-14       14    10400  14.so.0.0[.0]
  1.2.13              13    10213  12.so.0.13[.0]
- 1.4.0beta15-34      14    10400  14.so.0.0[.0]
+ 1.4.0beta15-35      14    10400  14.so.0.0[.0]
 
 Henceforth the source version will match the shared-library minor
 and patch numbers; the shared-library major version number will be
@@ -3975,7 +3854,7 @@
 
 Thanks to Frank J. T. Wojcik for helping with the documentation.
 
-Libpng version 1.4.0beta34 - September 6, 2008:
+Libpng version 1.4.0beta35 - October 6, 2008:
 Initially created in 1995 by Guy Eric Schalnat, then of Group 42, Inc.
 Currently maintained by Glenn Randers-Pehrson (glennrp at users.sourceforge.net).
 
@@ -3996,7 +3875,7 @@
 If you modify libpng you may insert additional notices immediately following
 this sentence.
 
-libpng versions 1.2.6, August 15, 2004, through 1.4.0beta34, September 6, 2008, are
+libpng versions 1.2.6, August 15, 2004, through 1.4.0beta35, October 6, 2008, 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
@@ -4095,7 +3974,7 @@
 
 Glenn Randers-Pehrson
 glennrp at users.sourceforge.net
-September 6, 2008
+October 6, 2008
 
 .\" end of man page
 
diff --git a/libpngpf.3 b/libpngpf.3
index 2f423c9..81c2a9b 100644
--- a/libpngpf.3
+++ b/libpngpf.3
@@ -1,6 +1,6 @@
-.TH LIBPNGPF 3 "September 6, 2008"
+.TH LIBPNGPF 3 "October 6, 2008"
 .SH NAME
-libpng \- Portable Network Graphics (PNG) Reference Library 1.4.0beta34
+libpng \- Portable Network Graphics (PNG) Reference Library 1.4.0beta35
 (private functions)
 .SH SYNOPSIS
 \fB#include <png.h>\fP
@@ -99,7 +99,7 @@
 
 \fI\fB
 
-\fBvoid png_do_background (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fP\fIrow\fP\fB, png_color_16p \fP\fItrans_values\fP\fB, png_color_16p \fP\fIbackground\fP\fB, png_color_16p \fP\fIbackground_1\fP\fB, png_bytep \fP\fIgamma_table\fP\fB, png_bytep \fP\fIgamma_from_1\fP\fB, png_bytep \fP\fIgamma_to_1\fP\fB, png_uint_16pp \fP\fIgamma_16\fP\fB, png_uint_16pp \fP\fIgamma_16_from_1\fP\fB, png_uint_16pp \fP\fIgamma_16_to_1\fP\fB, int \fIgamma_shift\fP\fB);\fP
+\fBvoid png_do_background (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fP\fIrow\fP\fB, png_color_16p \fP\fItrans_color\fP\fB, png_color_16p \fP\fIbackground\fP\fB, png_color_16p \fP\fIbackground_1\fP\fB, png_bytep \fP\fIgamma_table\fP\fB, png_bytep \fP\fIgamma_from_1\fP\fB, png_bytep \fP\fIgamma_to_1\fP\fB, png_uint_16pp \fP\fIgamma_16\fP\fB, png_uint_16pp \fP\fIgamma_16_from_1\fP\fB, png_uint_16pp \fP\fIgamma_16_to_1\fP\fB, int \fIgamma_shift\fP\fB);\fP
 
 \fI\fB
 
diff --git a/png.5 b/png.5
index cffac56..1244c33 100644
--- a/png.5
+++ b/png.5
@@ -1,4 +1,4 @@
-.TH PNG 5 "September 6, 2008"
+.TH PNG 5 "October 6, 2008"
 .SH NAME
 png \- Portable Network Graphics (PNG) format
 .SH DESCRIPTION
diff --git a/png.c b/png.c
index f36b313..da4954b 100644
--- a/png.c
+++ b/png.c
@@ -1,7 +1,7 @@
 
 /* png.c - location for general purpose libpng functions
  *
- * Last changed in libpng 1.2.30 [September 6, 2008]
+ * Last changed in libpng 1.2.30 [October 6, 2008]
  * For conditions of distribution and use, see copyright notice in png.h
  * Copyright (c) 1998-2008 Glenn Randers-Pehrson
  * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
@@ -13,7 +13,7 @@
 #include "pngpriv.h"
 
 /* Generate a compiler error if there is an old png.h in the search path. */
-typedef version_1_4_0beta34 Your_png_h_is_not_version_1_4_0beta34;
+typedef version_1_4_0beta35 Your_png_h_is_not_version_1_4_0beta35;
 
 /* Version information for C files.  This had better match the version
  * string defined in png.h.  */
@@ -641,13 +641,13 @@
 #else
 #ifdef __STDC__
    return ((png_charp) PNG_STRING_NEWLINE \
-     "libpng version x 1.4.0beta34 - September 6, 2008" PNG_STRING_NEWLINE \
+     "libpng version x 1.4.0beta35 - October 6, 2008" PNG_STRING_NEWLINE \
      "Copyright (c) 1998-2008 Glenn Randers-Pehrson" PNG_STRING_NEWLINE \
      "Copyright (c) 1996-1997 Andreas Dilger" PNG_STRING_NEWLINE \
      "Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc." \
      PNG_STRING_NEWLINE);
 #else
-      return ((png_charp) "libpng version 1.4.0beta34 - September 6, 2008\
+      return ((png_charp) "libpng version 1.4.0beta35 - October 6, 2008\
       Copyright (c) 1998-2008 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 43ee42a..25a9c03 100644
--- a/png.h
+++ b/png.h
@@ -1,7 +1,7 @@
 
 /* png.h - header file for PNG reference library
  *
- * libpng version 1.4.0beta34 - September 6, 2008
+ * libpng version 1.4.0beta35 - October 6, 2008
  * Copyright (c) 1998-2008 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.)
@@ -9,7 +9,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.4.0beta34 - September 6, 2008: Glenn
+ *  libpng versions 0.97, January 1998, through 1.4.0beta35 - October 6, 2008: Glenn
  *  See also "Contributing Authors", below.
  *
  * Note about libpng version numbers:
@@ -126,7 +126,7 @@
  *    1.2.12                  13    10212  12.so.0.10[.0]
  *    1.4.0beta9-14           14    10400  14.so.0.0[.0]
  *    1.2.13                  13    10213  12.so.0.10[.0]
- *    1.4.0beta15-34          14    10400  14.so.0.0[.0]
+ *    1.4.0beta15-35          14    10400  14.so.0.0[.0]
  *
  *    Henceforth the source version will match the shared-library major
  *    and minor numbers; the shared-library major version number will be
@@ -156,7 +156,7 @@
  * If you modify libpng you may insert additional notices immediately following
  * this sentence.
  *
- * libpng versions 1.2.6, August 15, 2004, through 1.4.0beta34, September 6, 2008, are
+ * libpng versions 1.2.6, August 15, 2004, through 1.4.0beta35, October 6, 2008, 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:
@@ -274,7 +274,7 @@
  *    an official declaration.
  *
  *    This is your unofficial assurance that libpng from version 0.71 and
- *    upward through 1.4.0beta34 are Y2K compliant.  It is my belief that earlier
+ *    upward through 1.4.0beta35 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
@@ -330,11 +330,11 @@
  */
 
 /* Version information for png.h - this should match the version in png.c */
-#define PNG_LIBPNG_VER_STRING "1.4.0beta34"
+#define PNG_LIBPNG_VER_STRING "1.4.0beta35"
 #define PNG_HEADER_VERSION_STRING \
-   " libpng version 1.4.0beta34 - September 6, 2008\n"
+   " libpng version 1.4.0beta35 - October 6, 2008\n"
 
-#define PNG_LIBPNG_VER_SONUM   0
+#define PNG_LIBPNG_VER_SONUM   14
 #define PNG_LIBPNG_VER_DLLNUM  14
 
 /* These should match the first 3 components of PNG_LIBPNG_VER_STRING: */
@@ -344,7 +344,7 @@
 /* This should match the numeric part of the final component of
  * PNG_LIBPNG_VER_STRING, omitting any leading zero: */
 
-#define PNG_LIBPNG_VER_BUILD  34
+#define PNG_LIBPNG_VER_BUILD  35
 
 /* Release Status */
 #define PNG_LIBPNG_BUILD_ALPHA    1
@@ -721,7 +721,7 @@
     * Data is valid if (valid & PNG_INFO_tRNS) is non-zero.
     */
    png_bytep trans; /* transparent values for paletted image */
-   png_color_16 trans_values; /* transparent color for non-palette image */
+   png_color_16 trans_color; /* transparent color for non-palette image */
 #endif
 
 #if defined(PNG_bKGD_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED)
@@ -1185,7 +1185,7 @@
 #if defined(PNG_tRNS_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) \
  || defined(PNG_READ_EXPAND_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED)
    png_bytep trans;           /* transparency values for paletted files */
-   png_color_16 trans_values; /* transparency values for non-paletted files */
+   png_color_16 trans_color;  /* transparent color for non-paletted files */
 #endif
 
    png_read_status_ptr read_row_fn;   /* called after each row is decoded */
@@ -1352,7 +1352,7 @@
 /* This triggers a compiler error in png.c, if png.c and png.h
  * do not agree upon the version number.
  */
-typedef png_structp version_1_4_0beta34;
+typedef png_structp version_1_4_0beta35;
 
 typedef png_struct FAR * FAR * png_structpp;
 
@@ -2283,13 +2283,13 @@
 #if defined(PNG_tRNS_SUPPORTED)
 extern PNG_EXPORT(png_uint_32,png_get_tRNS) PNGARG((png_structp png_ptr,
    png_infop info_ptr, png_bytep *trans, int *num_trans,
-   png_color_16p *trans_values));
+   png_color_16p *trans_color));
 #endif
 
 #if defined(PNG_tRNS_SUPPORTED)
 extern PNG_EXPORT(void,png_set_tRNS) PNGARG((png_structp png_ptr,
    png_infop info_ptr, png_bytep trans, int num_trans,
-   png_color_16p trans_values));
+   png_color_16p trans_color));
 #endif
 
 #if defined(PNG_tRNS_SUPPORTED)
diff --git a/pngconf.h b/pngconf.h
index 544f122..42623ad 100644
--- a/pngconf.h
+++ b/pngconf.h
@@ -1,7 +1,7 @@
 
 /* pngconf.h - machine configurable file for libpng
  *
- * libpng version 1.4.0beta34 - September 6, 2008
+ * libpng version 1.4.0beta35 - October 6, 2008
  * For conditions of distribution and use, see copyright notice in png.h
  * Copyright (c) 1998-2007 Glenn Randers-Pehrson
  * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
@@ -333,6 +333,9 @@
 
 #  ifdef __linux__
 #    ifdef PNG_SAVE_BSD_SOURCE
+#      ifdef _BSD_SOURCE
+#        undef _BSD_SOURCE
+#      endif
 #      define _BSD_SOURCE
 #      undef PNG_SAVE_BSD_SOURCE
 #    endif
diff --git a/pngerror.c b/pngerror.c
index 635b146..e6efeea 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.4.0 [September 6, 2008]
+ * Last changed in libpng 1.4.0 [October 6, 2008]
  * For conditions of distribution and use, see copyright notice in png.h
  * Copyright (c) 1998-2008 Glenn Randers-Pehrson
  * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
diff --git a/pngget.c b/pngget.c
index 188917a..77d478a 100644
--- a/pngget.c
+++ b/pngget.c
@@ -1,7 +1,7 @@
 
 /* pngget.c - retrieval of values from info struct
  *
- * Last changed in libpng 1.4.0 [September 6, 2008]
+ * Last changed in libpng 1.4.0 [October 6, 2008]
  * For conditions of distribution and use, see copyright notice in png.h
  * Copyright (c) 1998-2008 Glenn Randers-Pehrson
  * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
@@ -760,7 +760,7 @@
 #if defined(PNG_tRNS_SUPPORTED)
 png_uint_32 PNGAPI
 png_get_tRNS(png_structp png_ptr, png_infop info_ptr,
-   png_bytep *trans, int *num_trans, png_color_16p *trans_values)
+   png_bytep *trans, int *num_trans, png_color_16p *trans_color)
 {
    png_uint_32 retval = 0;
    if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_tRNS))
@@ -773,14 +773,14 @@
              *trans = info_ptr->trans;
              retval |= PNG_INFO_tRNS;
           }
-          if (trans_values != NULL)
-             *trans_values = &(info_ptr->trans_values);
+          if (trans_color != NULL)
+             *trans_color = &(info_ptr->trans_color);
       }
       else /* if (info_ptr->color_type != PNG_COLOR_TYPE_PALETTE) */
       {
-          if (trans_values != NULL)
+          if (trans_color != NULL)
           {
-             *trans_values = &(info_ptr->trans_values);
+             *trans_color = &(info_ptr->trans_color);
              retval |= PNG_INFO_tRNS;
           }
           if (trans != NULL)
diff --git a/pngmem.c b/pngmem.c
index 4d3b785..0892529 100644
--- a/pngmem.c
+++ b/pngmem.c
@@ -1,7 +1,7 @@
 
 /* pngmem.c - stub functions for memory allocation
  *
- * Last changed in libpng 1.4.0 [September 6, 2008]
+ * Last changed in libpng 1.4.0 [October 6, 2008]
  * For conditions of distribution and use, see copyright notice in png.h
  * Copyright (c) 1998-2008 Glenn Randers-Pehrson
  * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
diff --git a/pngpread.c b/pngpread.c
index 28e2c76..53cbb54 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.4.0 [September 6, 2008]
+ * Last changed in libpng 1.4.0 [October 6, 2008]
  * For conditions of distribution and use, see copyright notice in png.h
  * Copyright (c) 1998-2008 Glenn Randers-Pehrson
  * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
diff --git a/pngpriv.h b/pngpriv.h
index 8cee1f2..d9eaa54 100644
--- a/pngpriv.h
+++ b/pngpriv.h
@@ -1,7 +1,7 @@
 
 /* pngpriv.h - private declarations for use inside libpng
  *
- * libpng version 1.4.0beta34 - September 6, 2008
+ * libpng version 1.4.0beta35 - October 6, 2008
  * For conditions of distribution and use, see copyright notice in png.h
  * Copyright (c) 1998-2007 Glenn Randers-Pehrson
  * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
@@ -658,14 +658,14 @@
 #if defined(PNG_READ_BACKGROUND_SUPPORTED)
 #if defined(PNG_READ_GAMMA_SUPPORTED)
 PNG_EXTERN void png_do_background PNGARG((png_row_infop row_info, png_bytep row,
-   png_color_16p trans_values, png_color_16p background,
+   png_color_16p trans_color, png_color_16p background,
    png_color_16p background_1,
    png_bytep gamma_table, png_bytep gamma_from_1, png_bytep gamma_to_1,
    png_uint_16pp gamma_16, png_uint_16pp gamma_16_from_1,
    png_uint_16pp gamma_16_to_1, int gamma_shift));
 #else
 PNG_EXTERN void png_do_background PNGARG((png_row_infop row_info, png_bytep row,
-   png_color_16p trans_values, png_color_16p background));
+   png_color_16p trans_color, png_color_16p background));
 #endif
 #endif
 
diff --git a/pngread.c b/pngread.c
index 92cc5d7..23e7552 100644
--- a/pngread.c
+++ b/pngread.c
@@ -1,7 +1,7 @@
 
 /* pngread.c - read a PNG file
  *
- * Last changed in libpng 1.4.0 [September 6, 2008]
+ * Last changed in libpng 1.4.0 [October 6, 2008]
  * For conditions of distribution and use, see copyright notice in png.h
  * Copyright (c) 1998-2008 Glenn Randers-Pehrson
  * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
diff --git a/pngrio.c b/pngrio.c
index 184f094..8088b03 100644
--- a/pngrio.c
+++ b/pngrio.c
@@ -1,7 +1,7 @@
 
 /* pngrio.c - functions for data input
  *
- * Last changed in libpng 1.4.0 [September 6, 2008]
+ * Last changed in libpng 1.4.0 [October 6, 2008]
  * For conditions of distribution and use, see copyright notice in png.h
  * Copyright (c) 1998-2008 Glenn Randers-Pehrson
  * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
diff --git a/pngrtran.c b/pngrtran.c
index 6710c48..59cf9bc 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.4.0 [September 6, 2008]
+ * Last changed in libpng 1.4.0 [October 6, 2008]
  * For conditions of distribution and use, see copyright notice in png.h
  * Copyright (c) 1998-2008 Glenn Randers-Pehrson
  * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
@@ -766,9 +766,9 @@
                  =  png_ptr->background.blue = png_ptr->background.gray;
                if (!(png_ptr->transformations & PNG_EXPAND_tRNS))
                {
-                 png_ptr->trans_values.gray *= (png_uint_16)0xff;
-                 png_ptr->trans_values.red = png_ptr->trans_values.green
-                   = png_ptr->trans_values.blue = png_ptr->trans_values.gray;
+                 png_ptr->trans_color.gray *= (png_uint_16)0xff;
+                 png_ptr->trans_color.red = png_ptr->trans_color.green
+                   = png_ptr->trans_color.blue = png_ptr->trans_color.gray;
                }
                break;
             case 2:
@@ -777,9 +777,9 @@
                  = png_ptr->background.blue = png_ptr->background.gray;
                if (!(png_ptr->transformations & PNG_EXPAND_tRNS))
                {
-                 png_ptr->trans_values.gray *= (png_uint_16)0x55;
-                 png_ptr->trans_values.red = png_ptr->trans_values.green
-                   = png_ptr->trans_values.blue = png_ptr->trans_values.gray;
+                 png_ptr->trans_color.gray *= (png_uint_16)0x55;
+                 png_ptr->trans_color.red = png_ptr->trans_color.green
+                   = png_ptr->trans_color.blue = png_ptr->trans_color.gray;
                }
                break;
             case 4:
@@ -788,9 +788,9 @@
                  = png_ptr->background.blue = png_ptr->background.gray;
                if (!(png_ptr->transformations & PNG_EXPAND_tRNS))
                {
-                 png_ptr->trans_values.gray *= (png_uint_16)0x11;
-                 png_ptr->trans_values.red = png_ptr->trans_values.green
-                   = png_ptr->trans_values.blue = png_ptr->trans_values.gray;
+                 png_ptr->trans_color.gray *= (png_uint_16)0x11;
+                 png_ptr->trans_color.red = png_ptr->trans_color.green
+                   = png_ptr->trans_color.blue = png_ptr->trans_color.gray;
                }
                break;
             case 8:
@@ -1303,7 +1303,7 @@
          if (png_ptr->num_trans &&
              (png_ptr->transformations & PNG_EXPAND_tRNS))
             png_do_expand(&(png_ptr->row_info), png_ptr->row_buf + 1,
-               &(png_ptr->trans_values));
+               &(png_ptr->trans_color));
          else
             png_do_expand(&(png_ptr->row_info), png_ptr->row_buf + 1,
                NULL);
@@ -1378,7 +1378,7 @@
       ((png_ptr->num_trans != 0 ) ||
       (png_ptr->color_type & PNG_COLOR_MASK_ALPHA)))
       png_do_background(&(png_ptr->row_info), png_ptr->row_buf + 1,
-         &(png_ptr->trans_values), &(png_ptr->background)
+         &(png_ptr->trans_color), &(png_ptr->background)
 #if defined(PNG_READ_GAMMA_SUPPORTED)
          , &(png_ptr->background_1),
          png_ptr->gamma_table, png_ptr->gamma_from_1,
@@ -2575,7 +2575,7 @@
  */
 void /* PRIVATE */
 png_do_background(png_row_infop row_info, png_bytep row,
-   png_color_16p trans_values, png_color_16p background
+   png_color_16p trans_color, png_color_16p background
 #if defined(PNG_READ_GAMMA_SUPPORTED)
    , png_color_16p background_1,
    png_bytep gamma_table, png_bytep gamma_from_1, png_bytep gamma_to_1,
@@ -2592,7 +2592,7 @@
    png_debug(1, "in png_do_background");
    if (background != NULL &&
       (!(row_info->color_type & PNG_COLOR_MASK_ALPHA) ||
-      (row_info->color_type != PNG_COLOR_TYPE_PALETTE && trans_values)))
+      (row_info->color_type != PNG_COLOR_TYPE_PALETTE && trans_color)))
    {
       switch (row_info->color_type)
       {
@@ -2607,7 +2607,7 @@
                   for (i = 0; i < row_width; i++)
                   {
                      if ((png_uint_16)((*sp >> shift) & 0x01)
-                        == trans_values->gray)
+                        == trans_color->gray)
                      {
                         *sp &= (png_byte)((0x7f7f >> (7 - shift)) & 0xff);
                         *sp |= (png_byte)(background->gray << shift);
@@ -2632,7 +2632,7 @@
                      for (i = 0; i < row_width; i++)
                      {
                         if ((png_uint_16)((*sp >> shift) & 0x03)
-                            == trans_values->gray)
+                            == trans_color->gray)
                         {
                            *sp &= (png_byte)((0x3f3f >> (6 - shift)) & 0xff);
                            *sp |= (png_byte)(background->gray << shift);
@@ -2662,7 +2662,7 @@
                      for (i = 0; i < row_width; i++)
                      {
                         if ((png_uint_16)((*sp >> shift) & 0x03)
-                            == trans_values->gray)
+                            == trans_color->gray)
                         {
                            *sp &= (png_byte)((0x3f3f >> (6 - shift)) & 0xff);
                            *sp |= (png_byte)(background->gray << shift);
@@ -2688,7 +2688,7 @@
                      for (i = 0; i < row_width; i++)
                      {
                         if ((png_uint_16)((*sp >> shift) & 0x0f)
-                            == trans_values->gray)
+                            == trans_color->gray)
                         {
                            *sp &= (png_byte)((0xf0f >> (4 - shift)) & 0xff);
                            *sp |= (png_byte)(background->gray << shift);
@@ -2718,7 +2718,7 @@
                      for (i = 0; i < row_width; i++)
                      {
                         if ((png_uint_16)((*sp >> shift) & 0x0f)
-                            == trans_values->gray)
+                            == trans_color->gray)
                         {
                            *sp &= (png_byte)((0xf0f >> (4 - shift)) & 0xff);
                            *sp |= (png_byte)(background->gray << shift);
@@ -2742,7 +2742,7 @@
                      sp = row;
                      for (i = 0; i < row_width; i++, sp++)
                      {
-                        if (*sp == trans_values->gray)
+                        if (*sp == trans_color->gray)
                         {
                            *sp = (png_byte)background->gray;
                         }
@@ -2758,7 +2758,7 @@
                      sp = row;
                      for (i = 0; i < row_width; i++, sp++)
                      {
-                        if (*sp == trans_values->gray)
+                        if (*sp == trans_color->gray)
                         {
                            *sp = (png_byte)background->gray;
                         }
@@ -2777,7 +2777,7 @@
                         png_uint_16 v;
 
                         v = (png_uint_16)(((*sp) << 8) + *(sp + 1));
-                        if (v == trans_values->gray)
+                        if (v == trans_color->gray)
                         {
                            /* background is already in screen gamma */
                            *sp = (png_byte)((background->gray >> 8) & 0xff);
@@ -2800,7 +2800,7 @@
                         png_uint_16 v;
 
                         v = (png_uint_16)(((*sp) << 8) + *(sp + 1));
-                        if (v == trans_values->gray)
+                        if (v == trans_color->gray)
                         {
                            *sp = (png_byte)((background->gray >> 8) & 0xff);
                            *(sp + 1) = (png_byte)(background->gray & 0xff);
@@ -2822,9 +2822,9 @@
                   sp = row;
                   for (i = 0; i < row_width; i++, sp += 3)
                   {
-                     if (*sp == trans_values->red &&
-                        *(sp + 1) == trans_values->green &&
-                        *(sp + 2) == trans_values->blue)
+                     if (*sp == trans_color->red &&
+                        *(sp + 1) == trans_color->green &&
+                        *(sp + 2) == trans_color->blue)
                      {
                         *sp = (png_byte)background->red;
                         *(sp + 1) = (png_byte)background->green;
@@ -2844,9 +2844,9 @@
                   sp = row;
                   for (i = 0; i < row_width; i++, sp += 3)
                   {
-                     if (*sp == trans_values->red &&
-                        *(sp + 1) == trans_values->green &&
-                        *(sp + 2) == trans_values->blue)
+                     if (*sp == trans_color->red &&
+                        *(sp + 1) == trans_color->green &&
+                        *(sp + 2) == trans_color->blue)
                      {
                         *sp = (png_byte)background->red;
                         *(sp + 1) = (png_byte)background->green;
@@ -2866,8 +2866,8 @@
                      png_uint_16 r = (png_uint_16)(((*sp) << 8) + *(sp + 1));
                      png_uint_16 g = (png_uint_16)(((*(sp+2)) << 8) + *(sp+3));
                      png_uint_16 b = (png_uint_16)(((*(sp+4)) << 8) + *(sp+5));
-                     if (r == trans_values->red && g == trans_values->green &&
-                        b == trans_values->blue)
+                     if (r == trans_color->red && g == trans_color->green &&
+                        b == trans_color->blue)
                      {
                         /* background is already in screen gamma */
                         *sp = (png_byte)((background->red >> 8) & 0xff);
@@ -2901,8 +2901,8 @@
                      png_uint_16 g = (png_uint_16)(((*(sp+2)) << 8) + *(sp+3));
                      png_uint_16 b = (png_uint_16)(((*(sp+4)) << 8) + *(sp+5));
 
-                     if (r == trans_values->red && g == trans_values->green &&
-                        b == trans_values->blue)
+                     if (r == trans_color->red && g == trans_color->green &&
+                        b == trans_color->blue)
                      {
                         *sp = (png_byte)((background->red >> 8) & 0xff);
                         *(sp + 1) = (png_byte)(background->red & 0xff);
diff --git a/pngrutil.c b/pngrutil.c
index c8d684b..471911d 100644
--- a/pngrutil.c
+++ b/pngrutil.c
@@ -1,7 +1,7 @@
 
 /* pngrutil.c - utilities to read a PNG file
  *
- * Last changed in libpng 1.4.0 [September 6, 2008]
+ * Last changed in libpng 1.4.0 [October 6, 2008]
  * For conditions of distribution and use, see copyright notice in png.h
  * Copyright (c) 1998-2008 Glenn Randers-Pehrson
  * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
@@ -1305,7 +1305,7 @@
 
       png_crc_read(png_ptr, buf, 2);
       png_ptr->num_trans = 1;
-      png_ptr->trans_values.gray = png_get_uint_16(buf);
+      png_ptr->trans_color.gray = png_get_uint_16(buf);
    }
    else if (png_ptr->color_type == PNG_COLOR_TYPE_RGB)
    {
@@ -1319,9 +1319,9 @@
       }
       png_crc_read(png_ptr, buf, (png_size_t)length);
       png_ptr->num_trans = 1;
-      png_ptr->trans_values.red = png_get_uint_16(buf);
-      png_ptr->trans_values.green = png_get_uint_16(buf + 2);
-      png_ptr->trans_values.blue = png_get_uint_16(buf + 4);
+      png_ptr->trans_color.red = png_get_uint_16(buf);
+      png_ptr->trans_color.green = png_get_uint_16(buf + 2);
+      png_ptr->trans_color.blue = png_get_uint_16(buf + 4);
    }
    else if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE)
    {
@@ -1360,7 +1360,7 @@
    }
 
    png_set_tRNS(png_ptr, info_ptr, readbuf, png_ptr->num_trans,
-      &(png_ptr->trans_values));
+      &(png_ptr->trans_color));
 }
 #endif
 
diff --git a/pngset.c b/pngset.c
index 3a1fa9f..a3c3814 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.4.0 [September 6, 2008]
+ * Last changed in libpng 1.4.0 [October 6, 2008]
  * For conditions of distribution and use, see copyright notice in png.h
  * Copyright (c) 1998-2008 Glenn Randers-Pehrson
  * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
@@ -916,7 +916,7 @@
 #if defined(PNG_tRNS_SUPPORTED)
 void PNGAPI
 png_set_tRNS(png_structp png_ptr, png_infop info_ptr,
-   png_bytep trans, int num_trans, png_color_16p trans_values)
+   png_bytep trans, int num_trans, png_color_16p trans_color)
 {
    png_debug1(1, "in %s storage function", "tRNS");
    if (png_ptr == NULL || info_ptr == NULL)
@@ -941,18 +941,18 @@
          png_memcpy(info_ptr->trans, trans, (png_size_t)num_trans);
    }
 
-   if (trans_values != NULL)
+   if (trans_color != NULL)
    {
       int sample_max = (1 << info_ptr->bit_depth);
       if ((info_ptr->color_type == PNG_COLOR_TYPE_GRAY &&
-          (int)trans_values->gray > sample_max) ||
+          (int)trans_color->gray > sample_max) ||
           (info_ptr->color_type == PNG_COLOR_TYPE_RGB &&
-          ((int)trans_values->red > sample_max ||
-          (int)trans_values->green > sample_max ||
-          (int)trans_values->blue > sample_max)))
+          ((int)trans_color->red > sample_max ||
+          (int)trans_color->green > sample_max ||
+          (int)trans_color->blue > sample_max)))
         png_warning(png_ptr,
            "tRNS chunk has out-of-range samples for bit_depth");
-      png_memcpy(&(info_ptr->trans_values), trans_values,
+      png_memcpy(&(info_ptr->trans_color), trans_color,
          png_sizeof(png_color_16));
       if (num_trans == 0)
         num_trans = 1;
diff --git a/pngtest.c b/pngtest.c
index 0012e36..79984f6 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.4.0 [September 6, 2008]
+ * Last changed in libpng 1.4.0 [October 6, 2008]
  * For conditions of distribution and use, see copyright notice in png.h
  * Copyright (c) 1998-2008 Glenn Randers-Pehrson
  * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
@@ -1044,21 +1044,21 @@
    {
       png_bytep trans;
       int num_trans;
-      png_color_16p trans_values;
+      png_color_16p trans_color;
 
       if (png_get_tRNS(read_ptr, read_info_ptr, &trans, &num_trans,
-         &trans_values))
+         &trans_color))
       {
          int sample_max = (1 << read_info_ptr->bit_depth);
          /* libpng doesn't reject a tRNS chunk with out-of-range samples */
          if (!((read_info_ptr->color_type == PNG_COLOR_TYPE_GRAY &&
-            (int)trans_values->gray > sample_max) ||
+            (int)trans_color->gray > sample_max) ||
             (read_info_ptr->color_type == PNG_COLOR_TYPE_RGB &&
-            ((int)trans_values->red > sample_max ||
-            (int)trans_values->green > sample_max ||
-            (int)trans_values->blue > sample_max))))
+            ((int)trans_color->red > sample_max ||
+            (int)trans_color->green > sample_max ||
+            (int)trans_color->blue > sample_max))))
            png_set_tRNS(write_ptr, write_info_ptr, trans, num_trans,
-              trans_values);
+              trans_color);
       }
    }
 #endif
@@ -1613,4 +1613,4 @@
 }
 
 /* Generate a compiler error if there is an old png.h in the search path. */
-typedef version_1_4_0beta34 your_png_h_is_not_version_1_4_0beta34;
+typedef version_1_4_0beta35 your_png_h_is_not_version_1_4_0beta35;
diff --git a/pngtrans.c b/pngtrans.c
index afc67a7..4e46644 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.4.0 [September 6, 2008]
+ * Last changed in libpng 1.4.0 [October 6, 2008]
  * For conditions of distribution and use, see copyright notice in png.h
  * Copyright (c) 1998-2008 Glenn Randers-Pehrson
  * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
diff --git a/pngwio.c b/pngwio.c
index f6ecb1e..da5a8f9 100644
--- a/pngwio.c
+++ b/pngwio.c
@@ -1,7 +1,7 @@
 
 /* pngwio.c - functions for data output
  *
- * Last changed in libpng 1.4.0 [September 6, 2008]
+ * Last changed in libpng 1.4.0 [October 6, 2008]
  * For conditions of distribution and use, see copyright notice in png.h
  * Copyright (c) 1998-2008 Glenn Randers-Pehrson
  * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
diff --git a/pngwrite.c b/pngwrite.c
index cd3a3e9..6cfdf84 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.4.0 [September 6, 2008]
+ * Last changed in libpng 1.4.0 [October 6, 2008]
  * For conditions of distribution and use, see copyright notice in png.h
  * Copyright (c) 1998-2008 Glenn Randers-Pehrson
  * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
@@ -156,7 +156,7 @@
                info_ptr->trans[j] = (png_byte)(255 - info_ptr->trans[j]);
          }
 #endif
-      png_write_tRNS(png_ptr, info_ptr->trans, &(info_ptr->trans_values),
+      png_write_tRNS(png_ptr, info_ptr->trans, &(info_ptr->trans_color),
          info_ptr->num_trans, info_ptr->color_type);
       }
 #endif
diff --git a/pngwtran.c b/pngwtran.c
index 88e00f6..3068eb3 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.4.0 [September 6, 2008]
+ * Last changed in libpng 1.4.0 [October 6, 2008]
  * For conditions of distribution and use, see copyright notice in png.h
  * Copyright (c) 1998-2008 Glenn Randers-Pehrson
  * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
diff --git a/pngwutil.c b/pngwutil.c
index c4642f4..0789fd1 100644
--- a/pngwutil.c
+++ b/pngwutil.c
@@ -1,7 +1,7 @@
 
 /* pngwutil.c - utilities to write a PNG file
  *
- * Last changed in libpng 1.4.0 [September 6, 2008]
+ * Last changed in libpng 1.4.0 [October 6, 2008]
  * For conditions of distribution and use, see copyright notice in png.h
  * Copyright (c) 1998-2008 Glenn Randers-Pehrson
  * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
diff --git a/scripts/CMakeLists.txt b/scripts/CMakeLists.txt
index 26cf057..020983d 100644
--- a/scripts/CMakeLists.txt
+++ b/scripts/CMakeLists.txt
@@ -178,7 +178,7 @@
 
 # SET UP LINKS
 set_target_properties(${PNG_LIB_NAME} PROPERTIES
-#    VERSION 0.${PNGLIB_RELEASE}.1.4.0beta34
+#    VERSION 0.${PNGLIB_RELEASE}.1.4.0beta35
      VERSION 0.${PNGLIB_RELEASE}.0
      SOVERSION 0
      CLEAN_DIRECT_OUTPUT 1)
diff --git a/scripts/libpng-config-head.in b/scripts/libpng-config-head.in
index d4be214..6ca4591 100755
--- a/scripts/libpng-config-head.in
+++ b/scripts/libpng-config-head.in
@@ -8,7 +8,7 @@
 
 # Modeled after libxml-config.
 
-version=1.4.0beta34
+version=1.4.0beta35
 prefix=""
 libdir=""
 libs=""
diff --git a/scripts/libpng.pc.in b/scripts/libpng.pc.in
index ed5c888..827e598 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.4.0beta34
+Version: 1.4.0beta35
 Libs: -L${libdir} -lpng14
 Cflags: -I${includedir}
diff --git a/scripts/makefile.32sunu b/scripts/makefile.32sunu
index 654ed9f..bed5141 100644
--- a/scripts/makefile.32sunu
+++ b/scripts/makefile.32sunu
@@ -7,8 +7,8 @@
 
 # Library name:
 LIBNAME=libpng14
-PNGMAJ = 0
-PNGMIN = 1.4.0beta34
+PNGMAJ = 14
+PNGMIN = 1.4.0beta35
 PNGVER = $(PNGMAJ).$(PNGMIN)
 
 # Shared library names:
diff --git a/scripts/makefile.64sunu b/scripts/makefile.64sunu
index aa2583e..f6bf09b 100644
--- a/scripts/makefile.64sunu
+++ b/scripts/makefile.64sunu
@@ -7,8 +7,8 @@
 
 # Library name:
 LIBNAME=libpng14
-PNGMAJ = 0
-PNGMIN = 1.4.0beta34
+PNGMAJ = 14
+PNGMIN = 1.4.0beta35
 PNGVER = $(PNGMAJ).$(PNGMIN)
 
 # Shared library names:
diff --git a/scripts/makefile.aix b/scripts/makefile.aix
index 57ba66a..3094cd6 100644
--- a/scripts/makefile.aix
+++ b/scripts/makefile.aix
@@ -19,8 +19,8 @@
 LN_SF = ln -f -s
 
 LIBNAME=libpng14
-PNGMAJ = 0
-PNGMIN = 1.4.0beta34
+PNGMAJ = 14
+PNGMIN = 1.4.0beta35
 PNGVER = $(PNGMAJ).$(PNGMIN)
 
 prefix=/usr/local
diff --git a/scripts/makefile.beos b/scripts/makefile.beos
index 9cab227..577563f 100644
--- a/scripts/makefile.beos
+++ b/scripts/makefile.beos
@@ -7,8 +7,8 @@
 
 # Library name:
 LIBNAME=libpng14
-PNGMAJ = 0
-PNGMIN = 1.4.0beta34
+PNGMAJ = 14
+PNGMIN = 1.4.0beta35
 PNGVER = $(PNGMAJ).$(PNGMIN)
 
 # Shared library names:
diff --git a/scripts/makefile.cygwin b/scripts/makefile.cygwin
index a7164c0..0aebe9b 100644
--- a/scripts/makefile.cygwin
+++ b/scripts/makefile.cygwin
@@ -63,9 +63,9 @@
 	-fomit-frame-pointer) # $(WARNMORE) -g -DPNG_DEBUG=5
 
 LIBNAME = libpng14
-PNGMAJ = 0
+PNGMAJ = 14
 CYGDLL = 14
-PNGMIN = 1.4.0beta34
+PNGMIN = 1.4.0beta35
 PNGVER = $(PNGMAJ).$(PNGMIN)
 
 SHAREDLIB=cygpng$(CYGDLL).dll
diff --git a/scripts/makefile.darwin b/scripts/makefile.darwin
index fd51c0b..cbc25da 100644
--- a/scripts/makefile.darwin
+++ b/scripts/makefile.darwin
@@ -1,5 +1,5 @@
 # makefile for libpng on Darwin / Mac OS X
-# Copyright (C) 2002, 2004, 2006 Glenn Randers-Pehrson
+# Copyright (C) 2002, 2004, 2006, 2008 Glenn Randers-Pehrson
 # Copyright (C) 2001 Christoph Pfisterer
 # derived from makefile.linux:
 #  Copyright (C) 1998, 1999 Greg Roelofs
@@ -19,7 +19,7 @@
 # Library name:
 LIBNAME = libpng14
 PNGMAJ = 12
-PNGMIN = 1.4.0beta34
+PNGMIN = 1.4.0beta35
 PNGVER = $(PNGMAJ).$(PNGMIN)
 
 # Shared library names:
@@ -104,14 +104,14 @@
 $(LIBSOVER): $(OBJSDLL)
 	$(CC) -dynamiclib \
 	 -install_name $(LIBPATH)/$(LIBSOMAJ) \
-	 -current_version $(PNGVER) -compatibility_version $(PNGVER) \
+	 -current_version 14 -compatibility_version 14 \
 	 -o $(LIBSOVER) \
 	 $(OBJSDLL) -L$(ZLIBLIB) -lz
 
 $(OLDSOVER): $(OBJSDLL)
 	$(CC) -dynamiclib \
 	 -install_name $(LIBPATH)/$(OLDSOMAJ) \
-	 -current_version 3 -compatibility_version 3 \
+	 -current_version 14 -compatibility_version 14 \
 	 -o $(OLDSOVER) \
 	 $(OBJSDLL) -L$(ZLIBLIB) -lz
 
diff --git a/scripts/makefile.dec b/scripts/makefile.dec
index aaa8eeb..107f6ca 100644
--- a/scripts/makefile.dec
+++ b/scripts/makefile.dec
@@ -4,8 +4,8 @@
 # For conditions of distribution and use, see copyright notice in png.h
 
 # Library name:
-PNGMAJ = 0
-PNGMIN = 1.4.0beta34
+PNGMAJ = 14
+PNGMIN = 1.4.0beta35
 PNGVER = $(PNGMAJ).$(PNGMIN)
 LIBNAME = libpng14
 
diff --git a/scripts/makefile.elf b/scripts/makefile.elf
index 37a1a79..0d45672 100644
--- a/scripts/makefile.elf
+++ b/scripts/makefile.elf
@@ -11,8 +11,8 @@
 
 # Library name:
 LIBNAME = libpng14
-PNGMAJ = 0
-PNGMIN = 1.4.0beta34
+PNGMAJ = 14
+PNGMIN = 1.4.0beta35
 PNGVER = $(PNGMAJ).$(PNGMIN)
 
 # Shared library names:
diff --git a/scripts/makefile.gcmmx b/scripts/makefile.gcmmx
index 9c5c719..12ccaa9 100644
--- a/scripts/makefile.gcmmx
+++ b/scripts/makefile.gcmmx
@@ -15,8 +15,8 @@
 
 # Library name:
 LIBNAME = libpng14
-PNGMAJ = 0
-PNGMIN = 1.4.0beta34
+PNGMAJ = 14
+PNGMIN = 1.4.0beta35
 PNGVER = $(PNGMAJ).$(PNGMIN)
 
 # Shared library names:
diff --git a/scripts/makefile.hp64 b/scripts/makefile.hp64
index 7a23130..6bd63bb 100644
--- a/scripts/makefile.hp64
+++ b/scripts/makefile.hp64
@@ -17,8 +17,8 @@
 
 # Library name:
 LIBNAME = libpng14
-PNGMAJ = 0
-PNGMIN = 1.4.0beta34
+PNGMAJ = 14
+PNGMIN = 1.4.0beta35
 PNGVER = $(PNGMAJ).$(PNGMIN)
 
 # Shared library names:
diff --git a/scripts/makefile.hpgcc b/scripts/makefile.hpgcc
index 681a0f3..8208d03 100644
--- a/scripts/makefile.hpgcc
+++ b/scripts/makefile.hpgcc
@@ -7,8 +7,8 @@
 
 # Library name:
 LIBNAME = libpng14
-PNGMAJ = 0
-PNGMIN = 1.4.0beta34
+PNGMAJ = 14
+PNGMIN = 1.4.0beta35
 PNGVER = $(PNGMAJ).$(PNGMIN)
 
 # Shared library names:
diff --git a/scripts/makefile.hpux b/scripts/makefile.hpux
index ebd3fe7..87f8694 100644
--- a/scripts/makefile.hpux
+++ b/scripts/makefile.hpux
@@ -17,8 +17,8 @@
 
 # Library name:
 LIBNAME = libpng14
-PNGMAJ = 0
-PNGMIN = 1.4.0beta34
+PNGMAJ = 14
+PNGMIN = 1.4.0beta35
 PNGVER = $(PNGMAJ).$(PNGMIN)
 
 # Shared library names:
diff --git a/scripts/makefile.linux b/scripts/makefile.linux
index 97759d6..2cc6ed4 100644
--- a/scripts/makefile.linux
+++ b/scripts/makefile.linux
@@ -5,8 +5,8 @@
 
 # Library name:
 LIBNAME = libpng14
-PNGMAJ = 0
-PNGMIN = 1.4.0beta34
+PNGMAJ = 14
+PNGMIN = 1.4.0beta35
 PNGVER = $(PNGMAJ).$(PNGMIN)
 
 # Shared library names:
diff --git a/scripts/makefile.mingw b/scripts/makefile.mingw
index e60779f..22017bb 100644
--- a/scripts/makefile.mingw
+++ b/scripts/makefile.mingw
@@ -79,9 +79,9 @@
 	-fomit-frame-pointer) # $(WARNMORE) -g -DPNG_DEBUG=5
 
 LIBNAME = libpng14
-PNGMAJ = 0 
+PNGMAJ = 14 
 MINGDLL = 14
-PNGMIN = 1.4.0beta34
+PNGMIN = 1.4.0beta35
 PNGVER = $(PNGMAJ).$(PNGMIN)
 
 SHAREDLIB=libpng$(MINGDLL).dll
diff --git a/scripts/makefile.ne12bsd b/scripts/makefile.ne12bsd
index ca76682..8252f87 100644
--- a/scripts/makefile.ne12bsd
+++ b/scripts/makefile.ne12bsd
@@ -14,7 +14,7 @@
 
 LIB=	png14
 SHLIB_MAJOR=	0
-SHLIB_MINOR=	1.4.0beta34
+SHLIB_MINOR=	1.4.0beta35
 SRCS=	pnggccrd.c 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 f87e43c..4f8f0b7 100644
--- a/scripts/makefile.netbsd
+++ b/scripts/makefile.netbsd
@@ -13,7 +13,7 @@
 
 LIB=	png
 SHLIB_MAJOR=	3
-SHLIB_MINOR=	1.4.0beta34
+SHLIB_MINOR=	1.4.0beta35
 SRCS=	pnggccrd.c 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.nommx b/scripts/makefile.nommx
index 21c4fe9..651ab87 100644
--- a/scripts/makefile.nommx
+++ b/scripts/makefile.nommx
@@ -15,8 +15,8 @@
 
 # Library name:
 LIBNAME = libpng14
-PNGMAJ = 0
-PNGMIN = 1.4.0beta34
+PNGMAJ = 14
+PNGMIN = 1.4.0beta35
 PNGVER = $(PNGMAJ).$(PNGMIN)
 
 # Shared library names:
diff --git a/scripts/makefile.openbsd b/scripts/makefile.openbsd
index 0265e02..a0bea6e 100644
--- a/scripts/makefile.openbsd
+++ b/scripts/makefile.openbsd
@@ -8,7 +8,7 @@
 MANDIR= ${PREFIX}/man/cat
 
 SHLIB_MAJOR=	0
-SHLIB_MINOR=	1.4.0beta34
+SHLIB_MINOR=	1.4.0beta35
 
 LIB=	png
 SRCS=	png.c pngerror.c pnggccrd.c pngget.c pngmem.c pngpread.c \
diff --git a/scripts/makefile.sco b/scripts/makefile.sco
index 51c816e..ed2d1a5 100644
--- a/scripts/makefile.sco
+++ b/scripts/makefile.sco
@@ -8,8 +8,8 @@
 
 # Library name:
 LIBNAME = libpng14
-PNGMAJ = 0
-PNGMIN = 1.4.0beta34
+PNGMAJ = 14
+PNGMIN = 1.4.0beta35
 PNGVER = $(PNGMAJ).$(PNGMIN)
 
 # Shared library names:
diff --git a/scripts/makefile.sggcc b/scripts/makefile.sggcc
index ee4dede..0e51768 100644
--- a/scripts/makefile.sggcc
+++ b/scripts/makefile.sggcc
@@ -5,8 +5,8 @@
 
 # Library name:
 LIBNAME=libpng14
-PNGMAJ = 0
-PNGMIN = 1.4.0beta34
+PNGMAJ = 14
+PNGMIN = 1.4.0beta35
 PNGVER = $(PNGMAJ).$(PNGMIN)
 
 # Shared library names:
diff --git a/scripts/makefile.sgi b/scripts/makefile.sgi
index 320ebf3..0d2a7b5 100644
--- a/scripts/makefile.sgi
+++ b/scripts/makefile.sgi
@@ -5,8 +5,8 @@
 
 # Library name:
 LIBNAME=libpng14
-PNGMAJ = 0
-PNGMIN = 1.4.0beta34
+PNGMAJ = 14
+PNGMIN = 1.4.0beta35
 PNGVER = $(PNGMAJ).$(PNGMIN)
 
 # Shared library names:
diff --git a/scripts/makefile.so9 b/scripts/makefile.so9
index 15f86d6..2dcfcd3 100644
--- a/scripts/makefile.so9
+++ b/scripts/makefile.so9
@@ -7,8 +7,8 @@
 # For conditions of distribution and use, see copyright notice in png.h
 
 # Library name:
-PNGMAJ = 0
-PNGMIN = 1.4.0beta34
+PNGMAJ = 14
+PNGMIN = 1.4.0beta35
 PNGVER = $(PNGMAJ).$(PNGMIN)
 LIBNAME = libpng14
 
diff --git a/scripts/makefile.solaris b/scripts/makefile.solaris
index abf40c9..4f747ab 100644
--- a/scripts/makefile.solaris
+++ b/scripts/makefile.solaris
@@ -7,8 +7,8 @@
 
 # Library name:
 LIBNAME = libpng14
-PNGMAJ = 0
-PNGMIN = 1.4.0beta34
+PNGMAJ = 14
+PNGMIN = 1.4.0beta35
 PNGVER = $(PNGMAJ).$(PNGMIN)
 
 # Shared library names:
diff --git a/scripts/pngos2.def b/scripts/pngos2.def
index c8af691..98c1990 100644
--- a/scripts/pngos2.def
+++ b/scripts/pngos2.def
@@ -2,7 +2,7 @@
 ; PNG.LIB module definition file for OS/2
 ;----------------------------------------
 
-; Version 1.4.0beta34
+; Version 1.4.0beta35
 
 LIBRARY		PNG
 DESCRIPTION	"PNG image compression library for OS/2"
diff --git a/scripts/pngwin.def b/scripts/pngwin.def
index 0b1c822..dad366b 100644
--- a/scripts/pngwin.def
+++ b/scripts/pngwin.def
@@ -5,7 +5,7 @@
 LIBRARY
 
 EXPORTS
-;Version 1.4.0beta34
+;Version 1.4.0beta35
   png_build_grayscale_palette
   png_chunk_error
   png_chunk_warning