From aa184db827f97edc00dc588d0876f0414d5b5224 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Mon, 5 Oct 2020 10:05:56 +0200 Subject: [PATCH] Restore apc_arginfo.h header This is a reexport of php_apc_legacy_arginfo.h for use by apcu_bc. It intentionally fails the build on PHP 8, as apcu_bc will not be supported on PHP 8. --- apc_arginfo.h | 5 +++++ config.m4 | 2 +- config.w32 | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 apc_arginfo.h diff --git a/apc_arginfo.h b/apc_arginfo.h new file mode 100644 index 00000000..b197456e --- /dev/null +++ b/apc_arginfo.h @@ -0,0 +1,5 @@ +#if PHP_VERSION_ID < 80000 +# include "php_apc_legacy_arginfo.h" +#else +# error Not supported on PHP >= 8.0 +#endif diff --git a/config.m4 b/config.m4 index 70af8137..483f9743 100644 --- a/config.m4 +++ b/config.m4 @@ -243,7 +243,7 @@ if test "$PHP_APCU" != "no"; then PHP_SUBST(APCU_SHARED_LIBADD) PHP_SUBST(APCU_CFLAGS) PHP_SUBST(PHP_LDFLAGS) - PHP_INSTALL_HEADERS(ext/apcu, [php_apc.h apc.h apc_api.h apc_cache.h apc_cache_api.h apc_globals.h apc_iterator.h apc_lock.h apc_mutex.h apc_lock_api.h apc_sma.h apc_sma_api.h apc_serializer.h apc_stack.h]) + PHP_INSTALL_HEADERS(ext/apcu, [php_apc.h apc.h apc_api.h apc_cache.h apc_cache_api.h apc_globals.h apc_iterator.h apc_lock.h apc_mutex.h apc_lock_api.h apc_sma.h apc_sma_api.h apc_serializer.h apc_stack.h apc_arginfo.h php_apc_legacy_arginfo.h]) AC_DEFINE(HAVE_APCU, 1, [ ]) fi diff --git a/config.w32 b/config.w32 index e1328cb8..dcea900d 100644 --- a/config.w32 +++ b/config.w32 @@ -24,7 +24,7 @@ if(PHP_APCU != 'no') AC_DEFINE('APC_SRWLOCK_KERNEL', 1); AC_DEFINE('HAVE_APCU', 1); ADD_FLAG('CFLAGS_APCU', '/D WIN32_ONLY_COMPILER=1 /DAPC_SRWLOCK_KERNEL=1'); - PHP_INSTALL_HEADERS("ext/apcu", "php_apc.h apc.h apc_api.h apc_cache.h apc_cache_api.h apc_globals.h apc_iterator.h apc_lock.h apc_mutex.h apc_lock_api.h apc_sma.h apc_sma_api.h apc_serializer.h apc_stack.h apc_windows_srwlock_kernel.h"); + PHP_INSTALL_HEADERS("ext/apcu", "php_apc.h apc.h apc_api.h apc_cache.h apc_cache_api.h apc_globals.h apc_iterator.h apc_lock.h apc_mutex.h apc_lock_api.h apc_sma.h apc_sma_api.h apc_serializer.h apc_stack.h apc_windows_srwlock_kernel.h apc_arginfo.h php_apc_legacy_arginfo.h"); EXTENSION('apcu', apc_sources, PHP_APCU_SHARED, "/DZEND_ENABLE_STATIC_TSRMLS_CACHE=1"); }