From: gk at gknw dot de Operating system: NetWare PHP version: 5.2CVS-2008-03-06 (CVS) PHP Bug Type: EXIF related Bug description: compilation breaks due illegal const usage
Description: ------------ The NetWare compiler we use is very strict and breaks when const is used where not expected. The commit: http://cvs.php.net/viewvc.cgi/php-src/ext/exif/exif.c?r1=1.196&r2=1.197 breaks the NetWare compile due to the line: static const zend_module_dep exif_module_deps[] = { exif.c:258: illegal implicit conversion from 'const struct exif.c:258: _zend_module_dep[2]' to exif.c:258: 'struct _zend_module_dep *' the patch below fixes this and also adds ifdefs as used with other extensions f.e. pdp_*; not sure if these are really needed, but this change: -static const zend_module_dep exif_module_deps[] = { +static zend_module_dep exif_module_deps[] = { is definetely required. --- exif.c.orig Mon Dec 31 08:33:29 2007 +++ exif.c Thu Mar 06 23:15:31 2008 @@ -242,19 +242,25 @@ /* }}} */ /* {{{ exif dependencies */ -static const zend_module_dep exif_module_deps[] = { +#if ZEND_MODULE_API_NO >= 20050922 +static zend_module_dep exif_module_deps[] = { ZEND_MOD_REQUIRED("standard") #if EXIF_USE_MBSTRING ZEND_MOD_REQUIRED("mbstring") #endif {NULL, NULL, NULL} }; +#endif /* }}} */ /* {{{ exif_module_entry */ zend_module_entry exif_module_entry = { +#if ZEND_MODULE_API_NO >= 20050922 STANDARD_MODULE_HEADER_EX, NULL, +#else + STANDARD_MODULE_HEADER, +#endif exif_module_deps, "exif", exif_functions, -- Edit bug report at http://bugs.php.net/?id=44355&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=44355&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=44355&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=44355&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=44355&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=44355&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=44355&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=44355&r=needscript Try newer version: http://bugs.php.net/fix.php?id=44355&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=44355&r=support Expected behavior: http://bugs.php.net/fix.php?id=44355&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=44355&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=44355&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=44355&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=44355&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=44355&r=dst IIS Stability: http://bugs.php.net/fix.php?id=44355&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=44355&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=44355&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=44355&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=44355&r=mysqlcfg