This patch, or at least this part:

-#ifdef HAVE_GD_XPM
+#if defined(HAVE_GD_XPM) && defined(HAVE_GD_BUNDLED)

Needs to be merged into the 4.3.0. Something in the build broke my GD
support between RC2 and RC3. This fixes it.

-adam

On Wed, 11 Dec 2002, Ilia Alshanetsky wrote:

> iliaa         Wed Dec 11 17:25:24 2002 EDT
> 
>   Modified files:              
>     /php4/ext/gd      gd.c php_gd.h 
>   Log:
>   Fixed build with non-bundled GD. Hidden the anti-alias functions when 
>   non-bundled GD is used and made imagecreatefromxpm() unavailable because 
>   of a bug in the external GD library.
>   
>   
> Index: php4/ext/gd/gd.c
> diff -u php4/ext/gd/gd.c:1.238 php4/ext/gd/gd.c:1.239
> --- php4/ext/gd/gd.c:1.238    Wed Dec 11 15:44:44 2002
> +++ php4/ext/gd/gd.c  Wed Dec 11 17:25:22 2002
> @@ -18,7 +18,7 @@
>     +----------------------------------------------------------------------+
>   */
>  
> -/* $Id: gd.c,v 1.238 2002/12/11 20:44:44 pajoye Exp $ */
> +/* $Id: gd.c,v 1.239 2002/12/11 22:25:22 iliaa Exp $ */
>  
>  /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center, 
>     Cold Spring Harbor Labs. */
> @@ -224,7 +224,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)
> @@ -1441,7 +1441,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;
> @@ -1508,7 +1508,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)
> @@ -2130,7 +2130,6 @@
>  {
>       zval **IM, **x1, **y1, **x2, **y2, **col;
>       gdImagePtr im;
> -     int antialias=0;
>  
>       if (ZEND_NUM_ARGS() != 6 || zend_get_parameters_ex(6, &IM, &x1, &y1, &x2, &y2, 
>&col) == FAILURE) {
>               ZEND_WRONG_PARAM_COUNT();
> @@ -2145,14 +2144,11 @@
>       convert_to_long_ex(col);
>  
>  #ifdef HAVE_GD_BUNDLED
> -             antialias = im->antialias;
> -#endif
> -     if (antialias) {
> +     if (im->antialias)
>               gdImageAALine(im, Z_LVAL_PP(x1), Z_LVAL_PP(y1), Z_LVAL_PP(x2), 
>Z_LVAL_PP(y2), Z_LVAL_PP(col));
> -     } else {
> +     else 
> +#endif       
>               gdImageLine(im, Z_LVAL_PP(x1), Z_LVAL_PP(y1), Z_LVAL_PP(x2), 
>Z_LVAL_PP(y2), Z_LVAL_PP(col));
> -     }
> -                                                              
>       
>       gdImageLine(im, Z_LVAL_PP(x1), Z_LVAL_PP(y1), Z_LVAL_PP(x2), Z_LVAL_PP(y2), 
>Z_LVAL_PP(col));
>       RETURN_TRUE;
> @@ -4074,7 +4070,7 @@
>       }
>  }
>  /* }}} */
> -#endif
> +/* End section: Filters */
>  
>  /* {{{ proto imagesetantialias(int im, bool on)
>          Should antialiased functions used or not*/
> @@ -4092,8 +4088,7 @@
>       RETURN_TRUE;
>  }
>  /* }}} */
> -                                                                                    
>                    
> -/* End section: Filters */
> +#endif
>  
>  /*
>   * Local variables:
> Index: php4/ext/gd/php_gd.h
> diff -u php4/ext/gd/php_gd.h:1.48 php4/ext/gd/php_gd.h:1.49
> --- php4/ext/gd/php_gd.h:1.48 Wed Dec 11 15:45:47 2002
> +++ php4/ext/gd/php_gd.h      Wed Dec 11 17:25:23 2002
> @@ -17,7 +17,7 @@
>     +----------------------------------------------------------------------+
>  */
>  
> -/* $Id: php_gd.h,v 1.48 2002/12/11 20:45:47 pajoye Exp $ */
> +/* $Id: php_gd.h,v 1.49 2002/12/11 22:25:23 iliaa Exp $ */
>  
>  #ifndef PHP_GD_H
>  #define PHP_GD_H
> @@ -112,12 +112,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 Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to