[libpng16] Add more conditionals for compiling png_fixed().
This is a small function, but avoiding compiling it also avoids needing to link with "-lm" unnecessarily.
This commit is contained in:
parent
ba2dd33d9c
commit
6954141484
7
png.c
7
png.c
@ -2978,7 +2978,12 @@ png_ascii_from_fixed(png_const_structrp png_ptr, png_charp ascii,
|
|||||||
#endif /* READ_SCAL */
|
#endif /* READ_SCAL */
|
||||||
|
|
||||||
#if defined(PNG_FLOATING_POINT_SUPPORTED) && \
|
#if defined(PNG_FLOATING_POINT_SUPPORTED) && \
|
||||||
!defined(PNG_FIXED_POINT_MACRO_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_sCAL_SUPPORTED) && \
|
||||||
|
defined(PNG_FLOATING_ARITHMETIC_SUPPORTED))
|
||||||
png_fixed_point
|
png_fixed_point
|
||||||
png_fixed(png_const_structrp png_ptr, double fp, png_const_charp text)
|
png_fixed(png_const_structrp png_ptr, double fp, png_const_charp text)
|
||||||
{
|
{
|
||||||
|
@ -749,8 +749,13 @@ PNG_INTERNAL_FUNCTION(void,png_free_buffer_list,(png_structrp png_ptr,
|
|||||||
/* Free the buffer list used by the compressed write code. */
|
/* Free the buffer list used by the compressed write code. */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined PNG_FLOATING_POINT_SUPPORTED &&\
|
#if defined(PNG_FLOATING_POINT_SUPPORTED) && \
|
||||||
!defined PNG_FIXED_POINT_MACRO_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_sCAL_SUPPORTED) && \
|
||||||
|
defined(PNG_FLOATING_ARITHMETIC_SUPPORTED))
|
||||||
PNG_INTERNAL_FUNCTION(png_fixed_point,png_fixed,(png_const_structrp png_ptr,
|
PNG_INTERNAL_FUNCTION(png_fixed_point,png_fixed,(png_const_structrp png_ptr,
|
||||||
double fp, png_const_charp text),PNG_EMPTY);
|
double fp, png_const_charp text),PNG_EMPTY);
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user