Changeset View
Changeset View
Standalone View
Standalone View
graphics/php74-gd/files/patch-gd.c
--- gd.c.orig 2018-09-25 09:07:58 UTC | --- gd.c.orig 2019-08-06 06:54:09 UTC | ||||
+++ gd.c | +++ gd.c | ||||
@@ -51,7 +51,7 @@ | @@ -73,7 +73,7 @@ static int le_gd, le_gd_font; | ||||
# include <Wingdi.h> | # include FT_FREETYPE_H | ||||
#endif | #endif | ||||
-#ifdef HAVE_GD_XPM | |||||
+#if defined(HAVE_XPM) && defined(HAVE_GD_XPM) | |||||
# include <X11/xpm.h> | |||||
#endif | |||||
@@ -75,7 +75,7 @@ static int le_gd, le_gd_font; | |||||
# endif | |||||
#endif | |||||
-#if defined(HAVE_GD_XPM) && defined(HAVE_GD_BUNDLED) | -#if defined(HAVE_GD_XPM) && defined(HAVE_GD_BUNDLED) | ||||
+#if defined(HAVE_XPM) && defined(HAVE_GD_XPM) && defined(HAVE_GD_BUNDLED) | +#if defined(HAVE_XPM) && defined(HAVE_GD_XPM) && defined(HAVE_GD_BUNDLED) | ||||
# include "X11/xpm.h" | # include "X11/xpm.h" | ||||
Context not available. | |||||
ZEND_BEGIN_ARG_INFO(arginfo_imagecreatefromxpm, 0) | ZEND_BEGIN_ARG_INFO(arginfo_imagecreatefromxpm, 0) | ||||
ZEND_ARG_INFO(0, filename) | ZEND_ARG_INFO(0, filename) | ||||
ZEND_END_ARG_INFO() | ZEND_END_ARG_INFO() | ||||
@@ -931,7 +931,7 @@ static const zend_function_entry gd_func | @@ -935,7 +935,7 @@ static const zend_function_entry gd_func | ||||
#endif | #endif | ||||
PHP_FE(imagecreatefromwbmp, arginfo_imagecreatefromwbmp) | PHP_FE(imagecreatefromwbmp, arginfo_imagecreatefromwbmp) | ||||
PHP_FE(imagecreatefromxbm, arginfo_imagecreatefromxbm) | PHP_FE(imagecreatefromxbm, arginfo_imagecreatefromxbm) | ||||
Context not available. | |||||
PHP_FE(imagecreatefromxpm, arginfo_imagecreatefromxpm) | PHP_FE(imagecreatefromxpm, arginfo_imagecreatefromxpm) | ||||
#endif | #endif | ||||
PHP_FE(imagecreatefromgd, arginfo_imagecreatefromgd) | PHP_FE(imagecreatefromgd, arginfo_imagecreatefromgd) | ||||
@@ -1296,7 +1296,7 @@ PHP_MINFO_FUNCTION(gd) | @@ -1312,7 +1312,7 @@ PHP_MINFO_FUNCTION(gd) | ||||
php_info_print_table_row(2, "libPNG Version", gdPngGetVersionString()); | |||||
#endif | #endif | ||||
#endif | |||||
php_info_print_table_row(2, "WBMP Support", "enabled"); | php_info_print_table_row(2, "WBMP Support", "enabled"); | ||||
-#if defined(HAVE_GD_XPM) | -#if defined(HAVE_GD_XPM) | ||||
+#if defined(HAVE_XPM) && defined(HAVE_GD_XPM) | +#if defined(HAVE_XPM) && defined(HAVE_GD_XPM) | ||||
php_info_print_table_row(2, "XPM Support", "enabled"); | php_info_print_table_row(2, "XPM Support", "enabled"); | ||||
#if defined(HAVE_GD_BUNDLED) | |||||
{ | { | ||||
char tmp[12]; | @@ -1371,7 +1371,7 @@ PHP_FUNCTION(gd_info) | ||||
@@ -1351,7 +1351,7 @@ PHP_FUNCTION(gd_info) | |||||
add_assoc_bool(return_value, "PNG Support", 0); | add_assoc_bool(return_value, "PNG Support", 0); | ||||
#endif | #endif | ||||
add_assoc_bool(return_value, "WBMP Support", 1); | add_assoc_bool(return_value, "WBMP Support", 1); | ||||
Context not available. | |||||
add_assoc_bool(return_value, "XPM Support", 1); | add_assoc_bool(return_value, "XPM Support", 1); | ||||
#else | #else | ||||
add_assoc_bool(return_value, "XPM Support", 0); | add_assoc_bool(return_value, "XPM Support", 0); | ||||
@@ -2178,7 +2178,7 @@ PHP_FUNCTION(imagetypes) | @@ -2213,7 +2213,7 @@ PHP_FUNCTION(imagetypes) | ||||
ret |= PHP_IMG_PNG; | ret |= PHP_IMG_PNG; | ||||
#endif | #endif | ||||
ret |= PHP_IMG_WBMP; | ret |= PHP_IMG_WBMP; | ||||
Context not available. | |||||
ret |= PHP_IMG_XPM; | ret |= PHP_IMG_XPM; | ||||
#endif | #endif | ||||
#ifdef HAVE_GD_WEBP | #ifdef HAVE_GD_WEBP | ||||
@@ -2446,7 +2446,7 @@ static void _php_image_create_from(INTER | @@ -2487,7 +2487,7 @@ static void _php_image_create_from(INTER | ||||
case PHP_GDIMG_TYPE_GD2PART: | case PHP_GDIMG_TYPE_GD2PART: | ||||
im = (*func_p)(fp, srcx, srcy, width, height); | im = (*func_p)(fp, srcx, srcy, width, height); | ||||
break; | break; | ||||
Context not available. | |||||
case PHP_GDIMG_TYPE_XPM: | case PHP_GDIMG_TYPE_XPM: | ||||
im = gdImageCreateFromXpm(file); | im = gdImageCreateFromXpm(file); | ||||
break; | break; | ||||
@@ -2528,7 +2528,7 @@ PHP_FUNCTION(imagecreatefromxbm) | @@ -2569,7 +2569,7 @@ PHP_FUNCTION(imagecreatefromxbm) | ||||
} | } | ||||
/* }}} */ | /* }}} */ | ||||
Context not available. |