Skip to content

Commit

Permalink
Restore apc_arginfo.h header
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
nikic committed Oct 5, 2020
1 parent 35dc2c6 commit aa184db
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions apc_arginfo.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#if PHP_VERSION_ID < 80000
# include "php_apc_legacy_arginfo.h"
#else
# error Not supported on PHP >= 8.0
#endif
2 changes: 1 addition & 1 deletion config.m4
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion config.w32
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}
Expand Down

0 comments on commit aa184db

Please sign in to comment.