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
 [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: Thu Mar 28 10:01:26 2024 UTC