Skip to content

Commit 77461f0

Browse files
committed
Sync CS
1 parent 8b8172a commit 77461f0

File tree

9 files changed

+35
-31
lines changed

9 files changed

+35
-31
lines changed

cmake/ext/gd/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -311,8 +311,8 @@ if(NOT PHP_EXT_GD_EXTERNAL)
311311
target_include_directories(php_ext_gd PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/libgd)
312312

313313
# Add -Wno-strict-prototypes C flag: https://github.com/php/php-src/pull/10803
314-
php_check_compiler_flag(C -Wno-strict-prototypes _PHP_HAVE_WNO_STRICT_PROTOTYPES)
315-
if(_PHP_HAVE_WNO_STRICT_PROTOTYPES)
314+
php_check_compiler_flag(C -Wno-strict-prototypes PHP_HAS_WNO_STRICT_PROTOTYPES)
315+
if(PHP_HAS_WNO_STRICT_PROTOTYPES)
316316
target_compile_options(
317317
php_ext_gd
318318
PRIVATE

cmake/ext/hash/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,9 +124,9 @@ else()
124124
php_check_compiler_flag(
125125
C
126126
-Wno-implicit-fallthrough
127-
_PHP_HAVE_WNO_IMPLICIT_FALLTHROUGH_C
127+
PHP_HAS_WNO_IMPLICIT_FALLTHROUGH_C
128128
)
129-
if(_PHP_HAVE_WNO_IMPLICIT_FALLTHROUGH_C)
129+
if(PHP_HAS_WNO_IMPLICIT_FALLTHROUGH_C)
130130
set_property(
131131
SOURCE ${sha3Dir}/KeccakP-1600-inplace32BI.c
132132
APPEND

cmake/ext/iconv/CMakeLists.txt

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,10 @@ if(TARGET Iconv::Iconv)
9393
# Sanity and library type checks.
9494
if(Iconv_IS_BUILT_IN)
9595
# When iconv is built into C library, first check if iconv function exists.
96-
check_symbol_exists(iconv iconv.h _PHP_HAVE_ICONV)
96+
check_symbol_exists(iconv iconv.h PHP_EXT_ICONV_HAS_ICONV)
9797

9898
# And if not, then check for libiconv function.
99-
if(NOT _PHP_HAVE_ICONV)
99+
if(NOT PHP_EXT_ICONV_HAS_ICONV)
100100
check_symbol_exists(libiconv iconv.h HAVE_LIBICONV)
101101
endif()
102102
else()
@@ -108,12 +108,12 @@ if(TARGET Iconv::Iconv)
108108
if(HAVE_LIBICONV)
109109
set(ICONV_ALIASED_LIBICONV TRUE)
110110
else()
111-
check_symbol_exists(iconv iconv.h _PHP_HAVE_ICONV)
111+
check_symbol_exists(iconv iconv.h PHP_EXT_ICONV_HAS_ICONV)
112112
endif()
113113
cmake_pop_check_state()
114114
endif()
115115

116-
if(NOT _PHP_HAVE_ICONV AND NOT HAVE_LIBICONV)
116+
if(NOT PHP_EXT_ICONV_HAS_ICONV AND NOT HAVE_LIBICONV)
117117
message(
118118
FATAL_ERROR
119119
"ext/iconv sanity check failed: neither 'iconv()' nor 'libiconv()' "
@@ -127,16 +127,16 @@ if(TARGET Iconv::Iconv)
127127
cmake_push_check_state(RESET)
128128
set(CMAKE_REQUIRED_LIBRARIES Iconv::Iconv)
129129
set(CMAKE_REQUIRED_QUIET TRUE)
130-
check_symbol_exists(_libiconv_version iconv.h _PHP_HAVE_GNU_LIBICONV)
130+
check_symbol_exists(_libiconv_version iconv.h PHP_EXT_ICONV_HAS_GNU_LIBICONV)
131131
cmake_pop_check_state()
132-
if(_PHP_HAVE_GNU_LIBICONV)
132+
if(PHP_EXT_ICONV_HAS_GNU_LIBICONV)
133133
message(CHECK_PASS "GNU libiconv")
134134
set(HAVE_LIBICONV TRUE)
135135
set(PHP_ICONV_IMPL "libiconv")
136136
endif()
137137

138138
# Check for glibc implementation.
139-
if(NOT _PHP_HAVE_GNU_LIBICONV)
139+
if(NOT PHP_EXT_ICONV_HAS_GNU_LIBICONV)
140140
cmake_push_check_state(RESET)
141141
set(CMAKE_REQUIRED_LIBRARIES Iconv::Iconv)
142142
set(CMAKE_REQUIRED_QUIET TRUE)
@@ -149,20 +149,24 @@ if(TARGET Iconv::Iconv)
149149
endif()
150150

151151
# Check for Konstantin Chuguev's iconv implementation.
152-
if(NOT _PHP_HAVE_GNU_LIBICONV AND NOT HAVE_GLIBC_ICONV)
152+
if(NOT PHP_EXT_ICONV_HAS_GNU_LIBICONV AND NOT HAVE_GLIBC_ICONV)
153153
cmake_push_check_state(RESET)
154154
set(CMAKE_REQUIRED_LIBRARIES Iconv::Iconv)
155155
set(CMAKE_REQUIRED_QUIET TRUE)
156-
check_symbol_exists(iconv_ccs_init iconv.h _PHP_HAVE_BSD_ICONV)
156+
check_symbol_exists(iconv_ccs_init iconv.h PHP_EXT_ICONV_HAS_BSD_ICONV)
157157
cmake_pop_check_state()
158158
endif()
159-
if(_PHP_HAVE_BSD_ICONV)
159+
if(PHP_EXT_ICONV_HAS_BSD_ICONV)
160160
message(CHECK_PASS "BSD iconv")
161161
set(PHP_ICONV_IMPL "BSD iconv")
162162
endif()
163163

164164
# Check for IBM iconv implementation.
165-
if(NOT _PHP_HAVE_GNU_LIBICONV AND NOT HAVE_GLIBC_ICONV AND NOT _PHP_HAVE_BSD_ICONV)
165+
if(
166+
NOT PHP_EXT_ICONV_HAS_GNU_LIBICONV
167+
AND NOT HAVE_GLIBC_ICONV
168+
AND NOT PHP_EXT_ICONV_HAS_BSD_ICONV
169+
)
166170
cmake_push_check_state(RESET)
167171
set(CMAKE_REQUIRED_LIBRARIES Iconv::Iconv)
168172
set(CMAKE_REQUIRED_QUIET TRUE)

cmake/ext/opcache/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -252,9 +252,9 @@ if(PHP_EXT_OPCACHE_JIT)
252252
php_check_compiler_flag(
253253
C
254254
-Wno-implicit-fallthrough
255-
_PHP_HAVE_WNO_IMPLICIT_FALLTHROUGH_C
255+
PHP_HAS_WNO_IMPLICIT_FALLTHROUGH_C
256256
)
257-
if(_PHP_HAVE_WNO_IMPLICIT_FALLTHROUGH_C)
257+
if(PHP_HAS_WNO_IMPLICIT_FALLTHROUGH_C)
258258
target_compile_options(php_ext_opcache PRIVATE -Wno-implicit-fallthrough)
259259
endif()
260260

cmake/ext/pcre/CMakeLists.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -192,9 +192,9 @@ else()
192192
php_check_compiler_flag(
193193
C
194194
-Wno-implicit-fallthrough
195-
_PHP_HAVE_WNO_IMPLICIT_FALLTHROUGH_C
195+
PHP_HAS_WNO_IMPLICIT_FALLTHROUGH_C
196196
)
197-
if(_PHP_HAVE_WNO_IMPLICIT_FALLTHROUGH_C)
197+
if(PHP_HAS_WNO_IMPLICIT_FALLTHROUGH_C)
198198
set_property(
199199
SOURCE pcre2lib/pcre2_jit_compile.c
200200
APPEND
@@ -227,12 +227,12 @@ else()
227227
message(CHECK_START "Checking whether Intel CET is enabled")
228228
cmake_push_check_state(RESET)
229229
set(CMAKE_REQUIRED_QUIET TRUE)
230-
check_symbol_exists(__CET__ "" _PHP_HAVE_PCRE2_INTEL_CET)
230+
check_symbol_exists(__CET__ "" PHP_EXT_PCRE_HAS_CET)
231231
cmake_pop_check_state()
232-
if(_PHP_HAVE_PCRE2_INTEL_CET)
232+
if(PHP_EXT_PCRE_HAS_CET)
233233
message(CHECK_PASS "yes")
234-
php_check_compiler_flag(C -mshstk _PHP_HAVE_MSHSTK_C)
235-
if(_PHP_HAVE_MSHSTK_C)
234+
php_check_compiler_flag(C -mshstk PHP_EXT_PCRE_HAS_MSHSTK_C)
235+
if(PHP_EXT_PCRE_HAS_MSHSTK_C)
236236
target_compile_options(php_ext_pcre PRIVATE -mshstk)
237237
endif()
238238
else()

cmake/ext/pspell/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@ target_sources(
6767
)
6868

6969
# Add -Wno-strict-prototypes as depends on user libs.
70-
php_check_compiler_flag(C -Wno-strict-prototypes _PHP_HAVE_WNO_STRICT_PROTOTYPES)
71-
if(_PHP_HAVE_WNO_STRICT_PROTOTYPES)
70+
php_check_compiler_flag(C -Wno-strict-prototypes PHP_HAS_WNO_STRICT_PROTOTYPES)
71+
if(PHP_HAS_WNO_STRICT_PROTOTYPES)
7272
target_compile_options(
7373
php_ext_pspell
7474
PRIVATE

cmake/ext/readline/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@ target_sources(
7373
)
7474

7575
# Add -Wno-strict-prototypes as depends on user libs.
76-
php_check_compiler_flag(C -Wno-strict-prototypes _PHP_HAVE_WNO_STRICT_PROTOTYPES)
77-
if(_PHP_HAVE_WNO_STRICT_PROTOTYPES)
76+
php_check_compiler_flag(C -Wno-strict-prototypes PHP_HAS_WNO_STRICT_PROTOTYPES)
77+
if(PHP_HAS_WNO_STRICT_PROTOTYPES)
7878
target_compile_options(
7979
php_ext_readline
8080
PRIVATE

cmake/ext/sockets/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,8 @@ check_include_files(sys/sockio.h HAVE_SYS_SOCKIO_H)
111111
check_include_files(linux/filter.h HAVE_LINUX_FILTER_H)
112112

113113
if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
114-
check_include_files(winsock.h _PHP_HAVE_WINSOCK_H)
115-
if(NOT _PHP_HAVE_WINSOCK_H)
114+
check_include_files(winsock.h PHP_EXT_SOCKETS_HAS_WINSOCK_H)
115+
if(NOT PHP_EXT_SOCKETS_HAS_WINSOCK_H)
116116
message(
117117
FATAL_ERROR
118118
"Required file winsock.h is missing for the socket extension."

cmake/ext/sqlite3/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,9 @@ if(TARGET SQLite::SQLite3)
8787
check_symbol_exists(
8888
sqlite3_load_extension
8989
sqlite3.h
90-
_PHP_HAVE_SQLITE3_LOAD_EXTENSION
90+
PHP_HAS_SQLITE3_LOAD_EXTENSION
9191
)
92-
if(NOT _PHP_HAVE_SQLITE3_LOAD_EXTENSION)
92+
if(NOT PHP_HAS_SQLITE3_LOAD_EXTENSION)
9393
set(SQLITE_OMIT_LOAD_EXTENSION TRUE)
9494
endif()
9595
cmake_pop_check_state()

0 commit comments

Comments
 (0)