From:             [EMAIL PROTECTED]
Operating system: Cobalt Linux
PHP version:      4.2.3
PHP Bug Type:     Compile Failure
Bug description:  Gd support does not match libgd declarations

In PHP 4.2.3 (and some previous versions) the ext/gd/* files do not match
older libgd installations (such as the 1.2 version that ships on RaQ4
servers. In particular, it includes a 'static' declaration of
gdImageColorResolve when it should be 'extern' (see
http://i4net.tv/marticle/get.php?action=getarticle&articleid=20 for
another report of this bug) and it re-defined (incompatibly) the gdIOCtx
object.

To make the compile work I had to modify both php_gd.h and gd.c:

*** ext/gd/php_gd.h.4.2.3       Mon Dec 16 18:02:43 2002
--- ext/gd/php_gd.h     Mon Dec 16 18:03:41 2002
***************
*** 66,72 ****
  PHP_MSHUTDOWN_FUNCTION(gd);

  #ifndef HAVE_GDIMAGECOLORRESOLVE
! static int gdImageColorResolve(gdImagePtr, int, int, int);
  #endif
  PHP_FUNCTION(imagearc);
  PHP_FUNCTION(imagechar);
--- 66,72 ----
  PHP_MSHUTDOWN_FUNCTION(gd);

  #ifndef HAVE_GDIMAGECOLORRESOLVE
! extern int gdImageColorResolve(gdImagePtr, int, int, int);
  #endif
  PHP_FUNCTION(imagearc);
  PHP_FUNCTION(imagechar);
*** ext/gd/php_gd.h.4.2.3       Mon Dec 16 18:02:43 2002
--- ext/gd/php_gd.h     Mon Dec 16 18:03:41 2002
***************
*** 66,72 ****
  PHP_MSHUTDOWN_FUNCTION(gd);

  #ifndef HAVE_GDIMAGECOLORRESOLVE
! static int gdImageColorResolve(gdImagePtr, int, int, int);
  #endif
  PHP_FUNCTION(imagearc);
  PHP_FUNCTION(imagechar);
--- 66,72 ----
  PHP_MSHUTDOWN_FUNCTION(gd);

  #ifndef HAVE_GDIMAGECOLORRESOLVE
! extern int gdImageColorResolve(gdImagePtr, int, int, int);
  #endif
  PHP_FUNCTION(imagearc);
  PHP_FUNCTION(imagechar);
 
-- 
Edit bug report at http://bugs.php.net/?id=21049&edit=1
-- 
Try a CVS snapshot:         http://bugs.php.net/fix.php?id=21049&r=trysnapshot
Fixed in CVS:               http://bugs.php.net/fix.php?id=21049&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=21049&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=21049&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=21049&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=21049&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=21049&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=21049&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=21049&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=21049&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=21049&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=21049&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=21049&r=isapi

Reply via email to