#32538 [Opn]: 4.3.11 --with-swf doesn't compile with gcc-3.4.x or newer

From: Date: Fri, 01 Apr 2005 19:27:39 +0000
Subject: #32538 [Opn]: 4.3.11 --with-swf doesn't compile with gcc-3.4.x or newer
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-76178@lists.php.net to get a copy of this message
ID: 32538 User updated by: adam dot greenfield at gmail dot com Reported By: adam dot greenfield at gmail dot com Status: Open Bug Type: Compile Failure Operating System: Linux (Fedora Core 3) PHP Version: 4.3.10 New Comment: After seeking advice on the best way to submit patches, I've made a diff -dpu patch of swf.c and posted it at http://people.jtlnet.com/~adam/phpbug-32538/swf.c.patch Previous Comments: ------------------------------------------------------------------------ [2005-04-01 21:03:55] adam dot greenfield at gmail dot com 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 } /* }}} */ ------------------------------------------------------------------------ [2005-04-01 21:01:19] 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 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=32538&edit=1

« previous php.bugs (#76178) next »