Skip to content

Commit abf64f5

Browse files
committed
Merge branch 'PHP-8.3' into PHP-8.4
2 parents 5f81220 + 79a4c35 commit abf64f5

File tree

3 files changed

+25
-10
lines changed

3 files changed

+25
-10
lines changed

cmake/cmake/modules/PHP/SystemExtensions.cmake

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,16 @@ Conditionally defined preprocessor macros:
2424
2525
Defined on HP-UX.
2626
27+
* `_POSIX_PTHREAD_SEMANTICS`
28+
29+
Defined on Solaris and illumos-based systems.
30+
31+
As of Solaris 11.4, the `_POSIX_PTHREAD_SEMANTICS` is obsolete and according
32+
to documentation no header utilizes this anymore. For illumos-based systems,
33+
it's unclear where it is still needed, so at the time of writing, this is
34+
enabled unconditionally for all Solaris and illumos-based systems as enabling
35+
it doesn't cause issues. For other systems, this is irrelevant.
36+
2737
## Result variables
2838
2939
* `PHP_SYSTEM_EXTENSIONS_CODE`
@@ -116,7 +126,6 @@ target_compile_definitions(
116126
_HPUX_ALT_XOPEN_SOCKET_API=1
117127
_NETBSD_SOURCE=1
118128
_OPENBSD_SOURCE=1
119-
_POSIX_PTHREAD_SEMANTICS=1
120129
_TANDEM_SOURCE=1
121130
__STDC_WANT_IEC_60559_ATTRIBS_EXT__=1
122131
__STDC_WANT_IEC_60559_BFP_EXT__=1
@@ -201,14 +210,26 @@ if(CMAKE_SYSTEM_NAME STREQUAL "SunOS")
201210
endif()
202211
endif()
203212

213+
################################################################################
214+
# Check whether to enable _POSIX_PTHREAD_SEMANTICS.
215+
################################################################################
216+
217+
if(CMAKE_SYSTEM_NAME STREQUAL "SunOS")
218+
target_compile_definitions(
219+
PHP::SystemExtensions
220+
INTERFACE $<$<COMPILE_LANGUAGE:ASM,C,CXX>:_POSIX_PTHREAD_SEMANTICS>
221+
)
222+
223+
set(_POSIX_PTHREAD_SEMANTICS TRUE)
224+
endif()
225+
204226
################################################################################
205227
# Check whether to enable _XOPEN_SOURCE.
206228
################################################################################
207229

208230
# HP-UX 11.11 didn't define mbstate_t without setting _XOPEN_SOURCE to 500. This
209231
# is set conditionally, because BSD-based systems might have issues with this.
210232
if(CMAKE_SYSTEM_NAME STREQUAL "HP-UX")
211-
# Reset any possible previous value.
212233
unset(_XOPEN_SOURCE)
213234

214235
cmake_push_check_state(RESET)
@@ -275,7 +296,7 @@ set(PHP_SYSTEM_EXTENSIONS_CODE [[
275296
#endif
276297
/* Enable POSIX-compatible threading on Solaris. */
277298
#ifndef _POSIX_PTHREAD_SEMANTICS
278-
# define _POSIX_PTHREAD_SEMANTICS 1
299+
# cmakedefine _POSIX_PTHREAD_SEMANTICS
279300
#endif
280301
/* Enable extensions specified by ISO/IEC TS 18661-5:2014. */
281302
#ifndef __STDC_WANT_IEC_60559_ATTRIBS_EXT__

cmake/cmake/modules/PHP/ThreadSafety.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ set_target_properties(php_config PROPERTIES PHP_THREAD_SAFETY ON)
8686
target_compile_definitions(
8787
php_config
8888
INTERFACE
89-
$<$<AND:$<PLATFORM_ID:SunOS>,$<COMPILE_LANGUAGE:ASM,C,CXX>>:_POSIX_PTHREAD_SEMANTICS;_REENTRANT>
89+
$<$<AND:$<PLATFORM_ID:SunOS>,$<COMPILE_LANGUAGE:ASM,C,CXX>>:_REENTRANT>
9090
$<$<AND:$<PLATFORM_ID:FreeBSD>,$<COMPILE_LANGUAGE:ASM,C,CXX>>:_REENTRANT;_THREAD_SAFE>
9191
$<$<AND:$<PLATFORM_ID:AIX>,$<COMPILE_LANGUAGE:ASM,C,CXX>>:_THREAD_SAFE>
9292
$<$<AND:$<PLATFORM_ID:Linux,HP-UX,SCO_SV,UNIX_SV,UnixWare>,$<COMPILE_LANGUAGE:ASM,C,CXX>>:_REENTRANT>

cmake/cmake/platforms/SunOS.cmake

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,4 @@ if(CMAKE_SYSTEM_NAME STREQUAL "SunOS")
1515
"one of the illumos-based distributions."
1616
)
1717
endif()
18-
19-
target_compile_definitions(
20-
php_config
21-
INTERFACE
22-
$<$<COMPILE_LANGUAGE:ASM,C,CXX>:_POSIX_PTHREAD_SEMANTICS>
23-
)
2418
endif()

0 commit comments

Comments
 (0)