Skip to content

Commit 3e315df

Browse files
committed
Merge branch 'PHP-8.2'
2 parents 5018dfe + e9e5b4c commit 3e315df

File tree

3 files changed

+15
-4
lines changed

3 files changed

+15
-4
lines changed

NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ PHP NEWS
22
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
33
?? ??? ????, PHP 8.3.0beta3
44

5+
- Core:
6+
. Fixed strerror_r detection at configuration time. (Kévin Dunglas)
7+
58
- DOM:
69
. adoptNode now respects the strict error checking property. (nielsdos)
710

Zend/zend.c

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1646,9 +1646,15 @@ ZEND_API ZEND_COLD ZEND_NORETURN void zend_error_noreturn(int type, const char *
16461646

16471647
ZEND_API ZEND_COLD ZEND_NORETURN void zend_strerror_noreturn(int type, int errn, const char *message)
16481648
{
1649-
#ifdef HAVE_STR_ERROR_R
1650-
char buf[1024];
1651-
strerror_r(errn, buf, sizeof(buf));
1649+
#ifdef HAVE_STRERROR_R
1650+
char b[1024];
1651+
1652+
# ifdef STRERROR_R_CHAR_P
1653+
char *buf = strerror_r(errn, b, sizeof(b));
1654+
# else
1655+
strerror_r(errn, b, sizeof(b));
1656+
char *buf = b;
1657+
# endif
16521658
#else
16531659
char *buf = strerror(errn);
16541660
#endif

configure.ac

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -648,9 +648,11 @@ asprintf \
648648
nanosleep \
649649
memmem \
650650
memrchr \
651-
strerror_r \
652651
)
653652

653+
dnl Check for strerror_r, and if its a POSIX-compatible or a GNU specific version.
654+
AC_FUNC_STRERROR_R
655+
654656
AX_FUNC_WHICH_GETHOSTBYNAME_R
655657

656658
dnl Some systems (like OpenSolaris) do not have nanosleep in libc.

0 commit comments

Comments
 (0)