#43326 [NEW]: compilation of mysqli breaks due to bad #ifdef
| From: | gk at gknw dot de | Date: | Sun, 18 Nov 2007 23:42:35 +0000 |
| Subject: | #43326 [NEW]: compilation of mysqli breaks due to bad #ifdef | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-119803@lists.php.net to get a copy of this message | ||
From: gk at gknw dot de
Operating system: NetWare
PHP version: 5.2.5
PHP Bug Type: Compile Failure
Bug description: compilation of mysqli breaks due to bad #ifdef
Description:
------------
Compilation of mysqli extension for NetWare platform breaks with PHP 5.2.5
due to bad #ifdef expression; seems that not all compilers like an #ifdef
combined with an #if; here's a patch which solves the issue:
--- mysqli.c.orig Mon Oct 22 12:35:34 2007
+++ mysqli.c Mon Nov 19 00:24:16 2007
@@ -693,7 +693,7 @@
*/
PHP_RINIT_FUNCTION(mysqli)
{
-#ifdef ZTS && MYSQL_VERSION_ID >= 40000
+#if defined(ZTS) && MYSQL_VERSION_ID >= 40000
if (mysql_thread_init()) {
return FAILURE;
}
@@ -709,7 +709,7 @@
*/
PHP_RSHUTDOWN_FUNCTION(mysqli)
{
-#ifdef ZTS && MYSQL_VERSION_ID >= 40000
+#if defined(ZTS) && MYSQL_VERSION_ID >= 40000
mysql_thread_end();
#endif
if (MyG(error_msg)) {
Reproduce code:
---------------
compilation breaks using Metrowerks CodeWarrior compiler for NetWare.
Expected result:
----------------
compilation succeeds.
Actual result:
--------------
compilation breaks.
--
Edit bug report at http://bugs.php.net/?id=43326&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=43326&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=43326&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=43326&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=43326&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=43326&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=43326&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=43326&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=43326&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=43326&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=43326&r=support
Expected behavior: http://bugs.php.net/fix.php?id=43326&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=43326&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=43326&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=43326&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=43326&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=43326&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=43326&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=43326&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=43326&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=43326&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=43326&r=mysqlcfg