From: David Hedbor Date: Thu, 7 Dec 2000 19:01:13 +0000 (+0000) Subject: Fix for Pike 7.1 (error -> Pike_error). Caudium bug #12486. X-Git-Tag: php-4.0.5RC1~970 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9147a81a19739464cbcc008a08d143d8aa1848c4;p=php Fix for Pike 7.1 (error -> Pike_error). Caudium bug #12486. --- diff --git a/sapi/caudium/caudium.c b/sapi/caudium/caudium.c index 1a869781e8..747179f200 100644 --- a/sapi/caudium/caudium.c +++ b/sapi/caudium/caudium.c @@ -46,7 +46,6 @@ #include #include #include -#include #include #include #include @@ -57,6 +56,15 @@ #include #include +#if (PIKE_MAJOR_VERSION == 7 && PIKE_MINOR_VERSION == 1 && PIKE_BUILD_VERSION >= 12) || PIKE_MAJOR_VERSION > 7 || (PIKE_MAJOR_VERSION == 7 && PIKE_MINOR_VERSION > 1) +# include "pike_error.h" +#else +# include "error.h" +# ifndef Pike_error +# define Pike_error error +# endif +#endif + #ifndef ZTS /* Need thread safety */ #error You need to compile PHP with threads. @@ -713,15 +721,15 @@ void f_php_caudium_request_handler(INT32 args) php_caudium_request *_request; THIS = malloc(sizeof(php_caudium_request)); if(THIS == NULL) - error("Out of memory."); + Pike_error("Out of memory."); // if(current_thread == th_self()) - // error("PHP4.Interpreter->run: Tried to run a PHP-script from a PHP " + // Pike_error("PHP4.Interpreter->run: Tried to run a PHP-script from a PHP " // "callback!"); get_all_args("PHP4.Interpreter->run", args, "%S%m%O%*", &script, &request_data, &my_fd_obj, &done_callback); if(done_callback->type != PIKE_T_FUNCTION) - error("PHP4.Interpreter->run: Bad argument 4, expected function.\n"); + Pike_error("PHP4.Interpreter->run: Bad argument 4, expected function.\n"); add_ref(request_data); add_ref(my_fd_obj); add_ref(script);