iliaa           Wed Dec 11 18:30:24 2002 EDT

  Modified files:              (Branch: PHP_4_3)
    /php4/ext/gd        gd.c php_gd.h 
  Log:
  MFH (make imagecreatefromxpm() unavailable when bundled GD is used)
  
  
Index: php4/ext/gd/gd.c
diff -u php4/ext/gd/gd.c:1.221.2.6 php4/ext/gd/gd.c:1.221.2.7
--- php4/ext/gd/gd.c:1.221.2.6  Tue Dec 10 12:57:54 2002
+++ php4/ext/gd/gd.c    Wed Dec 11 18:30:23 2002
@@ -18,7 +18,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: gd.c,v 1.221.2.6 2002/12/10 17:57:54 iliaa Exp $ */
+/* $Id: gd.c,v 1.221.2.7 2002/12/11 23:30:23 iliaa Exp $ */
 
 /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center, 
    Cold Spring Harbor Labs. */
@@ -188,7 +188,7 @@
 #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 @@
                        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 @@
 /* }}} */
 #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: php4/ext/gd/php_gd.h
diff -u php4/ext/gd/php_gd.h:1.44 php4/ext/gd/php_gd.h:1.44.2.1
--- php4/ext/gd/php_gd.h:1.44   Tue Nov 12 06:49:11 2002
+++ php4/ext/gd/php_gd.h        Wed Dec 11 18:30:23 2002
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: php_gd.h,v 1.44 2002/11/12 11:49:11 helly Exp $ */
+/* $Id: php_gd.h,v 1.44.2.1 2002/12/11 23:30:23 iliaa Exp $ */
 
 #ifndef PHP_GD_H
 #define PHP_GD_H
@@ -110,12 +110,14 @@
 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);



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to