Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:46632 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 96298 invoked from network); 11 Jan 2010 16:48:28 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 11 Jan 2010 16:48:28 -0000 Authentication-Results: pb1.pair.com header.from=Andrey.Hristov@Sun.COM; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=andrey@mysql.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain mysql.com from 192.18.6.24 cause and error) X-PHP-List-Original-Sender: andrey@mysql.com X-Host-Fingerprint: 192.18.6.24 gmp-eb-inf-2.sun.com Solaris 10 (beta) Received: from [192.18.6.24] ([192.18.6.24:65059] helo=gmp-eb-inf-2.sun.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 5E/A0-26332-A565B4B4 for ; Mon, 11 Jan 2010 11:48:27 -0500 Received: from fe-emea-10.sun.com (gmp-eb-lb-1-fe1.eu.sun.com [192.18.6.7] (may be forged)) by gmp-eb-inf-2.sun.com (8.13.7+Sun/8.12.9) with ESMTP id o0BGmNIH012586 for ; Mon, 11 Jan 2010 16:48:23 GMT MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; CHARSET=US-ASCII; format=flowed Received: from conversion-daemon.fe-emea-10.sun.com by fe-emea-10.sun.com (Sun Java(tm) System Messaging Server 7u2-7.04 64bit (built Jul 2 2009)) id <0KW300200CNCT300@fe-emea-10.sun.com> for internals@lists.php.net; Mon, 11 Jan 2010 16:48:12 +0000 (GMT) Received: from [192.168.1.127] (g228005056.adsl.alicedsl.de [92.228.5.56]) by fe-emea-10.sun.com (Sun Java(tm) System Messaging Server 7u2-7.04 64bit (built Jul 2 2009)) with ESMTPSA id <0KW3001A3DBTAS50@fe-emea-10.sun.com>; Mon, 11 Jan 2010 16:48:00 +0000 (GMT) Date: Mon, 11 Jan 2010 17:47:53 +0100 In-reply-to: <4B4B53A8.8010300@zend.com> Sender: Andrey.Hristov@Sun.COM To: Jess Portnoy Cc: PHP Developers Mailing List Message-ID: <4B4B5639.1020404@mysql.com> References: <4B4B53A8.8010300@zend.com> User-Agent: Thunderbird 2.0.0.23 (X11/20090817) Subject: Re: [PHP-DEV] [PATCH] Attempt to include ext/mysqlnd/mysqlnd_portability.h when building MySQLi against libmysql From: andrey@mysql.com (Andrey Hristov) Hi Jess, does it compile after that, because I guess it doesn't. We use some macros from that header file to be able to handle bit types correctly in mysqli, when libmysql is used. #if MYSQL_VERSION_ID > 50002 if (mysql_fetch_field_direct(result, i)->type == MYSQL_TYPE_BIT) { my_ulonglong llval; char tmp[22]; switch (field_len[i]) { case 8:llval = (my_ulonglong) bit_uint8korr(row[i]);break; case 7:llval = (my_ulonglong) bit_uint7korr(row[i]);break; case 6:llval = (my_ulonglong) bit_uint6korr(row[i]);break; case 5:llval = (my_ulonglong) bit_uint5korr(row[i]);break; case 4:llval = (my_ulonglong) bit_uint4korr(row[i]);break; case 3:llval = (my_ulonglong) bit_uint3korr(row[i]);break; case 2:llval = (my_ulonglong) bit_uint2korr(row[i]);break; case 1:llval = (my_ulonglong) uint1korr(row[i]);break; } .... #endif Best, Andrey Jess Portnoy wrote: > Hello all, > > My configure command is as follows: > ./configure --disable-xml --disable-dom --disable-libxml > --disable-simplexml --without-pear --disable-xmlreader > --disable-xmlwriter --without-iconv > > I then archive the result and use it to build various PHP extensions, > among which MySQLi. > Since I did not configure with mysqlnd, I do not have ext/mysqlnd copied > onto $PHP_PREFIX/include/php/ext, causing this following code to fail > compilation: > #include "ext/mysqlnd/mysqlnd_portability.h" > > Attached is a suggested patch for php-5.3.1/ext/mysqli/mysqli.c and > php-5.3.1/ext/mysqli/mysqli_api.c, basically: > +#ifdef MYSQLI_USE_MYSQLND > #include "ext/mysqlnd/mysqlnd_portability.h" > +#endif > > Thanks in advance, >