]> granicus.if.org Git - php/commitdiff
Fix for Pike 7.1 (error -> Pike_error). Caudium bug #12486.
authorDavid Hedbor <neotron@php.net>
Thu, 7 Dec 2000 19:01:13 +0000 (19:01 +0000)
committerDavid Hedbor <neotron@php.net>
Thu, 7 Dec 2000 19:01:13 +0000 (19:01 +0000)
sapi/caudium/caudium.c

index 1a869781e8070fa92f5f04421b6dac1a95949a3d..747179f2000ae926b9db2a5dd037a17f1c9ba2a7 100644 (file)
@@ -46,7 +46,6 @@
 #include <pike_types.h>
 #include <interpret.h>
 #include <module_support.h>
-#include <error.h>
 #include <array.h>
 #include <backend.h>
 #include <stralloc.h>
 #include <operators.h>
 #include <version.h>
 
+#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);