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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
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

Add a Patch

Pull Requests

Add a Pull Request

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-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 23 08:01:30 2024 UTC