[libpng16] Fixed previous support for Z_PREFIX in configure builds, corrected

sCAL APIs; some of these use floating point arithmetic so they need to be
disabled if floating point arithmetic is switched off.  This is a quiet API
change - previously it appeared that the APIs were supported if fixed point
arithmetic was used internally, however they required certain APIs (floor,
modf, frexp, atof) that are part of C floating point support. Changed
png_fixed and the gamma code specific version of the same to avoid floor(),
which may be a library function (not an intrinsic). Removed unused #if 0
code.
This commit is contained in:
John Bowler
2012-12-17 21:07:30 -06:00
committed by Glenn Randers-Pehrson
parent 9b99600c4d
commit fbbbc620b8
10 changed files with 81 additions and 382 deletions

View File

@@ -546,15 +546,13 @@ png_chunk_report(png_const_structrp png_ptr, png_const_charp message, int error)
}
#ifdef PNG_ERROR_TEXT_SUPPORTED
#if defined(PNG_FLOATING_POINT_SUPPORTED) && \
(!defined(PNG_FIXED_POINT_MACRO_SUPPORTED) && \
(defined(PNG_gAMA_SUPPORTED) || defined(PNG_cHRM_SUPPORTED) || \
defined(PNG_sCAL_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) || \
defined(PNG_READ_RGB_TO_GRAY_SUPPORTED)) ||\
defined(PNG_READ_ALPHA_MODE_SUPPORTED) ||\
defined(PNG_READ_GAMMA_SUPPORTED)) || \
(defined(PNG_sCAL_SUPPORTED) && \
defined(PNG_FLOATING_ARITHMETIC_SUPPORTED))
defined(PNG_READ_RGB_TO_GRAY_SUPPORTED)) || \
(defined(PNG_FLOATING_ARITHMETIC_SUPPORTED) &&\
defined(PNG_sCAL_SUPPORTED))
PNG_FUNCTION(void,
png_fixed_error,(png_const_structrp png_ptr, png_const_charp name),PNG_NORETURN)
{