1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

Windows build: Use GREP_HEADER() instead of CHECK_FUNC_IN_HEADER() (#21315)

This removes the following unused compile definitions:

- HAVE_OSSL_SET_MAX_THREADS
- HAVE_ARGON2ID_HASH_RAW

The CHECK_FUNC_IN_HEADER() function defines the 'HAVE_<FUNCTION>'
compile definitions to 0 or 1, but these aren't used in the code.
Defining such preprocessor macros makes it difficult to track and sync
with other build systems.
This commit is contained in:
Peter Kokot
2026-03-06 14:11:20 +01:00
committed by GitHub
parent 806e0d0c03
commit f99ca6347f
3 changed files with 10 additions and 2 deletions

View File

@@ -929,6 +929,11 @@ function OLD_CHECK_LIB(libnames, target, path_to_check)
}
/**
* Checks whether function exists in the given header. Same as GREP_HEADER() but
* it also defines the 'HAVE_<FUNC_NAME>' preprocessor macro to 1 or 0. In new
* code rather use GREP_HEADER() and define the macro explicitly when needed.
*/
function CHECK_FUNC_IN_HEADER(header_name, func_name, path_to_check, add_to_flag)
{
var c = false;
@@ -955,6 +960,9 @@ function CHECK_FUNC_IN_HEADER(header_name, func_name, path_to_check, add_to_flag
return false;
}
/**
* Checks whether specified regular expression is found in the given header.
*/
function GREP_HEADER(header_name, regex, path_to_check)
{
var c = false;