PHP 4.0 Bug #5882 Updated: Use inline directive in *.c files for global functions in Zend engine

From: Date: Wed, 01 Nov 2000 07:09:57 +0000
Subject: PHP 4.0 Bug #5882 Updated: Use inline directive in *.c files for global functions in Zend engine
Groups: php.dev 
Request: Send a blank email to php-dev+get-36588@lists.php.net to get a copy of this message
ID: 5882 Updated by: andi Reported By: mbaturin@mail.ru Status: Feedback Bug Type: *General Issues Assigned To: Comments: Does this still happen with the latest version? Try 4.0.3pl1 or get the latest snapshot from snaps.php.net. Thanks, Andi Previous Comments: --------------------------------------------------------------------------- [2000-08-30 05:08:28] stas@php.net User environment: MIPSPro C 7.3.1.1 IRIX 6.5.8 --------------------------------------------------------------------------- [2000-08-15 12:42:12] sas@php.net The user probably needs to configure PHP with --enable-c9x-inline Please try this and report back to us whether it works for you. --------------------------------------------------------------------------- [2000-08-15 07:33:45] stas@php.net Looks like problem in the compiler, because these functions aren't declared static. I'll try to look into the standard and see what compiler is supposed to do with inlines. Also, gcc has option "-fkeep-inline-functions" - does yours have one? Finally, most useful slution for you might be to add -Dinline= to you CFLAGS. That will hurt performance a bit, but otherwise should work. --------------------------------------------------------------------------- [2000-08-04 11:36:03] stas@php.net Which compiler do you use? --------------------------------------------------------------------------- [2000-07-31 21:45:09] mbaturin@mail.ru In Zend engine uses a inline modificator for functions which uses globaly, not only in module, where it was define. Compiller say - no errors, becouse thats functions defined in *.h file as global, but implementation this function defined as inline - and after compiling to *.o object file cc compiler remove this function from global lists (marked as LOCAL) And in result engine didn't started when try to run httpd with dinamicly linked libphp4.so: #dbx /usr/local/apache/bin/httpd >run -X -f/usr/local/apache/conf/httpd.conf all OK but when we make request to *.php file from browser dbx say: Error: unable to resolve _array_init function... and httpd process down to core #nm libphp4.so show that this function have status UNDEF Solve this bug with this script: #!/bin/sh cd php-4.0.1pl2/Zend for i in grep -l "ZEND_API inline" *.c ; do mv $i $i.old sed -e 's/ZEND_API inline/ZEND_API/g' $i.old >$i done #end of script After recompile - all OK --------------------------------------------------------------------------- The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online. Full Bug description available at: http://bugs.php.net/?id=5882

« previous php.dev (#36588) next »