Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:46630 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 93220 invoked from network); 11 Jan 2010 16:37:08 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 11 Jan 2010 16:37:08 -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:58964] helo=il-mr1.zend.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C0/10-26332-1B35B4B4 for ; Mon, 11 Jan 2010 11:37:07 -0500 Received: from il-gw1.zend.com (unknown [10.1.1.21]) by il-mr1.zend.com (Postfix) with ESMTP id 943485049A; Mon, 11 Jan 2010 18:21:13 +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:37:02 +0200 Message-ID: <4B4B53A8.8010300@zend.com> Date: Mon, 11 Jan 2010 18:36:56 +0200 User-Agent: Mozilla-Thunderbird 2.0.0.22 (X11/20090706) MIME-Version: 1.0 To: PHP Developers Mailing List , georg@mysql.com, andrey@mysql.com, uwendel@mysql.com Content-Type: multipart/mixed; boundary="------------000402070906090309090402" X-OriginalArrivalTime: 11 Jan 2010 16:37:02.0174 (UTC) FILETIME=[4D5AD7E0:01CA92DC] Subject: [PHP-DEV] [PATCH] Attempt to include ext/mysqlnd/mysqlnd_portability.h when building MySQLi against libmysql From: jess@zend.com (Jess Portnoy) --------------000402070906090309090402 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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, -- May the source be with you, Best regards, Jess Portnoy --------------000402070906090309090402 Content-Type: text/x-patch; name="mysqli_no_mysqlnd-5.3.1.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="mysqli_no_mysqlnd-5.3.1.diff" --- php-5.3.1/ext/mysqli/mysqli.c 2009-10-14 15:51:25.000000000 +0200 +++ php-5.3.1/ext/mysqli/mysqli.c.mod 2010-01-11 18:04:57.000000000 +0200 @@ -32,7 +32,9 @@ #include "ext/standard/php_string.h" #include "php_mysqli_structs.h" #include "zend_exceptions.h" +#ifdef MYSQLI_USE_MYSQLND #include "ext/mysqlnd/mysqlnd_portability.h" +#endif ZEND_DECLARE_MODULE_GLOBALS(mysqli) static PHP_GINIT_FUNCTION(mysqli); --- php-5.3.1/ext/mysqli/mysqli_api.c 2009-10-14 15:51:25.000000000 +0200 +++ php-5.3.1/ext/mysqli/mysqli_api.c.mod 2010-01-11 18:25:23.000000000 +0200 @@ -31,7 +31,9 @@ #include "php_globals.h" #include "ext/standard/info.h" #include "php_mysqli_structs.h" +#ifdef MYSQLI_USE_MYSQLND #include "ext/mysqlnd/mysqlnd_portability.h" +#endif /* {{{ proto mixed mysqli_affected_rows(object link) Get number of affected rows in previous MySQL operation */ --------------000402070906090309090402--