ID: 20258 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] -Status: Open +Status: Closed Bug Type: Compile Failure Operating System: Anything with gd 2.0.3 or later PHP Version: 4.2.3 New Comment:
This bug has been fixed in CVS. In case this was a PHP problem, snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. In case this was a documentation problem, the fix will show up soon at http://www.php.net/manual/. In case this was a PHP.net website problem, the change will show up on the PHP.net site and on the mirror sites in short time. Thank you for the report, and for helping us make PHP better. Previous Comments: ------------------------------------------------------------------------ [2002-11-05 09:03:44] [EMAIL PROTECTED] First let me acknowledge that "bug" is not the right word for this. No criticism is intended. Now, here's the situation: I am the author of the gd library (http://www.boutell.com/gd/). PHP uses this library to generate images. gd 2.0.x has recently been revived, debugged and promoted as the latest and greatest, truecolor-capable version, and PHP supports this. Hurrah. Except... In gd 2.0.3, a contributor changed the name of the 'free' member of the gdIOCtx structure (in gd_io.h), with the very best of intentions: he wanted to improve compatibility with macro-based memory leak detectors, which were easily confused by a structure member called 'free'. I did not immediately realize, when I accepted the patch, that of course it would break PHP and other code that uses custom gdIOCtx structures. In gd 2.0.3 and above, the 'free' member of this structure has been renamed 'gd_free'. By now, this change is already reflected in GD.pm (for Perl) and other code, making it hard to back out at this point. Otherwise, I'd gladly make the change in gd instead. The corresponding fix to PHP is absolutely trivial and straightforward, of course, and I hope that it can be quickly included in the next patch of PHP 4.2.x and 4.3.x. (Technically, I *have* made the change in gd, but the solution there is not optimal and fixing the structure name in PHP code makes much more sense: in the forthcoming gd 2.0.5, there's a way to set a #define that would change the member name from gd_free to something else, but this is only useful if gd will be used ONLY with the code that expects to see something else, and therefore not useful for building a pretty shared library of gd, which we all want to see. And setting that macro constitutes something new to do in PHP; if that's going to happen it makes much more sense to just fix the occurrences of .free to .gd_free and be done with it!) My apologies for the annoyance, and I hope we can get this fixed soon and make the PHP people who are sending me sad "it won't build!" emails about gd 2.0.x happy. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=20258&edit=1