php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #43326 compilation of mysqli breaks due to bad #ifdef
Submitted: 2007-11-18 23:42 UTC Modified: 2007-11-18 23:45 UTC
From: gk at gknw dot de Assigned:
Status: Closed Package: Compile Failure
PHP Version: 5.2.5 OS: NetWare
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: gk at gknw dot de
New email:
PHP Version: OS:

 

 [2007-11-18 23:42 UTC] 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.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-11-18 23:45 UTC] jani@php.net
Already fixed in CVS.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Jul 17 05:01:34 2025 UTC