From:
Operating system: Linux
PHP version: 5.3SVN-2010-11-29 (SVN)
Package: PDO related
Bug Type: Bug
Bug description:mysql_statement.c uses C99 syntax
Description:
------------
PDO_MySQL fails to compile on an older RedHat 7.3 system using GCC 2.95
because the macros in mysql_statement.c expand into C99 style inline
variable declarations. This error was encountered while testing PHP
5.3.4RC1.
Error messages from the compiler:
/home/cpeasyapache/src/php-5.3.4RC1/ext/pdo_mysql/mysql_statement.c: In
function `pdo_mysql_stmt_dtor':
/home/cpeasyapache/src/php-5.3.4RC1/ext/pdo_mysql/mysql_statement.c:52:
structure has no member named `stmt'
/home/cpeasyapache/src/php-5.3.4RC1/ext/pdo_mysql/mysql_statement.c:70:
structure has no member named `params'
/home/cpeasyapache/src/php-5.3.4RC1/ext/pdo_mysql/mysql_statement.c:71:
structure has no member named `params'
/home/cpeasyapache/src/php-5.3.4RC1/ext/pdo_mysql/mysql_statement.c:73:
structure has no member named `in_null'
/home/cpeasyapache/src/php-5.3.4RC1/ext/pdo_mysql/mysql_statement.c:74:
structure has no member named `in_null'
/home/cpeasyapache/src/php-5.3.4RC1/ext/pdo_mysql/mysql_statement.c:76:
structure has no member named `in_length'
/home/cpeasyapache/src/php-5.3.4RC1/ext/pdo_mysql/mysql_statement.c:77:
structure has no member named `in_length'
/home/cpeasyapache/src/php-5.3.4RC1/ext/pdo_mysql/mysql_statement.c: In
function `pdo_mysql_stmt_set_row_count':
/home/cpeasyapache/src/php-5.3.4RC1/ext/pdo_mysql/mysql_statement.c:127:
structure has no member named `stmt'
/home/cpeasyapache/src/php-5.3.4RC1/ext/pdo_mysql/mysql_statement.c: In
function `pdo_mysql_stmt_execute':
/home/cpeasyapache/src/php-5.3.4RC1/ext/pdo_mysql/mysql_statement.c:295:
structure has no member named `stmt'
/home/cpeasyapache/src/php-5.3.4RC1/ext/pdo_mysql/mysql_statement.c: In
function `pdo_mysql_stmt_param_hook':
/home/cpeasyapache/src/php-5.3.4RC1/ext/pdo_mysql/mysql_statement.c:469:
`MYSQL_BIND' undeclared (first use in this function)
/home/cpeasyapache/src/php-5.3.4RC1/ext/pdo_mysql/mysql_statement.c:469:
(Each undeclared identifier is reported only once
/home/cpeasyapache/src/php-5.3.4RC1/ext/pdo_mysql/mysql_statement.c:469:
for each function it appears in.)
/home/cpeasyapache/src/php-5.3.4RC1/ext/pdo_mysql/mysql_statement.c:469:
`b' undeclared (first use in this function)
/home/cpeasyapache/src/php-5.3.4RC1/ext/pdo_mysql/mysql_statement.c: In
function `pdo_mysql_stmt_describe':
/home/cpeasyapache/src/php-5.3.4RC1/ext/pdo_mysql/mysql_statement.c:678:
structure has no member named `stmt'
/home/cpeasyapache/src/php-5.3.4RC1/ext/pdo_mysql/mysql_statement.c: In
function `pdo_mysql_stmt_get_col':
/home/cpeasyapache/src/php-5.3.4RC1/ext/pdo_mysql/mysql_statement.c:727:
structure has no member named `stmt'
/home/cpeasyapache/src/php-5.3.4RC1/ext/pdo_mysql/mysql_statement.c: In
function `pdo_mysql_stmt_col_meta':
/home/cpeasyapache/src/php-5.3.4RC1/ext/pdo_mysql/mysql_statement.c:831:
structure has no member named `stmt'
/home/cpeasyapache/src/php-5.3.4RC1/ext/pdo_mysql/mysql_statement.c: In
function `pdo_mysql_stmt_cursor_closer':
/home/cpeasyapache/src/php-5.3.4RC1/ext/pdo_mysql/mysql_statement.c:898:
structure has no member named `stmt'
Test script:
---------------
root@rh73 [/home/cpeasyapache/src/php-5.3.4RC1/ext/pdo_mysql]# cat
/home/cpeasyapache/src/php-5.3.4RC1/config.nice
#! /bin/sh
#
# Created by configure
CFLAGS=' -I/usr/kerberos/include' \
'./configure' \
--disable-fileinfo \
--enable-bcmath \
--enable-calendar \
--enable-exif \
--enable-ftp \
--enable-gd-native-ttf \
--enable-libxml \
--enable-magic-quotes \
--enable-mbstring \
--enable-pdo=shared \
--enable-safe-mode \
--enable-soap \
--enable-sockets \
--enable-wddx \
--enable-zend-multibyte \
--enable-zip \
--prefix=/usr/local \
--with-apxs2=/usr/local/apache/bin/apxs \
--with-bz2 \
--with-config-file-path=/usr/local/lib \
--with-config-file-scan-dir=/usr/local/lib/php.ini.d \
--with-curl=/opt/curlssl/ \
--with-curlwrappers \
--with-freetype-dir=/usr \
--with-gd \
--with-gettext \
--with-imap=/opt/php_with_imap_client/ \
--with-imap-ssl=/usr \
--with-jpeg-dir=/usr \
--with-kerberos \
--with-libexpat-dir=/usr \
--with-libxml-dir=/opt/xml2 \
--with-libxml-dir=/opt/xml2/ \
--with-mcrypt=/opt/libmcrypt/ \
--with-mm=/opt/mm/ \
--with-mysql=/usr \
--with-mysql-sock=/var/lib/mysql/mysql.sock \
--with-pcre-regex=/opt/pcre \
--with-pdo-mysql=shared \
--with-pdo-sqlite=shared \
--with-png-dir=/usr \
--with-pspell \
--with-sqlite=shared \
--with-tidy=/opt/tidy/ \
--with-xmlrpc \
--with-xpm-dir=/usr/X11R6 \
--with-xsl=/opt/xslt/ \
--with-zlib \
--with-zlib-dir=/usr \
"$@"
--
Edit bug report at http://bugs.php.net/bug.php?id=53423&edit=1
--
Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=53423&r=trysnapshot52
Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=53423&r=trysnapshot53
Try a snapshot (trunk): http://bugs.php.net/fix.php?id=53423&r=trysnapshottrunk
Fixed in SVN: http://bugs.php.net/fix.php?id=53423&r=fixed
Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=53423&r=needdocs
Fixed in release: http://bugs.php.net/fix.php?id=53423&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=53423&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=53423&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=53423&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=53423&r=support
Expected behavior: http://bugs.php.net/fix.php?id=53423&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=53423&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=53423&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=53423&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=53423&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=53423&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=53423&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=53423&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=53423&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=53423&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=53423&r=mysqlcfg