From 4245e6b1b2679bcb1f0e92944fc7873f2385eac5 Mon Sep 17 00:00:00 2001 From: Mans Rullgard Date: Tue, 5 Feb 2013 09:55:36 -0600 Subject: [PATCH] [libpng17] Fixed ARM support (Mans Rullgard). Also removed stray out-of-order #endif and #ifdef --- ANNOUNCE | 2 ++ CHANGES | 4 ++++ pngpriv.h | 7 +++---- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/ANNOUNCE b/ANNOUNCE index 54771833e..0ac86ce2f 100644 --- a/ANNOUNCE +++ b/ANNOUNCE @@ -123,6 +123,8 @@ Version 1.7.0alpha10 [February 5, 2013] Added png_get_palette_max() function. Changed png_size_t to size_t throughout headers, make sRGB check numbers consistent. + Fixed ARM support (Mans Rullgard). + Removed stray out-of-order #endif and #ifdef (Mans Rullgard). =========================================================================== NOTICE November 17, 2012: diff --git a/CHANGES b/CHANGES index 5f2d00245..841a3bedb 100644 --- a/CHANGES +++ b/CHANGES @@ -4409,6 +4409,10 @@ Version 1.7.0alpha10 [February 5, 2013] Added png_get_palette_max() function. Changed png_size_t to size_t throughout headers, make sRGB check numbers consistent. + Ported libpng 1.5 options.awk/dfn file handling to 1.7, fixed one bug. + Fixed ARM support (Mans Rullgard). + Removed stray out-of-order #endif and #ifdef (Mans Rullgard). + =========================================================================== NOTICE November 17, 2012: diff --git a/pngpriv.h b/pngpriv.h index 37c08ec70..9ebc510c2 100644 --- a/pngpriv.h +++ b/pngpriv.h @@ -194,8 +194,6 @@ # endif #endif -#include "png.h" - /* pngconf.h does not set PNG_DLL_EXPORT unless it is required, so: */ #ifndef PNG_DLL_EXPORT # define PNG_DLL_EXPORT @@ -328,6 +326,7 @@ # define PNGFAPI /* PRIVATE */ #endif +#ifndef PNG_VERSION_INFO_ONLY /* Other defines specific to compilers can go here. Try to keep * them inside an appropriate ifdef/endif pair for portability. */ @@ -369,6 +368,7 @@ # include # endif #endif /* FLOATING_ARITHMETIC || FLOATING_POINT */ +#endif /* VERSION_INFO_ONLY */ /* These macros may need to be architecture dependent. */ #define PNG_ALIGN_NONE 0 /* do not use data alignment */ @@ -539,7 +539,6 @@ /* Given a value 'linear' in the range 0..255*65535 calculate the 8-bit sRGB * encoded value with maximum error 0.646365. Note that the input is not a * 16-bit value; it has been multiplied by 255! */ -#endif /* PNG_SIMPLIFIED_READ/WRITE */ /* Added to libpng-1.6.0: scale a 16-bit value in the range 0..65535 to 0..255 * by dividing by 257 *with rounding*. This macro is exact for the given range. @@ -680,6 +679,7 @@ */ #ifndef PNG_VERSION_INFO_ONLY +#include "png.h" #include "pngstruct.h" #include "pnginfo.h" @@ -691,7 +691,6 @@ typedef const png_uint_16p * png_const_uint_16pp; /* Added to libpng-1.5.7: sRGB conversion tables */ #if defined PNG_SIMPLIFIED_READ_SUPPORTED ||\ defined PNG_SIMPLIFIED_WRITE_SUPPORTED -#ifdef PNG_SIMPLIFIED_READ_SUPPORTED PNG_INTERNAL_DATA(const png_uint_16, png_sRGB_table, [256]); /* Convert from an sRGB encoded value 0..255 to a 16-bit linear value, * 0..65535. This table gives the closest 16-bit answers (no errors).