Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:46633 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 97643 invoked from network); 11 Jan 2010 16:51:57 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 11 Jan 2010 16:51:57 -0000 Authentication-Results: pb1.pair.com header.from=jess@zend.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=jess@zend.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 212.25.124.185 as permitted sender) X-PHP-List-Original-Sender: jess@zend.com X-Host-Fingerprint: 212.25.124.185 il-mr1.zend.com Received: from [212.25.124.185] ([212.25.124.185:38512] helo=il-mr1.zend.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 6D/F0-26332-C275B4B4 for ; Mon, 11 Jan 2010 11:51:57 -0500 Received: from il-gw1.zend.com (unknown [10.1.1.21]) by il-mr1.zend.com (Postfix) with ESMTP id D57B350473; Mon, 11 Jan 2010 18:36:04 +0200 (IST) Received: from [10.1.2.102] ([10.1.2.102]) by il-gw1.zend.com with Microsoft SMTPSVC(6.0.3790.3959); Mon, 11 Jan 2010 18:51:53 +0200 Message-ID: <4B4B5728.20502@zend.com> Date: Mon, 11 Jan 2010 18:51:52 +0200 User-Agent: Mozilla-Thunderbird 2.0.0.22 (X11/20090706) MIME-Version: 1.0 To: Andrey Hristov CC: PHP Developers Mailing List References: <4B4B53A8.8010300@zend.com> <4B4B5639.1020404@mysql.com> In-Reply-To: <4B4B5639.1020404@mysql.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 11 Jan 2010 16:51:53.0506 (UTC) FILETIME=[60A15020:01CA92DE] Subject: Re: [PHP-DEV] [PATCH] Attempt to include ext/mysqlnd/mysqlnd_portability.h when building MySQLi against libmysql From: jess@zend.com (Jess Portnoy) Hi Andrey, Yes, it compiled just fine with my patch. Even loaded :) May the source be with you, Best regards, Jess Portnoy Andrey Hristov wrote: > 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, >> >