From 9a48b6506cf1b4d98fa7d4e15f851430b6c07ada Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Sun, 5 May 2013 08:35:29 +0200 Subject: [PATCH] gd: don't include png.h (breaks build on some old version), so report libPNG version only with external libgd --- ext/gd/gd.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/ext/gd/gd.c b/ext/gd/gd.c index 9b326305bc..6147353cb6 100644 --- a/ext/gd/gd.c +++ b/ext/gd/gd.c @@ -53,10 +53,6 @@ # include #endif -#ifdef HAVE_GD_PNG -# include -#endif - #ifdef HAVE_GD_JPG # include #endif @@ -66,13 +62,6 @@ #endif #ifndef HAVE_GD_BUNDLED -#ifdef HAVE_GD_PNG -const char * gdPngGetVersionString() -{ - return PNG_LIBPNG_VER_STRING; -} -#endif /* HAVE_GD_PNG */ - #ifdef HAVE_GD_JPG int gdJpegGetVersionInt() { @@ -1361,7 +1350,9 @@ PHP_MINFO_FUNCTION(gd) #ifdef HAVE_GD_PNG php_info_print_table_row(2, "PNG Support", "enabled"); +#ifndef HAVE_GD_BUNDLED php_info_print_table_row(2, "libPNG Version", gdPngGetVersionString()); +#endif #endif php_info_print_table_row(2, "WBMP Support", "enabled"); #if defined(HAVE_GD_XPM) -- 2.40.0