diff --git a/src/pike_error.h b/src/pike_error.h index 98b9e1d9024b3fa80480c26c77fc656828826aae..afeebc1047563b1f8bcb7df3effbd5ad1fc4e7ab 100644 --- a/src/pike_error.h +++ b/src/pike_error.h @@ -2,12 +2,28 @@ || This file is part of Pike. For copyright information see COPYRIGHT. || Pike is distributed under GPL, LGPL and MPL. See the file COPYING || for more information. -|| $Id: pike_error.h,v 1.28 2003/04/01 14:24:19 mast Exp $ +|| $Id: pike_error.h,v 1.29 2003/04/01 19:12:48 mast Exp $ */ #ifndef PIKE_ERROR_H #define PIKE_ERROR_H +#ifdef CONFIGURE_TEST + +#include <stdio.h> + +static inline void Pike_fatal (const char *fmt, ...) +{ + va_list args; + va_start (args, fmt); + vfprintf (stderr, fmt, args); + abort(); +} + +#define Pike_error Pike_fatal + +#else /* !CONFIGURE_TEST */ + #include "machine.h" #ifdef HAVE_SETJMP_H @@ -347,4 +363,6 @@ PMOD_EXPORT extern const char msg_div_by_zero[]; #define ERR_EXT_DECLARE #include "errors.h" +#endif /* !CONFIGURE_TEST */ + #endif /* PIKE_ERROR_H */ diff --git a/src/pike_threadlib.h b/src/pike_threadlib.h index ce8bd523a1a24e01d128aca85b9f77b62befd7dc..4fadb98342dccd57355147aec781eefb03151a69 100644 --- a/src/pike_threadlib.h +++ b/src/pike_threadlib.h @@ -2,7 +2,7 @@ || This file is part of Pike. For copyright information see COPYRIGHT. || Pike is distributed under GPL, LGPL and MPL. See the file COPYING || for more information. -|| $Id: pike_threadlib.h,v 1.37 2003/03/31 17:46:38 grubba Exp $ +|| $Id: pike_threadlib.h,v 1.38 2003/04/01 19:12:48 mast Exp $ */ #ifndef PIKE_THREADLIB_H @@ -800,7 +800,7 @@ PMOD_EXPORT extern int Pike_in_gc; #endif #ifdef __NT__ -#ifndef PIKE_DEBUG +#if !defined (PIKE_DEBUG) || defined (CONFIGURE_TEST) #define CheckValidHandle(X) (X) #else PMOD_EXPORT HANDLE CheckValidHandle(HANDLE h);