[php-src] Issue #15501: Windows build system defines HAVE_<header>_H as 0 or 1

From: Date: Mon, 19 Aug 2024 23:22:50 +0000
Subject: [php-src] Issue #15501: Windows build system defines HAVE_<header>_H as 0 or 1
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-247542@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/15501 Author: petk ### Description When using CHECK_HEADER_ADD_INCLUDE in *.w32 Windows build system files there is an inconsistency with Autotools build system where most header check macros are of style undefined/defined to 1. For example, this: ``` CHECK_HEADER_ADD_INCLUDE("foobar.h", "CFLAGS", "..\\path;" + php_usual_include_suspects); ``` Will define the HAVE_FOOBAR_H to a value 0 in the main/config.w32.h: ```c #define HAVE_FOOBAR_H 0 ``` However most of these headers are used in the code like this: ```c #ifdef HAVE_FOOBAR_H ... #endif ``` Affected headers in php-src: zlib.h sql.h sqlext.h timelib_config.h tidy.h tidybuffio.h Since php-src Windows environment is very locked to exact libraries and the build can be mostly reproduced this probably isn't much of an issue but it might affect PHP extensions out there. ### PHP Version PHP 8.2+ ### Operating System Windows

« previous php.bugs (#247542) next »