|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2005-04-01 21:01 UTC] adam dot greenfield at gmail dot com
Description: ------------ PHP 4.3.11 will not compile on machines using gcc-3.4.x (in this case, gcc-3.4.2) Reproduce code: --------------- kronos% ./configure --with-swf=/usr ... (normal configure output - no errors) ... kronos% make ... (normal make output) ... gcc -Iext/swf/ -I/home/adam/build/packages/dsmphp/php-4.3.11/ext/swf/ -DPHP_ATOM_INC -I/home/adam/build/packages/dsmphp/php-4.3.11/include -I/home/adam/build/packages/dsmphp/php-4.3.11/main -I/home/adam/build/packages/dsmphp/php-4.3.11 -I/home/adam/build/packages/dsmphp/php-4.3.11/ext/xml/expat -I/home/adam/build/packages/dsmphp/php-4.3.11/TSRM -I/home/adam/build/packages/dsmphp/php-4.3.11/Zend -g -O2 -c /home/adam/build/packages/dsmphp/php-4.3.11/ext/swf/swf.c -o ext/swf/swf.o && echo > ext/swf/swf.lo /home/adam/build/packages/dsmphp/php-4.3.11/ext/swf/swf.c: In function `zif_swf_openfile': /home/adam/build/packages/dsmphp/php-4.3.11/ext/swf/swf.c:256: error: label at end of compound statement make: *** [ext/swf/swf.lo] Error 1 kronos% Expected result: ---------------- PHP Compiles Actual result: -------------- Compile failed PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 20:00:01 2025 UTC |
Here is a patch I've made, it corrected this issue on my systems: diff -Naur php-4.3.11.orig/ext/swf/swf.c php-4.3.11/ext/swf/swf.c --- php-4.3.11.orig/ext/swf/swf.c 2004-12-23 13:29:36.000000000 -0500 +++ php-4.3.11/ext/swf/swf.c 2005-04-01 13:32:16.540010608 -0500 @@ -240,7 +240,10 @@ na = tmpna; #endif if (php_check_open_basedir(na TSRMLS_CC) || (PG(safe_mode) && !php_checkuid(na, "wb+", CHECKUID_CHECK_MODE_PARAM))) { - goto err; +#ifdef VIRTUAL_DIR + free(na); +#endif + return; } if (!SWFG(use_file)) @@ -249,10 +252,6 @@ swf_openfile(na,(float)Z_DVAL_PP(sizeX), (float)Z_DVAL_PP(sizeY), (float)Z_DVAL_PP(frameRate), (float)Z_DVAL_PP(r), (float)Z_DVAL_PP(g), (float)Z_DVAL_PP(b)); -err: -#ifdef VIRTUAL_DIR - free(na); -#endif } /* }}} */