php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #43974 #ifdef FOO && BAR is not portable
Submitted: 2008-01-29 21:02 UTC Modified: 2008-01-29 21:18 UTC
From: wietse at porcupine dot org Assigned:
Status: Not a bug Package: *Compile Issues
PHP Version: 5.2.5 OS: FreeBSD 6.2
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: wietse at porcupine dot org
New email:
PHP Version: OS:

 

 [2008-01-29 21:02 UTC] wietse at porcupine dot org
Description:
------------
ext/mysqli/mysqli.c:696 and ext/mysqli/mysqli.c:712 contain the
following non-portable preprocessor directive:

    #ifdef ZTS && MYSQL_VERSION_ID >= 40000

This mixes ifdef with expressions, and is not portable.

This should be:

    #if defined(ZTS) && (MYSQL_VERSION_ID >= 40000)

Reproduce code:
---------------
./configure
make

Expected result:
----------------
/var/tmp/todo/php/php-5.2.5-exp/ext/mysqli/mysqli.c:696:12: warning: extra tokens at end of #ifdef directive
/var/tmp/todo/php/php-5.2.5-exp/ext/mysqli/mysqli.c:712:12: warning: extra tokens at end of #ifdef directive


Actual result:
--------------
nothing

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-01-29 21:18 UTC] johannes@php.net
This has been reported before and is fixed in CVS.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Jul 03 11:01:34 2025 UTC