Skip to content

Commit 8b15858

Browse files
devnexencmb69
authored andcommitted
Fix GH-8142: Compilation error on cygwin
* pcntl: SIGPOLL/si_band is unsupported * intl: enable the signal apis with `_POSIX_C_SOURCE` Closes GH-8146.
1 parent 57ef16b commit 8b15858

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

NEWS

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@ PHP NEWS
22
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
33
?? ??? 2022, PHP 8.0.18
44

5+
- Intl:
6+
. Fixed bug GH-8142 (Compilation error on cygwin). (David Carlier)
7+
8+
- Pcntl:
9+
. Fixed bug GH-8142 (Compilation error on cygwin). (David Carlier)
10+
511
- Standard:
612
. Fixed bug GH-8048 (Force macOS to use statfs). (risner)
713

ext/intl/config.m4

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,9 @@ if test "$PHP_INTL" != "no"; then
8585
PHP_REQUIRE_CXX()
8686
PHP_CXX_COMPILE_STDCXX(11, mandatory, PHP_INTL_STDCXX)
8787
PHP_INTL_CXX_FLAGS="$INTL_COMMON_FLAGS $PHP_INTL_STDCXX $ICU_CXXFLAGS"
88+
case $host_alias in
89+
*cygwin*) PHP_INTL_CXX_FLAGS="$PHP_INTL_CXX_FLAGS -D_POSIX_C_SOURCE=200809L"
90+
esac
8891
if test "$ext_shared" = "no"; then
8992
PHP_ADD_SOURCES(PHP_EXT_DIR(intl), $PHP_INTL_CXX_SOURCES, $PHP_INTL_CXX_FLAGS)
9093
else

ext/pcntl/pcntl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1160,7 +1160,7 @@ static void pcntl_siginfo_to_zval(int signo, siginfo_t *siginfo, zval *user_sigi
11601160
case SIGBUS:
11611161
add_assoc_double_ex(user_siginfo, "addr", sizeof("addr")-1, (zend_long)siginfo->si_addr);
11621162
break;
1163-
#ifdef SIGPOLL
1163+
#if defined(SIGPOLL) && !defined(__CYGWIN__)
11641164
case SIGPOLL:
11651165
add_assoc_long_ex(user_siginfo, "band", sizeof("band")-1, siginfo->si_band);
11661166
# ifdef si_fd

0 commit comments

Comments
 (0)