diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2019-01-11 10:25:32 +0100 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2019-01-11 10:29:34 +0100 |
commit | e6eac08abd4aae0ea8052331c5ae81fc053e9138 (patch) | |
tree | e06a4ce5172c489df4eddb61b08d34f15bad8636 | |
parent | 9c010cefa3af1233d1090b216e26cc842e95fce2 (diff) | |
parent | 332b58f86591548acd5965c7f7f0085af377f0d9 (diff) | |
download | php-git-e6eac08abd4aae0ea8052331c5ae81fc053e9138.tar.gz |
Merge branch 'PHP-7.2' into PHP-7.3
-rw-r--r-- | NEWS | 2 | ||||
-rw-r--r-- | ext/opcache/ZendAccelerator.h | 16 | ||||
-rw-r--r-- | ext/opcache/config.m4 | 32 |
3 files changed, 29 insertions, 21 deletions
@@ -38,6 +38,8 @@ PHP NEWS lost). (Nikita) . Fixed bug #77434 (php-fpm workers are segfaulting in zend_gc_addre). (Nikita) + . Fixed bug #77361 (configure fails on 64-bit AIX when opcache enabled). + (Kevin Adler) - PCRE: . Fixed bug #77338 (get_browser with empty string). (Nikita) diff --git a/ext/opcache/ZendAccelerator.h b/ext/opcache/ZendAccelerator.h index 4852f475a0..b87f93a435 100644 --- a/ext/opcache/ZendAccelerator.h +++ b/ext/opcache/ZendAccelerator.h @@ -90,23 +90,9 @@ #ifndef ZEND_WIN32 extern int lock_file; -# if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || (defined(__APPLE__) && defined(__MACH__)/* Darwin */) || defined(__OpenBSD__) || defined(__NetBSD__) +# if defined(HAVE_FLOCK_AIX64) # define FLOCK_STRUCTURE(name, type, whence, start, len) \ - struct flock name = {start, len, -1, type, whence} -# elif defined(__svr4__) -# define FLOCK_STRUCTURE(name, type, whence, start, len) \ - struct flock name = {type, whence, start, len} -# elif defined(__linux__) || defined(__hpux) || defined(__GNU__) -# define FLOCK_STRUCTURE(name, type, whence, start, len) \ - struct flock name = {type, whence, start, len, 0} -# elif defined(_AIX) -# if defined(_LARGE_FILES) || defined(__64BIT__) -# define FLOCK_STRUCTURE(name, type, whence, start, len) \ struct flock name = {type, whence, 0, 0, 0, start, len } -# else -# define FLOCK_STRUCTURE(name, type, whence, start, len) \ - struct flock name = {type, whence, start, len} -# endif # elif defined(HAVE_FLOCK_BSD) # define FLOCK_STRUCTURE(name, type, whence, start, len) \ struct flock name = {start, len, -1, type, whence} diff --git a/ext/opcache/config.m4 b/ext/opcache/config.m4 index a267c639e0..392f4c65a3 100644 --- a/ext/opcache/config.m4 +++ b/ext/opcache/config.m4 @@ -342,7 +342,25 @@ int main() { AC_MSG_RESULT([$msg]) flock_type=unknown -AC_MSG_CHECKING("whether flock struct is linux ordered") +AC_MSG_CHECKING(for struct flock layout) + +if test "$flock_type" = "unknown"; then +AC_RUN_IFELSE([AC_LANG_SOURCE([[ + #include <fcntl.h> + struct flock lock = { 1, 2, 3, 4, 5, 6, 7 }; + int main() { + if(lock.l_type == 1 && lock.l_whence == 2 && lock.l_start == 6 && lock.l_len== 7) { + return 0; + } + return 1; + } +]])], [ + flock_type=aix64 + AC_DEFINE([HAVE_FLOCK_AIX64], [], [Struct flock is 64-bit AIX-type]) +], []) +fi + +if test "$flock_type" = "unknown"; then AC_RUN_IFELSE([AC_LANG_SOURCE([[ #include <fcntl.h> struct flock lock = { 1, 2, 3, 4, 5 }; @@ -355,10 +373,10 @@ AC_RUN_IFELSE([AC_LANG_SOURCE([[ ]])], [ flock_type=linux AC_DEFINE([HAVE_FLOCK_LINUX], [], [Struct flock is Linux-type]) - AC_MSG_RESULT("yes") -], [AC_MSG_RESULT("no")], [AC_MSG_RESULT([no])]) +], []) +fi -AC_MSG_CHECKING("whether flock struct is BSD ordered") +if test "$flock_type" = "unknown"; then AC_RUN_IFELSE([AC_LANG_SOURCE([[ #include <fcntl.h> struct flock lock = { 1, 2, 3, 4, 5 }; @@ -371,8 +389,10 @@ AC_RUN_IFELSE([AC_LANG_SOURCE([[ ]])], [ flock_type=bsd AC_DEFINE([HAVE_FLOCK_BSD], [], [Struct flock is BSD-type]) - AC_MSG_RESULT("yes") -], [AC_MSG_RESULT("no")], [AC_MSG_RESULT([no])]) +], []) +fi + +AC_MSG_RESULT([$flock_type]) if test "$flock_type" = "unknown"; then AC_MSG_ERROR([Don't know how to define struct flock on this system[,] set --enable-opcache=no]) |