From: Remi Collet Date: Sun, 5 May 2013 06:35:29 +0000 (+0200) Subject: gd: don't include png.h (breaks build on some old version), so report libPNG version... X-Git-Tag: php-5.5.0RC1~10 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9a48b6506cf1b4d98fa7d4e15f851430b6c07ada;p=php gd: don't include png.h (breaks build on some old version), so report libPNG version only with external libgd --- 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)