From b89c43519aca995eb49402de8447456c1220490b Mon Sep 17 00:00:00 2001 From: Derick Rethans Date: Thu, 11 Apr 2002 12:53:24 +0000 Subject: [PATCH] - Mark Apache2, overload and aggregation as experimental --- configure.in | 36 ++++++++++++++++++++++++++++++++++ ext/overload/config.m4 | 2 +- ext/standard/aggregation.c | 5 +++++ ext/standard/aggregation.h | 4 ++++ ext/standard/basic_functions.c | 6 ++++++ ext/standard/basic_functions.h | 2 ++ ext/standard/config.m4 | 8 ++++++++ 7 files changed, 62 insertions(+), 1 deletion(-) diff --git a/configure.in b/configure.in index cfb554bcaf..890f3ddaa3 100644 --- a/configure.in +++ b/configure.in @@ -1123,6 +1123,42 @@ dnl else dnl rm -f main/internal_functions.c.old dnl fi + + # experimental things + if test $PHP_SAPI = "apache2filter" ; then + echo "+--------------------------------------------------------------------+" + echo "| *** WARNING *** |" + echo "| |" + echo "| Apache 2 Support is EXPERIMENTAL and should NOT be used in |" + echo "| production environment. Before submitting bug reports, try the |" + echo "| latest CVS snapshot from http://snaps.php.net |" + fi + + if test "$PHP_OVERLOAD" != "no"; then + echo "+--------------------------------------------------------------------+" + echo "| *** WARNING *** |" + echo "| |" + echo "| The overload extension is highly EXPERIMENTAL and will most |" + echo "| certainly change in newer versions. You have been warned! |" + fi + + if test "$PHP_AGGREGATE" != "no"; then + echo "+--------------------------------------------------------------------+" + echo "| *** WARNING *** |" + echo "| |" + echo "| The aggregate functions are highly EXPERIMENTAL and will most |" + echo "| certainly change in newer versions. You have been warned! |" + fi + + if test $UNAME = "FreeBSD" && test $PHP_SAPI = "apache2filter" && test $TSRM_PTH != "pth-config" ; then + echo "+--------------------------------------------------------------------+" + echo "| *** WARNING *** |" + echo "| |" + echo "| In order to build PHP as a Apache2 module on FreeBSD, you have to |" + echo "| add --with-tsrm-pth to your ./configure line. Therefore you need |" + echo "| to install gnu-pth from /usr/ports/devel/pth. |" + fi + if test -n "$PHP_APXS_BROKEN"; then echo "+--------------------------------------------------------------------+" echo "| WARNING: Your $APXS script is most likely broken." diff --git a/ext/overload/config.m4 b/ext/overload/config.m4 index a523c0e5ca..4b0463ba50 100644 --- a/ext/overload/config.m4 +++ b/ext/overload/config.m4 @@ -3,7 +3,7 @@ dnl $Id$ dnl PHP_ARG_ENABLE(overload,whether to enable user-space object overloading support, -[ --disable-overload Disable user-space object overloading support.], yes) +[ --enable-overload EXPERIMENTAL: Enable user-space object overloading support.], no) if test "$PHP_OVERLOAD" != "no"; then AC_DEFINE(HAVE_OVERLOAD, 1, [ ]) diff --git a/ext/standard/aggregation.c b/ext/standard/aggregation.c index 1e1ffd4aa3..0c1a34a5dd 100644 --- a/ext/standard/aggregation.c +++ b/ext/standard/aggregation.c @@ -21,6 +21,9 @@ #include "php.h" #include "basic_functions.h" #include "aggregation.h" + +#ifdef HAVE_AGGREGATE + #if HAVE_PCRE || HAVE_BUNDLED_PCRE #include "ext/pcre/php_pcre.h" #endif @@ -598,6 +601,8 @@ PHP_FUNCTION(deaggregate) } /* }}} */ +#endif /* HAVE_AGGREGATE */ + /* * Local variables: * tab-width: 4 diff --git a/ext/standard/aggregation.h b/ext/standard/aggregation.h index 551782fdfe..ff3eedbb70 100644 --- a/ext/standard/aggregation.h +++ b/ext/standard/aggregation.h @@ -18,6 +18,8 @@ /* $Id$ */ +#ifdef HAVE_AGGREGATE + #ifndef AGGREGATION_H #define AGGREGATION_H @@ -49,3 +51,5 @@ PHP_FUNCTION(deaggregate); PHP_FUNCTION(aggregation_info); #endif /* AGGREGATION_H */ + +#endif /* HAVE_AGGREGATE */ diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c index b004fe0aa6..2fae423907 100644 --- a/ext/standard/basic_functions.c +++ b/ext/standard/basic_functions.c @@ -816,6 +816,7 @@ function_entry basic_functions[] = { PHP_FE(str_rot13, NULL) /* functions from aggregate.c */ +#if HAVE_AGGREGATE PHP_FE(aggregate, first_arg_force_ref) PHP_FE(aggregate_methods, first_arg_force_ref) PHP_FE(aggregate_methods_by_list, first_arg_force_ref) @@ -825,6 +826,7 @@ function_entry basic_functions[] = { PHP_FE(aggregate_properties_by_regexp, first_arg_force_ref) PHP_FE(deaggregate, first_arg_force_ref) PHP_FE(aggregation_info, first_arg_force_ref) +#endif {NULL, NULL, NULL} }; @@ -908,7 +910,9 @@ static void basic_globals_ctor(php_basic_globals *basic_globals_p TSRMLS_DC) BG(next) = NULL; BG(left) = -1; BG(user_tick_functions) = NULL; +#ifdef HAVE_AGGREGATION BG(aggregation_table) = NULL; +#endif zend_hash_init(&BG(sm_protected_env_vars), 5, NULL, NULL, 1); BG(sm_allowed_env_vars) = NULL; @@ -1115,11 +1119,13 @@ PHP_RSHUTDOWN_FUNCTION(basic) BG(user_tick_functions) = NULL; } +#ifdef HAVE_AGRGEGATION if (BG(aggregation_table)) { zend_hash_destroy(BG(aggregation_table)); efree(BG(aggregation_table)); BG(aggregation_table) = NULL; } +#endif #ifdef HAVE_MMAP if (BG(mmap_file)) { diff --git a/ext/standard/basic_functions.h b/ext/standard/basic_functions.h index 7b3d83d764..11461763e8 100644 --- a/ext/standard/basic_functions.h +++ b/ext/standard/basic_functions.h @@ -181,7 +181,9 @@ typedef struct { size_t mmap_len; #endif +#ifdef HAVE_AGGREGATE HashTable *aggregation_table; +#endif } php_basic_globals; #ifdef ZTS diff --git a/ext/standard/config.m4 b/ext/standard/config.m4 index e0043d23a7..210908702c 100644 --- a/ext/standard/config.m4 +++ b/ext/standard/config.m4 @@ -229,6 +229,14 @@ AC_ARG_WITH(system-regex, fi ]) + +PHP_ARG_ENABLE(aggregate, whether to enable aggregation support, +[ --enable-aggregate EXPERIMENTAL: Enable user-space aggregation support.], no) + +if test "$PHP_AGGREGATE" != "no"; then + AC_DEFINE(HAVE_AGGREGATE, 1, [ ]) +fi + if test "$PHP_SAPI" = "cgi"; then AC_DEFINE(ENABLE_CHROOT_FUNC, 1, [Whether to enable chroot() function]) fi -- 2.40.0