[libpng16] Fixed Windows build issues, enabled ARM compilation. Various warnings issued

by earlier versions of GCC fixed for Cygwin and Min/GW (which both use old GCCs.)
ARM support is enabled by default in zlib.props (unsupported by Microsoft) and
ARM compilation is made possible by deleting the check for x86. The test programs
cannot be run because they are not signed.
diff --git a/ANNOUNCE b/ANNOUNCE
index 9ae7ccb..7af8959 100644
--- a/ANNOUNCE
+++ b/ANNOUNCE
@@ -572,6 +572,11 @@
 Version 1.6.0beta35 [December 21, 2012]
   Made default Zlib compression settings be configurable. This adds #defines to
     pnglibconf.h to control the defaults.
+  Fixed Windows build issues, enabled ARM compilation. Various warnings issued by
+    earlier versions of GCC fixed for Cygwin and Min/GW (which both use old GCCs.)
+    ARM support is enabled by default in zlib.props (unsupported by Microsoft) and
+    ARM compilation is made possible by deleting the check for x86. The test programs
+    cannot be run because they are not signed.
 
   ===========================================================================
                        NOTICE November 17, 2012:
diff --git a/CHANGES b/CHANGES
index 41fcc57..f9613a9 100644
--- a/CHANGES
+++ b/CHANGES
@@ -4324,6 +4324,11 @@
 Version 1.6.0beta35 [December 21, 2012]
   Made default Zlib compression settings be configurable. This adds #defines to
     pnglibconf.h to control the defaults.
+  Fixed Windows build issues, enabled ARM compilation. Various warnings issued by
+    earlier versions of GCC fixed for Cygwin and Min/GW (which both use old GCCs.)
+    ARM support is enabled by default in zlib.props (unsupported by Microsoft) and
+    ARM compilation is made possible by deleting the check for x86. The test programs
+    cannot be run because they are not signed.
 
   ===========================================================================
                        NOTICE November 17, 2012:
diff --git a/pngconf.h b/pngconf.h
index 458e92b..8d7b75e 100644
--- a/pngconf.h
+++ b/pngconf.h
@@ -1,7 +1,7 @@
 
 /* pngconf.h - machine configurable file for libpng
  *
- * libpng version 1.6.0beta35 - December 19, 2012
+ * libpng version 1.6.0beta35 - December 21, 2012
  *
  * Copyright (c) 1998-2012 Glenn Randers-Pehrson
  * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
@@ -198,18 +198,16 @@
  * ==========================
  * This code is used at build time to find PNG_IMPEXP, the API settings
  * and PNG_EXPORT_TYPE(), it may also set a macro to indicate the DLL
- * import processing is possible.  On Windows/x86 systems it also sets
+ * import processing is possible.  On Windows systems it also sets
  * compiler-specific macros to the values required to change the calling
  * conventions of the various functions.
  */
-#if ( defined(_Windows) || defined(_WINDOWS) || defined(WIN32) ||\
-      defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) ) &&\
-    ( defined(_X86_) || defined(_X64_) || defined(_M_IX86) ||\
-      defined(_M_X64) || defined(_M_IA64) )
-  /* Windows system (DOS doesn't support DLLs) running on x86/x64.  Includes
-   * builds under Cygwin or MinGW.  Also includes Watcom builds but these need
-   * special treatment because they are not compatible with GCC or Visual C
-   * because of different calling conventions.
+#if defined(_Windows) || defined(_WINDOWS) || defined(WIN32) ||\
+    defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
+  /* Windows system (DOS doesn't support DLLs).  Includes builds under Cygwin or
+   * MinGW on any architecture currently supported by Windows.  Also includes
+   * Watcom builds but these need special treatment because they are not
+   * compatible with GCC or Visual C because of different calling conventions.
    */
 #  if PNG_API_RULE == 2
     /* If this line results in an error, either because __watcall is not
@@ -223,6 +221,9 @@
 #  if defined(__GNUC__) || (defined (_MSC_VER) && (_MSC_VER >= 800))
 #    define PNGCAPI __cdecl
 #    if PNG_API_RULE == 1
+       /* If this line results in an error __stdcall is not understood and
+        * PNG_API_RULE should not have been set to '1'.
+        */
 #      define PNGAPI __stdcall
 #    endif
 #  else
@@ -260,7 +261,7 @@
 #    endif
 #  endif /* compiler */
 
-#else /* !Windows/x86 */
+#else /* !Windows */
 #  if (defined(__IBMC__) || defined(__IBMCPP__)) && defined(__OS2__)
 #    define PNGAPI _System
 #  else /* !Windows/x86 && !OS/2 */
diff --git a/pngwrite.c b/pngwrite.c
index 6e333f5..fb1d4e5 100644
--- a/pngwrite.c
+++ b/pngwrite.c
@@ -447,7 +447,6 @@
 }
 
 #ifdef PNG_CONVERT_tIME_SUPPORTED
-/* "tm" structure is not supported on WindowsCE */
 void PNGAPI
 png_convert_from_struct_tm(png_timep ptime, PNG_CONST struct tm * ttime)
 {
diff --git a/projects/vstudio/libpng/libpng.vcxproj b/projects/vstudio/libpng/libpng.vcxproj
index e66b9c6..de7fc3c 100644
--- a/projects/vstudio/libpng/libpng.vcxproj
+++ b/projects/vstudio/libpng/libpng.vcxproj
@@ -23,8 +23,8 @@
     <Keyword>Win32Proj</Keyword>
     <RootNamespace>libpng</RootNamespace>
   </PropertyGroup>
-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
   <Import Project="$(SolutionDir)\zlib.props" />
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
     <ConfigurationType>DynamicLibrary</ConfigurationType>
     <CharacterSet>MultiByte</CharacterSet>
diff --git a/projects/vstudio/pnglibconf/pnglibconf.vcxproj b/projects/vstudio/pnglibconf/pnglibconf.vcxproj
index 7c691c3..e2a232c 100644
--- a/projects/vstudio/pnglibconf/pnglibconf.vcxproj
+++ b/projects/vstudio/pnglibconf/pnglibconf.vcxproj
@@ -17,6 +17,7 @@
     <WholeProgramOptimization>true</WholeProgramOptimization>
     <CharacterSet>MultiByte</CharacterSet>
   </PropertyGroup>
+  <Import Project="$(SolutionDir)\zlib.props" />
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
   <ImportGroup Label="ExtensionSettings">
   </ImportGroup>
diff --git a/projects/vstudio/pngstest/pngstest.vcxproj b/projects/vstudio/pngstest/pngstest.vcxproj
index fc2e9d5..0d2980d 100644
--- a/projects/vstudio/pngstest/pngstest.vcxproj
+++ b/projects/vstudio/pngstest/pngstest.vcxproj
@@ -23,8 +23,8 @@
     <Keyword>Win32Proj</Keyword>
     <RootNamespace>pngstest</RootNamespace>
   </PropertyGroup>
-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
   <Import Project="$(SolutionDir)\zlib.props" />
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
     <ConfigurationType>Application</ConfigurationType>
     <CharacterSet>Unicode</CharacterSet>
@@ -96,7 +96,7 @@
     <Link>
       <SubSystem>Console</SubSystem>
       <GenerateDebugInformation>true</GenerateDebugInformation>
-      <AdditionalDependencies>libpng16.lib;zlib.lib</AdditionalDependencies>
+      <AdditionalDependencies>libpng16.lib</AdditionalDependencies>
       <AdditionalLibraryDirectories>$(OutDir)</AdditionalLibraryDirectories>
     </Link>
     <CustomBuildStep>
@@ -163,7 +163,7 @@
       <GenerateDebugInformation>true</GenerateDebugInformation>
       <EnableCOMDATFolding>true</EnableCOMDATFolding>
       <OptimizeReferences>true</OptimizeReferences>
-      <AdditionalDependencies>libpng16.lib;zlib.lib</AdditionalDependencies>
+      <AdditionalDependencies>libpng16.lib</AdditionalDependencies>
       <AdditionalLibraryDirectories>$(OutDir)</AdditionalLibraryDirectories>
       <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
     </Link>
diff --git a/projects/vstudio/pngtest/pngtest.vcxproj b/projects/vstudio/pngtest/pngtest.vcxproj
index 3680b8c..bf9266f 100644
--- a/projects/vstudio/pngtest/pngtest.vcxproj
+++ b/projects/vstudio/pngtest/pngtest.vcxproj
@@ -23,8 +23,8 @@
     <Keyword>Win32Proj</Keyword>
     <RootNamespace>pngtest</RootNamespace>
   </PropertyGroup>
-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
   <Import Project="$(SolutionDir)\zlib.props" />
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
     <ConfigurationType>Application</ConfigurationType>
     <CharacterSet>Unicode</CharacterSet>
diff --git a/projects/vstudio/pngunknown/pngunknown.vcxproj b/projects/vstudio/pngunknown/pngunknown.vcxproj
index 6f90595..a30cc7a 100644
--- a/projects/vstudio/pngunknown/pngunknown.vcxproj
+++ b/projects/vstudio/pngunknown/pngunknown.vcxproj
@@ -23,8 +23,8 @@
     <Keyword>Win32Proj</Keyword>
     <RootNamespace>pngunknown</RootNamespace>
   </PropertyGroup>
-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
   <Import Project="$(SolutionDir)\zlib.props" />
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
     <ConfigurationType>Application</ConfigurationType>
     <CharacterSet>Unicode</CharacterSet>
@@ -96,7 +96,7 @@
     <Link>
       <SubSystem>Console</SubSystem>
       <GenerateDebugInformation>true</GenerateDebugInformation>
-      <AdditionalDependencies>libpng16.lib;zlib.lib</AdditionalDependencies>
+      <AdditionalDependencies>libpng16.lib</AdditionalDependencies>
       <AdditionalLibraryDirectories>$(OutDir)</AdditionalLibraryDirectories>
     </Link>
     <CustomBuildStep>
@@ -163,7 +163,7 @@
       <GenerateDebugInformation>true</GenerateDebugInformation>
       <EnableCOMDATFolding>true</EnableCOMDATFolding>
       <OptimizeReferences>true</OptimizeReferences>
-      <AdditionalDependencies>libpng16.lib;zlib.lib</AdditionalDependencies>
+      <AdditionalDependencies>libpng16.lib</AdditionalDependencies>
       <AdditionalLibraryDirectories>$(OutDir)</AdditionalLibraryDirectories>
       <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
     </Link>
diff --git a/projects/vstudio/pngvalid/pngvalid.vcxproj b/projects/vstudio/pngvalid/pngvalid.vcxproj
index 84efc4d..07cf241 100644
--- a/projects/vstudio/pngvalid/pngvalid.vcxproj
+++ b/projects/vstudio/pngvalid/pngvalid.vcxproj
@@ -23,8 +23,8 @@
     <Keyword>Win32Proj</Keyword>
     <RootNamespace>pngvalid</RootNamespace>
   </PropertyGroup>
-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
   <Import Project="$(SolutionDir)\zlib.props" />
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
     <ConfigurationType>Application</ConfigurationType>
     <CharacterSet>Unicode</CharacterSet>
diff --git a/projects/vstudio/readme.txt b/projects/vstudio/readme.txt
index 189e26c..b68bf96 100644
--- a/projects/vstudio/readme.txt
+++ b/projects/vstudio/readme.txt
@@ -1,7 +1,7 @@
 
 VisualStudio instructions
 
-libpng version 1.6.0beta35 - December 19, 2012
+libpng version 1.6.0beta35 - December 21, 2012
 
 Copyright (c) 1998-2010 Glenn Randers-Pehrson
 
diff --git a/projects/vstudio/zlib.props b/projects/vstudio/zlib.props
index 348d686..8b7591c 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.0beta35 - December 19, 2012
+ * libpng version 1.6.0beta35 - December 21, 2012
  *
  * Copyright (c) 1998-2011 Glenn Randers-Pehrson
  *
@@ -33,5 +33,13 @@
 	 below:
      -->
     <ZLibSrcDir>..\..\..\..\zlib-1.2.5</ZLibSrcDir>
+
+    <!-- The following line allows compilation for an ARM target with Visual
+         Studio 2012.  Notice that this is not supported by the Visual Studio
+         2012 IDE and that the programs that result cannot be run unless they
+         signed by Microsoft.  This is therefore untested; only Microsoft can
+         test it:
+     -->
+    <WindowsSDKDesktopARMSupport>true</WindowsSDKDesktopARMSupport>
   </PropertyGroup>
 </Project>
diff --git a/projects/vstudio/zlib/zlib.vcxproj b/projects/vstudio/zlib/zlib.vcxproj
index 8e27198..6e5b94a 100644
--- a/projects/vstudio/zlib/zlib.vcxproj
+++ b/projects/vstudio/zlib/zlib.vcxproj
@@ -36,8 +36,8 @@
     <Keyword>Win32Proj</Keyword>
     <RootNamespace>zlib</RootNamespace>
   </PropertyGroup>
-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
   <Import Project="$(SolutionDir)\zlib.props" />
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Library|Win32'" Label="Configuration">
     <ConfigurationType>StaticLibrary</ConfigurationType>
   </PropertyGroup>