From 0a7508fd9b44b7fc9b7350fad77dec48cf96c12a Mon Sep 17 00:00:00 2001 From: John Bowler Date: Thu, 20 Dec 2012 22:33:13 -0600 Subject: [PATCH] [libpng15] 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. --- ANNOUNCE | 9 ++++++-- CHANGES | 7 +++++- pngconf.h | 23 ++++++++++--------- pngwrite.c | 1 - projects/vstudio/libpng/libpng.vcxproj | 2 +- .../vstudio/pnglibconf/pnglibconf.vcxproj | 1 + projects/vstudio/pngtest/pngtest.vcxproj | 2 +- projects/vstudio/pngvalid/pngvalid.vcxproj | 2 +- projects/vstudio/readme.txt | 2 +- projects/vstudio/zlib.props | 10 +++++++- projects/vstudio/zlib/zlib.vcxproj | 2 +- 11 files changed, 40 insertions(+), 21 deletions(-) diff --git a/ANNOUNCE b/ANNOUNCE index a3ae6a42c..274cf53a4 100644 --- a/ANNOUNCE +++ b/ANNOUNCE @@ -1,5 +1,5 @@ -Libpng 1.5.14beta05 - December 19, 2012 +Libpng 1.5.14beta05 - December 21, 2012 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. @@ -53,7 +53,12 @@ Version 1.5.14beta04 [December 19, 2012] Disassembled the version number in scripts/options.awk (necessary for building on SunOs). -Version 1.5.14beta05 [December 19, 2012] +Version 1.5.14beta05 [December 21, 2012] + 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 ee67ff926..7cd17255b 100644 --- a/CHANGES +++ b/CHANGES @@ -3946,7 +3946,12 @@ Version 1.5.14beta04 [December 19, 2012] Disassembled the version number in scripts/options.awk (necessary for building on SunOs). -Version 1.5.14beta05 [December 19, 2012] +Version 1.5.14beta05 [December 21, 2012] + 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 285bf3bc6..4ee5fd962 100644 --- a/pngconf.h +++ b/pngconf.h @@ -1,7 +1,7 @@ /* pngconf.h - machine configurable file for libpng * - * libpng version 1.5.14beta05 - December 19, 2012 + * libpng version 1.5.14beta05 - December 21, 2012 * * Copyright (c) 1998-2012 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) @@ -177,18 +177,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 @@ -202,6 +200,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 @@ -239,7 +240,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 2c8243af8..42e9e4b0f 100644 --- a/pngwrite.c +++ b/pngwrite.c @@ -420,7 +420,6 @@ png_write_end(png_structp png_ptr, png_infop info_ptr) } #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 FAR * ttime) { diff --git a/projects/vstudio/libpng/libpng.vcxproj b/projects/vstudio/libpng/libpng.vcxproj index c4bf04184..f2efa73f7 100644 --- a/projects/vstudio/libpng/libpng.vcxproj +++ b/projects/vstudio/libpng/libpng.vcxproj @@ -23,8 +23,8 @@ Win32Proj libpng - + DynamicLibrary MultiByte diff --git a/projects/vstudio/pnglibconf/pnglibconf.vcxproj b/projects/vstudio/pnglibconf/pnglibconf.vcxproj index 7c691c32d..e2a232cb6 100644 --- a/projects/vstudio/pnglibconf/pnglibconf.vcxproj +++ b/projects/vstudio/pnglibconf/pnglibconf.vcxproj @@ -17,6 +17,7 @@ true MultiByte + diff --git a/projects/vstudio/pngtest/pngtest.vcxproj b/projects/vstudio/pngtest/pngtest.vcxproj index a03dca565..561370d01 100644 --- a/projects/vstudio/pngtest/pngtest.vcxproj +++ b/projects/vstudio/pngtest/pngtest.vcxproj @@ -23,8 +23,8 @@ Win32Proj pngtest - + Application Unicode diff --git a/projects/vstudio/pngvalid/pngvalid.vcxproj b/projects/vstudio/pngvalid/pngvalid.vcxproj index 6a0a6e4f3..2cd0e7bf6 100644 --- a/projects/vstudio/pngvalid/pngvalid.vcxproj +++ b/projects/vstudio/pngvalid/pngvalid.vcxproj @@ -23,8 +23,8 @@ Win32Proj pngvalid - + Application Unicode diff --git a/projects/vstudio/readme.txt b/projects/vstudio/readme.txt index a9cb1a400..a8d8de4ce 100644 --- a/projects/vstudio/readme.txt +++ b/projects/vstudio/readme.txt @@ -1,7 +1,7 @@ VisualStudio instructions -libpng version 1.5.14beta05 - December 19, 2012 +libpng version 1.5.14beta05 - December 21, 2012 Copyright (c) 1998-2010 Glenn Randers-Pehrson diff --git a/projects/vstudio/zlib.props b/projects/vstudio/zlib.props index 26cecfa02..e4d597519 100644 --- a/projects/vstudio/zlib.props +++ b/projects/vstudio/zlib.props @@ -2,7 +2,7 @@ ..\..\..\..\zlib-1.2.5 + + + true diff --git a/projects/vstudio/zlib/zlib.vcxproj b/projects/vstudio/zlib/zlib.vcxproj index d62781796..4857ffadd 100644 --- a/projects/vstudio/zlib/zlib.vcxproj +++ b/projects/vstudio/zlib/zlib.vcxproj @@ -34,8 +34,8 @@ Win32Proj - + StaticLibrary