From c1716071c0e7eef20c4f668ab7ee9d1fc01d22e0 Mon Sep 17 00:00:00 2001
From: Martin Stjernholm <mast@lysator.liu.se>
Date: Tue, 1 Apr 2003 21:12:48 +0200
Subject: [PATCH] Fixes to compile properly in configure tests.

Rev: src/pike_error.h:1.29
Rev: src/pike_threadlib.h:1.38
---
 src/pike_error.h     | 20 +++++++++++++++++++-
 src/pike_threadlib.h |  4 ++--
 2 files changed, 21 insertions(+), 3 deletions(-)

diff --git a/src/pike_error.h b/src/pike_error.h
index 98b9e1d902..afeebc1047 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 ce8bd523a1..4fadb98342 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);
-- 
GitLab