#43326 [Opn->Csd]: compilation of mysqli breaks due to bad #ifdef

From: Date: Sun, 18 Nov 2007 23:45:48 +0000
Subject: #43326 [Opn->Csd]: compilation of mysqli breaks due to bad #ifdef
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-119804@lists.php.net to get a copy of this message
 ID:               43326
 Updated by:       jani@php.net
 Reported By:      gk at gknw dot de
-Status:           Open
+Status:           Closed
 Bug Type:         Compile Failure
 Operating System: NetWare
 PHP Version:      5.2.5
 New Comment:

Already fixed in CVS.


Previous Comments:
------------------------------------------------------------------------

[2007-11-18 23:42:35] gk at gknw dot de

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


Thread (2 messages)

« previous php.bugs (#119804) next »