Bug #53423 [Bgs]: mysql_statement.c uses C99 syntax

From: Date: Mon, 29 Nov 2010 15:58:49 +0000
Subject: Bug #53423 [Bgs]: mysql_statement.c uses C99 syntax
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-156547@lists.php.net to get a copy of this message
Edit report at http://bugs.php.net/bug.php?id=53423&edit=1

 ID:                 53423
 Updated by:         uw@php.net
 Reported by:        jd at cpanel dot net
 Summary:            mysql_statement.c uses C99 syntax
 Status:             Bogus
 Type:               Bug
 Package:            PDO related
 Operating System:   Linux
 PHP Version:        5.3SVN-2010-11-29 (SVN)
 Block user comment: N
 Private report:     N

 New Comment:

PS: Don't get me wrong when I say "from a MySQL perspective". Of course,
php.net can overrule me but "we MySQL guys" are the ones doing most of
the work on mysqlnd. So, "from a maintainer perspective", even with my
php.net hat on, ...


Previous Comments:
------------------------------------------------------------------------
[2010-11-29 16:54:26] uw@php.net

From a MySQL perspective supporting RH 7.3/gcc 2.95 is bogus. RH 7.4 has
been released in May 2002, hasn't it? That is a little too old for using
PHP 5.3 with mysqlnd. RH 7.3 is way before mysqlnd development has
started.

As there is an alternative (good old libmysqlclient) for those using 8
years old systems, I'm closing the report.

Of course, we'll check if we can add a test for the GCC version to bail
out in case of old GCC.

------------------------------------------------------------------------
[2010-11-29 16:43:39] jd at cpanel dot net

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 this bug report at http://bugs.php.net/bug.php?id=53423&edit=1


Thread (9 messages)

« previous php.bugs (#156547) next »