]> granicus.if.org Git - php/commitdiff
MFH (make imagecreatefromxpm() unavailable when bundled GD is used)
authorIlia Alshanetsky <iliaa@php.net>
Wed, 11 Dec 2002 23:30:23 +0000 (23:30 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Wed, 11 Dec 2002 23:30:23 +0000 (23:30 +0000)
ext/gd/gd.c
ext/gd/php_gd.h

index 2cf4ad7ef11287c205fd140b1a11b42533eff0de..e6b550a2222470d5c6be8545393482bdd2c5474d 100644 (file)
@@ -188,7 +188,7 @@ function_entry gd_functions[] = {
 #ifdef HAVE_GD_XBM
        PHP_FE(imagecreatefromxbm,                                              NULL)
 #endif
-#ifdef HAVE_GD_XPM
+#if defined(HAVE_GD_XPM) && defined(HAVE_GD_BUNDLED)
        PHP_FE(imagecreatefromxpm,                                              NULL)
 #endif
        PHP_FE(imagecreatefromgd,                                               NULL)
@@ -1358,7 +1358,7 @@ static void _php_image_create_from(INTERNAL_FUNCTION_PARAMETERS, int image_type,
                        case PHP_GDIMG_TYPE_GD2PART:
                                im = (*func_p)(fp, Z_LVAL_PP(srcx), Z_LVAL_PP(srcy), Z_LVAL_PP(width), Z_LVAL_PP(height));
                                break;
-#ifdef HAVE_GD_XPM
+#if defined(HAVE_GD_XPM) && defined(HAVE_GD_BUNDLED)
                        case PHP_GDIMG_TYPE_XPM:
                                im = gdImageCreateFromXpm(fn);
                                break;
@@ -1425,7 +1425,7 @@ PHP_FUNCTION(imagecreatefromxbm)
 /* }}} */
 #endif /* HAVE_GD_XBM */
 
-#ifdef HAVE_GD_XPM
+#if defined(HAVE_GD_XPM) && defined(HAVE_GD_BUNDLED)
 /* {{{ proto int imagecreatefromxpm(string filename)
    Create a new image from XPM file or URL */
 PHP_FUNCTION(imagecreatefromxpm)
index 149f9092ba5a47f6b8116c4f3e2f54cc5112e1a9..e4575511576a6b77101fb9bce13ed567a69db02f 100644 (file)
@@ -110,12 +110,14 @@ PHP_FUNCTION(imagecreatefromstring);
 PHP_FUNCTION(imagecreatefromgif);
 PHP_FUNCTION(imagecreatefromjpeg);
 PHP_FUNCTION(imagecreatefromxbm);
-PHP_FUNCTION(imagecreatefromxpm);
 PHP_FUNCTION(imagecreatefrompng);
 PHP_FUNCTION(imagecreatefromwbmp);
 PHP_FUNCTION(imagecreatefromgd);
 PHP_FUNCTION(imagecreatefromgd2);
 PHP_FUNCTION(imagecreatefromgd2part);
+#if defined(HAVE_GD_XPM) && defined(HAVE_GD_BUNDLED)
+PHP_FUNCTION(imagecreatefromxpm);
+#endif
 
 PHP_FUNCTION(imagegammacorrect);
 PHP_FUNCTION(imagedestroy);