Skip to content

Commit

Permalink
Disable options for sandbox support, keeping incomplete work
Browse files Browse the repository at this point in the history
This is closer to compatibility with php 7, but nothing is working.

Related to #114
  • Loading branch information
TysonAndre committed Oct 1, 2017
1 parent 663f525 commit 1fdee2e
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 16 deletions.
4 changes: 2 additions & 2 deletions ci/install_php_nts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ PHP_TAR_FILE="$PHP_FOLDER.tar.bz2"
if [ "$PHP_NTS_NORMAL_VERSION" != "7.2.0" ] ; then
curl --verbose https://secure.php.net/distributions/$PHP_TAR_FILE -o $PHP_TAR_FILE
else
curl --verbose https://downloads.php.net/~pollita/php-7.2.0RC2.tar.bz2 -o $PHP_TAR_FILE
PHP_FOLDER="php-7.2.0RC2"
curl --verbose https://downloads.php.net/~remi/php-7.2.0RC3.tar.bz2 -o $PHP_TAR_FILE
PHP_FOLDER="php-7.2.0RC3"
fi

tar xjf $PHP_TAR_FILE
Expand Down
28 changes: 14 additions & 14 deletions config.m4
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ PHP_ARG_ENABLE(runkit-super, whether to enable registration of user-defined auto
PHP_ARG_ENABLE(runkit_spl_object_id, whether to enable spl_object_id in PHP <= 7.1,
[ --enable-runkit-spl_object_id Enable spl_object_id support], no, no)

PHP_ARG_ENABLE(runkit-sandbox, whether to enable Sandbox support,
[ --enable-runkit-sandbox Enable Runkit_Sandbox (Requires ZTS)], inherit, no)
dnl PHP_ARG_ENABLE(runkit-sandbox, whether to enable Sandbox support,
dnl [ --enable-runkit-sandbox Enable Runkit_Sandbox (Requires ZTS)], inherit, no)

if test "$PHP_RUNKIT" != "no"; then
if test "$PHP_RUNKIT_MODIFY" = "inherit"; then
Expand All @@ -23,24 +23,24 @@ if test "$PHP_RUNKIT" != "no"; then
if test "$PHP_RUNKIT_SUPER" = "inherit"; then
PHP_RUNKIT_SUPER=yes
fi
if test "$PHP_RUNKIT_SANDBOX" = "inherit"; then
PHP_RUNKIT_SANDBOX=yes
fi
dnl if test "$PHP_RUNKIT_SANDBOX" = "inherit"; then
dnl PHP_RUNKIT_SANDBOX=yes
dnl fi
else
if test "$PHP_RUNKIT_MODIFY" = "inherit"; then
PHP_RUNKIT_MODIFY=no
fi
if test "$PHP_RUNKIT_SUPER" = "inherit"; then
PHP_RUNKIT_SUPER=no
fi
if test "$PHP_RUNKIT_SANDBOX" = "inherit"; then
PHP_RUNKIT_SANDBOX=no
fi
dnl if test "$PHP_RUNKIT_SANDBOX" = "inherit"; then
dnl PHP_RUNKIT_SANDBOX=no
dnl fi
fi

dnl test "$PHP_RUNKIT_SANDBOX" = "yes" ||
if test "$PHP_RUNKIT_MODIFY" = "yes" ||
test "$PHP_RUNKIT_SUPER" = "yes" ||
test "$PHP_RUNKIT_SANDBOX" = "yes"; then
test "$PHP_RUNKIT_SUPER" = "yes"; then
if test "$PHP_RUNKIT" != "classkit"; then
PHP_RUNKIT=yes
fi
Expand All @@ -56,16 +56,16 @@ if test "$PHP_RUNKIT" != "no"; then
if test "$PHP_RUNKIT_SUPER" != "no"; then
AC_DEFINE(PHP_RUNKIT_FEATURE_SUPER, 1, [Whether to export custom autoglobal registration feature])
fi
if test "$PHP_RUNKIT_SANDBOX" != "no"; then
AC_DEFINE(PHP_RUNKIT_FEATURE_SANDBOX, 1, [Whether to export Sandbox feature])
fi
dnl if test "$PHP_RUNKIT_SANDBOX" != "no"; then
dnl AC_DEFINE(PHP_RUNKIT_FEATURE_SANDBOX, 1, [Whether to export Sandbox feature])
dnl fi
if test "$PHP_RUNKIT_SPL_OBJECT_ID" != "no"; then
AC_DEFINE(PHP_RUNKIT_SPL_OBJECT_ID, 1, [Whether to define spl_object_id in php <= 7.1])
fi
dnl runkit_sandbox.c runkit_sandbox_parent.c
PHP_NEW_EXTENSION(runkit, runkit.c runkit_functions.c runkit_methods.c \
runkit_import.c \
runkit_constants.c \
runkit_sandbox.c runkit_sandbox_parent.c \
runkit_object_id.c \
runkit_common.c \
runkit_zend_execute_API.c \
Expand Down
2 changes: 2 additions & 0 deletions php_runkit.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,14 @@ static inline void* _debug_emalloc(void* data, int bytes, char* file, int line)
/* The TSRM interpreter patch required by runkit_sandbox was added in 5.1, but this package includes diffs for older versions
* Those diffs include an additional #define to indicate that they've been applied
*/
#ifdef PHP_RUNKIT_FEATURE_SANDBOX
#if (defined ZTS) && (defined PHP_RUNKIT_FEATURE_SANDBOX)
#define PHP_RUNKIT_SANDBOX
#else
// debugging code
#error Feature not enabled
#endif
#endif

#ifdef PHP_RUNKIT_FEATURE_MODIFY
#define PHP_RUNKIT_MANIPULATION
Expand Down

0 comments on commit 1fdee2e

Please sign in to comment.