summaryrefslogtreecommitdiff
path: root/pngget.c
diff options
context:
space:
mode:
authorJohn Bowler <jbowler@acm.org>2012-12-17 21:07:30 -0600
committerGlenn Randers-Pehrson <glennrp at users.sourceforge.net>2012-12-17 21:07:30 -0600
commitfbbbc620b80eb54fe469901f92b62785358f4ce4 (patch)
tree5a304e6ee863d54260b50fd779a756c1503194f3 /pngget.c
parent9b99600c4ddf29dd218efb07d8e1b81e50808d9e (diff)
downloadlibpng-fbbbc620b80eb54fe469901f92b62785358f4ce4.tar.gz
[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.
Diffstat (limited to 'pngget.c')
-rw-r--r--pngget.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/pngget.c b/pngget.c
index b7e977780..2d60be859 100644
--- a/pngget.c
+++ b/pngget.c
@@ -843,9 +843,8 @@ png_get_pCAL(png_const_structrp png_ptr, png_const_inforp info_ptr,
#endif
#ifdef PNG_sCAL_SUPPORTED
-# ifdef PNG_FIXED_POINT_SUPPORTED
-# if (defined PNG_FLOATING_ARITHMETIC_SUPPORTED) || \
- (defined PNG_FLOATING_POINT_SUPPORTED)
+# ifdef PNG_FLOATING_ARITHMETIC_SUPPORTED
+# ifdef PNG_FIXED_POINT_SUPPORTED
png_uint_32 PNGAPI
png_get_sCAL_fixed(png_const_structrp png_ptr, png_const_inforp info_ptr,
int *unit, png_fixed_point *width, png_fixed_point *height)
@@ -866,9 +865,8 @@ png_get_sCAL_fixed(png_const_structrp png_ptr, png_const_inforp info_ptr,
return(0);
}
-# endif /* FLOATING_ARITHMETIC */
-# endif /* FIXED_POINT */
-# ifdef PNG_FLOATING_POINT_SUPPORTED
+# endif /* FIXED_POINT */
+# ifdef PNG_FLOATING_POINT_SUPPORTED
png_uint_32 PNGAPI
png_get_sCAL(png_const_structrp png_ptr, png_const_inforp info_ptr,
int *unit, double *width, double *height)
@@ -884,7 +882,9 @@ png_get_sCAL(png_const_structrp png_ptr, png_const_inforp info_ptr,
return(0);
}
-# endif /* FLOATING POINT */
+# endif /* FLOATING POINT */
+# endif /* FLOATING_ARITHMETIC */
+
png_uint_32 PNGAPI
png_get_sCAL_s(png_const_structrp png_ptr, png_const_inforp info_ptr,
int *unit, png_charpp width, png_charpp height)