Line 0
Link Here
|
|
|
1 |
--- gd.c.orig 2018-07-17 11:06:34 UTC |
2 |
+++ gd.c |
3 |
@@ -53,7 +53,7 @@ |
4 |
# include <Wingdi.h> |
5 |
#endif |
6 |
|
7 |
-#ifdef HAVE_GD_XPM |
8 |
+#if defined(HAVE_XPM) && defined(HAVE_GD_XPM) |
9 |
# include <X11/xpm.h> |
10 |
#endif |
11 |
|
12 |
@@ -79,7 +79,7 @@ static int le_gd, le_gd_font; |
13 |
# endif |
14 |
#endif |
15 |
|
16 |
-#if defined(HAVE_GD_XPM) && defined(HAVE_GD_BUNDLED) |
17 |
+#if defined(HAVE_XPM) && defined(HAVE_GD_XPM) && defined(HAVE_GD_BUNDLED) |
18 |
# include "X11/xpm.h" |
19 |
#endif |
20 |
|
21 |
@@ -327,7 +327,7 @@ ZEND_BEGIN_ARG_INFO(arginfo_imagecreatefromxbm, 0) |
22 |
ZEND_ARG_INFO(0, filename) |
23 |
ZEND_END_ARG_INFO() |
24 |
|
25 |
-#if defined(HAVE_GD_XPM) |
26 |
+#if defined(HAVE_XPM) && defined(HAVE_GD_XPM) |
27 |
ZEND_BEGIN_ARG_INFO(arginfo_imagecreatefromxpm, 0) |
28 |
ZEND_ARG_INFO(0, filename) |
29 |
ZEND_END_ARG_INFO() |
30 |
@@ -901,7 +901,7 @@ const zend_function_entry gd_functions[] = { |
31 |
#endif |
32 |
PHP_FE(imagecreatefromwbmp, arginfo_imagecreatefromwbmp) |
33 |
PHP_FE(imagecreatefromxbm, arginfo_imagecreatefromxbm) |
34 |
-#if defined(HAVE_GD_XPM) |
35 |
+#if defined(HAVE_XPM) && defined(HAVE_GD_XPM) |
36 |
PHP_FE(imagecreatefromxpm, arginfo_imagecreatefromxpm) |
37 |
#endif |
38 |
PHP_FE(imagecreatefromgd, arginfo_imagecreatefromgd) |
39 |
@@ -1252,7 +1252,7 @@ PHP_MINFO_FUNCTION(gd) |
40 |
php_info_print_table_row(2, "libPNG Version", gdPngGetVersionString()); |
41 |
#endif |
42 |
php_info_print_table_row(2, "WBMP Support", "enabled"); |
43 |
-#if defined(HAVE_GD_XPM) |
44 |
+#if defined(HAVE_XPM) && defined(HAVE_GD_XPM) |
45 |
php_info_print_table_row(2, "XPM Support", "enabled"); |
46 |
{ |
47 |
char tmp[12]; |
48 |
@@ -1307,7 +1307,7 @@ PHP_FUNCTION(gd_info) |
49 |
add_assoc_bool(return_value, "PNG Support", 0); |
50 |
#endif |
51 |
add_assoc_bool(return_value, "WBMP Support", 1); |
52 |
-#if defined(HAVE_GD_XPM) |
53 |
+#if defined(HAVE_XPM) && defined(HAVE_GD_XPM) |
54 |
add_assoc_bool(return_value, "XPM Support", 1); |
55 |
#else |
56 |
add_assoc_bool(return_value, "XPM Support", 0); |
57 |
@@ -2147,7 +2147,7 @@ PHP_FUNCTION(imagetypes) |
58 |
ret |= 4; |
59 |
#endif |
60 |
ret |= 8; |
61 |
-#if defined(HAVE_GD_XPM) |
62 |
+#if defined(HAVE_XPM) && defined(HAVE_GD_XPM) |
63 |
ret |= 16; |
64 |
#endif |
65 |
#ifdef HAVE_GD_WEBP |
66 |
@@ -2397,7 +2397,7 @@ static void _php_image_create_from(INTERNAL_FUNCTION_P |
67 |
case PHP_GDIMG_TYPE_GD2PART: |
68 |
im = (*func_p)(fp, srcx, srcy, width, height); |
69 |
break; |
70 |
-#if defined(HAVE_GD_XPM) |
71 |
+#if defined(HAVE_XPM) && defined(HAVE_GD_XPM) |
72 |
case PHP_GDIMG_TYPE_XPM: |
73 |
im = gdImageCreateFromXpm(file); |
74 |
break; |
75 |
@@ -2479,7 +2479,7 @@ PHP_FUNCTION(imagecreatefromxbm) |
76 |
} |
77 |
/* }}} */ |
78 |
|
79 |
-#if defined(HAVE_GD_XPM) |
80 |
+#if defined(HAVE_XPM) && defined(HAVE_GD_XPM) |
81 |
/* {{{ proto resource imagecreatefromxpm(string filename) |
82 |
Create a new image from XPM file or URL */ |
83 |
PHP_FUNCTION(imagecreatefromxpm) |