To all maintainers of (broken) PHP extensions
Alex Dupre
ale at FreeBSD.org
Mon Apr 12 09:14:58 UTC 2010
A few thirdy party pecl extensions broke after the PHP update to 5.3.2
release. My apologies for it, but since PHP 5.3.0 was released 9 months
ago, this means that there is already a newer version of the extension
with PHP 5.3 support, or the extensions is unmaintained and perhaps
obsolete.
If you are going to fix your port, here is a list of the most common
errors with proposed solutions:
1) error: duplicate 'static'
The macro ZEND_BEGIN_ARG_INFO_EX already includes 'static const'
keywords in the signature, so it's enough to remove the additional 'static'
2) error: 'struct _zend_compiler_globals' has no member named
'extended_info'
The member has been renamed to 'compiler_options' to hold additional
variables. So, for example, if the code looks like:
CG(extended_info) = 1;
you can modify it in this way:
CG(compiler_options) |= ZEND_COMPILE_EXTENDED_INFO;
3) error: 'zval' has no member named 'is_ref'
error: 'zval' has no member named 'refcount'
The access to such members is wrapped by a few macros (look at zend.h
for a complete list). So for example, if the code looks like:
if (z->is_ref)
z->refcount++;
you can modify it in this way:
if (Z_ISREF_P(z))
Z_ADDREF_P(z);
--
Alex Dupre
More information about the freebsd-ports
mailing list