php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #35760 Sybase CT extension : make failed
Submitted: 2005-12-21 11:13 UTC Modified: 2005-12-21 11:18 UTC
From: tony dot moutaux at igbmc dot u-strasbg dot fr Assigned:
Status: Closed Package: Compile Failure
PHP Version: 5.1.1 OS: Solaris 8
Private report: No CVE-ID:
 [2005-12-21 11:13 UTC] tony dot moutaux at igbmc dot u-strasbg dot fr
Description:
------------
System : Solaris 8

Steps :
-setting environment variable LD_LIBRARY_PATH with the right path
-configure with option :
  --with-mysql=no
  --with-sybase-ct=/sybase/u/sybase/OCS-12_5
  --enable-track-vars
  --with-apxs2=/local/apache2.2.0/bin/apxs
  --prefix=/local/PHP5
  --disable-all

make returns :

/local/PHP5/php-5.1.1/ext/sybase_ct/php_sybase_ct.c: In function `php_sybase_do_connect_internal':
/local/PHP5/php-5.1.1/ext/sybase_ct/php_sybase_ct.c:471: parse error before `long'
/local/PHP5/php-5.1.1/ext/sybase_ct/php_sybase_ct.c:520: `packetsize' undeclared (first use in this function)
/local/PHP5/php-5.1.1/ext/sybase_ct/php_sybase_ct.c:520: (Each undeclared identifier is reported only once
/local/PHP5/php-5.1.1/ext/sybase_ct/php_sybase_ct.c:520: for each function it appears in.)
*** Error code 1
make: Fatal error: Command failed for target `ext/sybase_ct/php_sybase_ct.lo'

Reproduce code:
---------------
file ext/sybase_ct/php_sybase_ct.c

467  static int php_sybase_do_connect_internal(sybase_link *sybase, char *host, char *user, char *passwd, char *chars
et, char *appname)
468  {
469          CS_LOCALE *tmp_locale;
470          TSRMLS_FETCH();
471          long packetsize;
472
473          /* set a CS_CONNECTION record */


-!!- same in last CVS as in 5.1.1 release source code

Actual result:
--------------
Solved by having packetsize declaration before TSRMLS_FETCH macro. That is :

469          CS_LOCALE *tmp_locale;
470          long packetsize;
471          TSRMLS_FETCH();
472
473          /* set a CS_CONNECTION record */

Now compilation works.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-12-21 11:17 UTC] tony dot moutaux at igbmc dot u-strasbg dot fr
Warning : gcc version 2.95.2 19991024 (release) was used ! Perharps too old for handling the macro TSRMLS_FETCH() correctly (and have variable declaration after).
 [2005-12-21 11:18 UTC] tony2001@php.net
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.


 
PHP Copyright © 2001-2014 The PHP Group
All rights reserved.
Last updated: Wed Apr 23 18:01:55 2014 UTC