mirror of
https://github.com/php/php-src.git
synced 2025-08-19 08:49:28 +02:00
Merge branch 'PHP-7.3'
* PHP-7.3: Fix #76510: file_exists() stopped working for phar://
This commit is contained in:
commit
aaae9c66db
2 changed files with 39 additions and 0 deletions
36
acinclude.m4
36
acinclude.m4
|
@ -1739,6 +1739,42 @@ choke me
|
|||
fi
|
||||
])
|
||||
|
||||
dnl
|
||||
dnl PHP_BROKEN_GCC_STRLEN_OPT
|
||||
dnl
|
||||
dnl Early releases of GCC 8 shipped with a strlen() optimization bug, so they
|
||||
dnl didn't properly handle the `char val[1]` struct hack. See bug #76510.
|
||||
dnl
|
||||
AC_DEFUN([PHP_BROKEN_GCC_STRLEN_OPT], [
|
||||
AC_CACHE_CHECK([for broken gcc optimize-strlen],ac_cv_have_broken_gcc_strlen_opt,[
|
||||
AC_RUN_IFELSE([AC_LANG_SOURCE([[
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
struct s
|
||||
{
|
||||
int i;
|
||||
char c[1];
|
||||
};
|
||||
int main()
|
||||
{
|
||||
struct s *s = malloc(sizeof(struct s) + 3);
|
||||
s->i = 3;
|
||||
strcpy(s->c, "foo");
|
||||
return strlen(s->c+1) == 2;
|
||||
}
|
||||
]])],[
|
||||
ac_cv_have_broken_gcc_strlen_opt=yes
|
||||
],[
|
||||
ac_cv_have_broken_gcc_strlen_opt=no
|
||||
],[
|
||||
ac_cv_have_broken_gcc_strlen_opt=no
|
||||
])])
|
||||
if test "$ac_cv_have_broken_gcc_strlen_opt" = "yes"; then
|
||||
CFLAGS="$CFLAGS -fno-optimize-strlen"
|
||||
fi
|
||||
])
|
||||
|
||||
dnl
|
||||
dnl PHP_FOPENCOOKIE
|
||||
dnl
|
||||
|
|
|
@ -500,6 +500,9 @@ immintrin.h
|
|||
PHP_FOPENCOOKIE
|
||||
PHP_BROKEN_GETCWD
|
||||
PHP_BROKEN_GLIBC_FOPEN_APPEND
|
||||
if test "$GCC" = "yes"; then
|
||||
PHP_BROKEN_GCC_STRLEN_OPT
|
||||
fi
|
||||
|
||||
dnl Checks for typedefs, structures, and compiler characteristics.
|
||||
dnl -------------------------------------------------------------------------
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue