diff --git a/ext/gd/gd.c b/ext/gd/gd.c index f412b2f03bb..9b326305bc2 100644 --- a/ext/gd/gd.c +++ b/ext/gd/gd.c @@ -29,14 +29,6 @@ #include "config.h" #endif -#ifdef HAVE_GD_PNG -#include -#endif - -#ifdef HAVE_GD_JPG -# include -#endif - #include "php.h" #include "php_ini.h" #include "ext/standard/head.h" @@ -61,6 +53,18 @@ # include #endif +#ifdef HAVE_GD_PNG +# include +#endif + +#ifdef HAVE_GD_JPG +# include +#endif + +#ifdef HAVE_GD_XPM +# include +#endif + #ifndef HAVE_GD_BUNDLED #ifdef HAVE_GD_PNG const char * gdPngGetVersionString() diff --git a/ext/gd/php_gd.h b/ext/gd/php_gd.h index c9c9e9de905..269c315e88b 100644 --- a/ext/gd/php_gd.h +++ b/ext/gd/php_gd.h @@ -28,7 +28,7 @@ # endif #endif -#if HAVE_LIBGD +#if defined(HAVE_LIBGD) || defined(HAVE_GD_BUNDLED) /* open_basedir and safe_mode checks */ #define PHP_GD_CHECK_OPEN_BASEDIR(filename, errormsg) \