php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #56840 package does not build on FreeBSD with gcc 2.95.4
Submitted: 2006-02-13 20:11 UTC Modified: 2006-02-21 07:56 UTC
From: zaa at zaa dot pp dot ru Assigned:
Status: Closed Package: Paradox (PECL)
PHP Version: 5.1.1 OS: FreeBSD 4.11-STABLE
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: zaa at zaa dot pp dot ru
New email:
PHP Version: OS:

 

 [2006-02-13 20:11 UTC] zaa at zaa dot pp dot ru
Description:
------------
paradox.c uses not C compliant comments and local variables are declared at incorrect location in functions. Below is the compilation error log and patch fixing the error.

Environment
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
# uname -mrs
FreeBSD 4.11-STABLE i386
# php -v
PHP 5.1.2 (cli) (built: Feb 14 2006 03:54:49)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies
# gcc -v
Using builtin specs.
gcc version 2.95.4 20020320 [FreeBSD]

Error log
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
# phpize
Configuring for:
PHP Api Version:         20041225
Zend Module Api No:      20050922
Zend Extension Api No:   220051025
# make
/bin/sh /usr/obj/usr/ports/databases/pecl-paradox/work/paradox-1.4.1/libtool --mode=compile cc  -I. -I/usr/obj/usr/ports/databases/pecl-paradox/work/paradox-1.4.1 -DPHP_ATOM_INC -I/usr/obj/usr/ports/databases/pecl-paradox/work/paradox-1.4.1/include -I/usr/obj/usr/ports/databases/pecl-paradox/work/paradox-1.4.1/main -I/usr/obj/usr/ports/databases/pecl-paradox/work/paradox-1.4.1 -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include  -I/usr/local/include -DHAVE_CONFIG_H  -O -pipe   -c /usr/obj/usr/ports/databases/pecl-paradox/work/paradox-1.4.1/paradox.c -o paradox.lo
mkdir .libs
 cc -I. -I/usr/obj/usr/ports/databases/pecl-paradox/work/paradox-1.4.1 -DPHP_ATOM_INC -I/usr/obj/usr/ports/databases/pecl-paradox/work/paradox-1.4.1/include -I/usr/obj/usr/ports/databases/pecl-paradox/work/paradox-1.4.1/main -I/usr/obj/usr/ports/databases/pecl-paradox/work/paradox-1.4.1 -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include -I/usr/local/include -DHAVE_CONFIG_H -O -pipe -c /usr/obj/usr/ports/databases/pecl-paradox/work/paradox-1.4.1/paradox.c  -fPIC -DPIC -o .libs/paradox.o
/usr/obj/usr/ports/databases/pecl-paradox/work/paradox-1.4.1/paradox.c: In function `zif_px_open_fp':
/usr/obj/usr/ports/databases/pecl-paradox/work/paradox-1.4.1/paradox.c:441: syntax error before `*'
/usr/obj/usr/ports/databases/pecl-paradox/work/paradox-1.4.1/paradox.c:443: `stream' undeclared (first use in this function)
/usr/obj/usr/ports/databases/pecl-paradox/work/paradox-1.4.1/paradox.c:443: (Each undeclared identifier is reported only once
/usr/obj/usr/ports/databases/pecl-paradox/work/paradox-1.4.1/paradox.c:443: for each function it appears in.)
/usr/obj/usr/ports/databases/pecl-paradox/work/paradox-1.4.1/paradox.c: In function `zif_px_create_fp':
/usr/obj/usr/ports/databases/pecl-paradox/work/paradox-1.4.1/paradox.c:489: syntax error before `*'
/usr/obj/usr/ports/databases/pecl-paradox/work/paradox-1.4.1/paradox.c:490: `stream' undeclared (first use in this function)
*** Error code 1


Patch
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
--- paradox.c.orig      Tue Feb 14 03:57:58 2006
+++ paradox.c   Tue Feb 14 03:59:42 2006
@@ -86,8 +86,10 @@
 };
 /* }}} */

-//#define PHP_ME_MAPPING(name, func_name, arg_types) \
-//     ZEND_NAMED_FE(name, ZEND_FN(func_name), arg_types)
+/*
+#define PHP_ME_MAPPING(name, func_name, arg_types) \
+       ZEND_NAMED_FE(name, ZEND_FN(func_name), arg_types)
+*/

 function_entry paradox_funcs_db[] = {
        PHP_ME_MAPPING(__construct, px_new, NULL)
@@ -425,6 +427,7 @@
        FILE *fp = NULL;
        pxdoc_t *pxdoc = NULL;
        zval *object = getThis();
+       php_stream *stream;

        if (object) {
                if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &zfp)) {
@@ -438,8 +441,6 @@
                PXDOC_FROM_ZVAL(pxdoc, &zpx);
        }

-       php_stream *stream;
-
        php_stream_from_zval(stream, &zfp);

        if (php_stream_cast(stream, PHP_STREAM_AS_STDIO, (void*)&fp, 1) == FAILURE)     {
@@ -468,6 +469,7 @@
        pxfield_t *pxf;
        int numfields, i;
        zval *object = getThis();
+       php_stream *stream;

        if (object) {
                if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rz", &zfp, &schema)) {
@@ -486,7 +488,6 @@
                RETURN_FALSE;
        }

-       php_stream *stream;
        php_stream_from_zval(stream, &zfp);

        if (php_stream_cast(stream, PHP_STREAM_AS_STDIO, (void*)&fp, 1) == FAILURE)     {



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-02-21 07:56 UTC] uwe at steinmann dot cx
This bug has been fixed in CVS.

In case this was a documentation problem, the fix will show up at the
end of next Sunday (CET) on pecl.php.net.

In case this was a pecl.php.net website problem, the change will show
up on the website in short time.
 
Thank you for the report, and for helping us make PECL better.

Thanks for the patch. I merged it.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Feb 05 06:01:32 2025 UTC