From 1a087fb7e8d363622657b13a53df911ec55deba1 Mon Sep 17 00:00:00 2001 From: Xuefer Date: Mon, 16 Jul 2012 08:11:39 +0000 Subject: [PATCH] fix build. additional_functions requires PHP 5.3 git-svn-id: svn://svn.lighttpd.net/xcache/trunk@978 c26eb9a1-5813-0410-bd6c-c2e55f420ca7 --- ChangeLog | 2 +- xcache.c | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index bc73870..4a062d2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,7 +5,7 @@ API Changes ChangeLog ======== * closes #972: warning/error when XCache is loaded incorrectly - * closes #73: warn for improper PHP_FCGI_CHILDREN setting fcgi mode + * closes #73: warn for improper PHP_FCGI_CHILDREN setting fcgi mode (>=PHP_5_3) * closes #174: updated api for clear all cache 2.0.1 2012-07-14 diff --git a/xcache.c b/xcache.c index 6779d55..c957e48 100644 --- a/xcache.c +++ b/xcache.c @@ -3870,11 +3870,14 @@ static PHP_MINIT_FUNCTION(xcache) #endif REGISTER_INI_ENTRIES(); + /* additional_functions requires PHP 5.3. TODO: find simpler way to do it */ +#ifdef ZEND_ENGINE_2_3 if (strcmp(sapi_module.name, "cgi-fcgi") == 0 && !sapi_module.additional_functions && !getenv("XCACHE_SKIP_FCGI_WARNING") && !getenv("GATEWAY_INTERFACE")) { if ((getenv("PHP_FCGI_CHILDREN") == NULL) || (atoi(getenv("PHP_FCGI_CHILDREN")) < 1)) { zend_error(E_WARNING, "PHP_FCGI_CHILDREN should be >= 1 and use 1 group of parent/childs model. Set XCACHE_SKIP_FCGI_WARNING=1 to skip this warning. See " XCACHE_WIKI_URL "/Faq"); } } +#endif xc_config_long(&xc_php_size, "xcache.size", "0"); xc_config_hash(&xc_php_hcache, "xcache.count", "1");