Skip to content

Commit 3c455c5

Browse files
committed
Sync and improve extension configuration headers
- ext/hash - ext/intl - ext/openssl - ext/random - ext/session
1 parent eb04dfb commit 3c455c5

File tree

8 files changed

+22
-24
lines changed

8 files changed

+22
-24
lines changed

cmake/ext/hash/config.cmake.h.in

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
/* Define to 1 if mhash support is enabled. */
2-
#cmakedefine PHP_MHASH_BC 1
3-
41
/* Define to 1 if the PHP hash extension uses the slow SHA3 algorithm. */
52
#cmakedefine HAVE_SLOW_HASH3 1
3+
4+
/* Define to 1 if mhash support is enabled. */
5+
#cmakedefine PHP_MHASH_BC 1

cmake/ext/intl/CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,5 +194,3 @@ if(ICU_VERSION VERSION_GREATER_EQUAL 60)
194194
endif()
195195

196196
add_dependencies(php_intl php_date)
197-
198-
configure_file(config.cmake.h.in config.h @ONLY)

cmake/ext/intl/config.cmake.h.in

Whitespace-only changes.

cmake/ext/openssl/CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,15 +104,15 @@ set_package_properties(
104104
# Link publicly for internal_functions files.
105105
target_link_libraries(php_openssl PUBLIC OpenSSL::SSL OpenSSL::Crypto)
106106

107-
block(PROPAGATE HAVE_OPENSSL_EXT)
107+
block(PROPAGATE HAVE_OPENSSL_EXT_CODE)
108108
get_target_property(type php_openssl TYPE)
109109
if(
110110
CMAKE_SYSTEM_NAME STREQUAL "Windows" AND
111111
type MATCHES "^(MODULE|SHARED)_LIBRARY$"
112112
)
113-
set(HAVE_OPENSSL_EXT "#define HAVE_OPENSSL_EXT 0")
113+
set(HAVE_OPENSSL_EXT_CODE "#define HAVE_OPENSSL_EXT 0")
114114
else()
115-
set(HAVE_OPENSSL_EXT "#define HAVE_OPENSSL_EXT 1")
115+
set(HAVE_OPENSSL_EXT_CODE "#define HAVE_OPENSSL_EXT 1")
116116
endif()
117117
endblock()
118118

cmake/ext/openssl/config.cmake.h.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
and built as shared. Elsewhere it is defined to value 1 when enabled.
44
This platform-dependent definition inconsistency has been addressed as of
55
PHP 8.4: https://github.com/php/php-src/pull/14333. */
6-
@HAVE_OPENSSL_EXT@
6+
@HAVE_OPENSSL_EXT_CODE@
77

88
/* Define to 1 if the PHP extension 'openssl' is available. */
99
#cmakedefine HAVE_OPENSSL 1

cmake/ext/random/config.cmake.h.in

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1+
/* Define to 1 if you have the <CommonCrypto/CommonRandom.h> header file. */
2+
#cmakedefine HAVE_COMMONCRYPTO_COMMONRANDOM_H 1
3+
14
/* Define to 1 if you have the declaration of 'arc4random_buf', and to 0 if
25
you don't. */
36
#cmakedefine01 HAVE_DECL_ARC4RANDOM_BUF
47

58
/* Define to 1 if you have the 'getrandom' function. */
69
#cmakedefine HAVE_GETRANDOM 1
7-
8-
/* Define to 1 if you have the <CommonCrypto/CommonRandom.h> header file. */
9-
#cmakedefine HAVE_COMMONCRYPTO_COMMONRANDOM_H 1

cmake/ext/session/config.cmake.h.in

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,15 @@
33

44
/* Define to 1 if the PHP extension 'session' is available. */
55
#cmakedefine HAVE_PHP_SESSION 1
6+
7+
/* Define to 1 if you have the 'pread' function. */
8+
#cmakedefine HAVE_PREAD 1
9+
10+
/* Define to 1 if you have the 'pwrite' function. */
11+
#cmakedefine HAVE_PWRITE 1
12+
13+
/* Define to 1 if 'pread' declaration with 'off64_t' is missing. */
14+
#cmakedefine PHP_PREAD_64 1
15+
16+
/* Define to 1 if 'pwrite' declaration with 'off64_t' is missing. */
17+
#cmakedefine PHP_PWRITE_64 1

cmake/main/php_config.cmake.h.in

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -373,9 +373,6 @@
373373
/* Define to 1 if you have the 'prctl' function. */
374374
#cmakedefine HAVE_PRCTL 1
375375

376-
/* Define to 1 if you have the 'pread' function. */
377-
#cmakedefine HAVE_PREAD 1
378-
379376
/* Define to 1 if you have the 'procctl' function. */
380377
#cmakedefine HAVE_PROCCTL 1
381378

@@ -400,9 +397,6 @@
400397
/* Define to 1 if you have the <pwd.h> header file. */
401398
#cmakedefine HAVE_PWD_H 1
402399

403-
/* Define to 1 if you have the 'pwrite' function. */
404-
#cmakedefine HAVE_PWRITE 1
405-
406400
/* Define to 1 if you have the <resolv.h> header file. */
407401
#cmakedefine HAVE_RESOLV_H 1
408402

@@ -772,12 +766,6 @@
772766
/* The 'uname' output. */
773767
#define PHP_OS "@CMAKE_SYSTEM_NAME@"
774768

775-
/* Define to 1 if 'pread' declaration with 'off64_t' is missing. */
776-
#cmakedefine PHP_PREAD_64 1
777-
778-
/* Define to 1 if 'pwrite' declaration with 'off64_t' is missing. */
779-
#cmakedefine PHP_PWRITE_64 1
780-
781769
/* Define to 1 if PHP uses its own SIGCHLD handler, and to 0 if not. */
782770
#cmakedefine01 PHP_SIGCHILD
783771

0 commit comments

Comments
 (0)