ID:               32538
 Updated by:       [EMAIL PROTECTED]
-Summary:          4.3.11 --with-swf doesn't compile with gcc-3.4.x or
                   newer
 Reported By:      adam dot greenfield at gmail dot com
-Status:           Open
+Status:           Closed
 Bug Type:         Compile Failure
 Operating System: Linux (Fedora Core 3)
 PHP Version:      4.3.11
 New Comment:

This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.

And you really should use anything else than this extension..
for example ext/ming



Previous Comments:
------------------------------------------------------------------------

[2005-04-01 21:27:38] adam dot greenfield at gmail dot com

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

------------------------------------------------------------------------

[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

Reply via email to