Subject: Re: problem with teTeX-bin package on mips
To: Simon Burge <simonb@netbsd.org>
From: Adrian Bunk <bunk@fachschaften.tu-muenchen.de>
List: port-mips
Date: 09/30/1999 08:46:39
On Thu, 30 Sep 1999, Simon Burge wrote:

> Folks,
> 
> I've got a problem with the teTeX-bin package on a pmax.  In
> teTeX-1.0/texk/ps2pkm/objects.h there's a
> 
> 	#define   abort(line)       t1_abort(line)
> 
> and then lots of calls to abort("string") in that directory.  Problem
> is that on a mips, the va_arg() macro contains a call to the c library
> abort() and the C preprocessor barfs because it sees a call to abort
> with no arguments.
> 
> I think the simplest change is to remove the #define and just call
> t1_abort() everywhere (about a dozen files).  Sound ok?

I had the same problem. The patch below solved the problem (which appears
only on that one place). After these changes teTeX compiled on the mips
without any problems. The patch undefs abort before the usage of va_arg
and redefines it after that. There are perhaps better solutions for
solving the problem (perhaps the one you mentioned?).

> Simon.

cu,
Adrian


--- SKYE/teTeX-1.0/texk/ps2pkm/objects.c	Tue Feb 24 12:54:33 1998
+++ teTeX-1.0/texk/ps2pkm/objects.c	Fri Jul  9 23:32:01 1999
@@ -896,6 +896,7 @@
 */
  
 #ifdef KPATHSEA
+#undef abort
 void Consume PVAR1C(int, n, ap)
 {
   struct xobject *arg;
@@ -909,6 +910,7 @@
   va_end(ap);
   return;
 }}
+#define abort(line) t1_abort(line)
 #else
 void Consume(n, obj1, obj2, obj3) /* non-ANSI avoids overly strict type checking */
        int n;