File netmaj-2.0.7-build.patch of Package netmaj

--- netmaj/lib/libcurses/printw.c.build	2003-10-08 19:08:46.497340088 +0900
+++ netmaj/lib/libcurses/printw.c	2003-10-08 19:08:56.814771600 +0900
@@ -42,10 +42,6 @@
  * is not in effect.
  */
 
-#ifdef __GNUC__
-#undef __STDC__
-#endif
-
 #if __STDC__
 #include <stdarg.h>
 #else
--- netmaj/xui/src/gt/widget/widget.h.build	2003-10-08 21:01:41.789737296 +0900
+++ netmaj/xui/src/gt/widget/widget.h	2003-10-08 21:02:04.357306504 +0900
@@ -75,7 +75,7 @@
     _base_widget_body;
   };
 
-#include <varargs.h>
+#include <stdarg.h>
 
 #include "gt/widget/resource.h"
 #include "gt/widget/event.h"
--- netmaj/xui/src/gt/widget/vararg.c.build	2003-10-08 21:13:10.607021152 +0900
+++ netmaj/xui/src/gt/widget/vararg.c	2003-10-08 21:41:21.269001464 +0900
@@ -33,18 +33,16 @@
  * Copyright (C) 1995,1996 Todo Software All rights reserved.
  */
 
+#include <stdarg.h>
 
-#include <varargs.h>
-
-call_varargs (va_alist)
-     va_dcl
+call_varargs (int first, ...)
 {
   va_list p;
   void *s;
   int (*fp) ();
   char *arg[20];
   int i = 0;
-  va_start (p);
+  va_start (p, first);
 
   fp = va_arg (p, void *);
   s = va_arg (p, void *);
@@ -59,15 +57,14 @@
   (*fp) (s, i, &arg);
 }
 
-call_varargs2 (va_alist)
-     va_dcl
+call_varargs2 (int first, ...)
 {
   va_list p;
   void *s, *s2;
   int (*fp) ();
   char *arg[20];
   int i = 0;
-  va_start (p);
+  va_start (p, first);
 
   fp = va_arg (p, void *);
   s = va_arg (p, void *);
--- netmaj/xui/src/util/error.c.build	2003-10-08 21:49:47.205087488 +0900
+++ netmaj/xui/src/util/error.c	2003-10-08 22:00:41.532614584 +0900
@@ -52,7 +52,7 @@
 #define LX  "%x"
 #endif
 
-static FILE *outfp = stderr;
+#define outfp stderr
 
 static char *
 message (msg, argp)
--- netmaj/xui/src/int/readexpr.c.build	2003-10-08 22:16:27.415818480 +0900
+++ netmaj/xui/src/int/readexpr.c	2003-10-08 22:16:50.811261832 +0900
@@ -36,7 +36,7 @@
 #include "nu.h"
 
 static integer_t inputc (void);
-static FILE *inputfp = stdin;
+static FILE *inputfp;
 
 void 
 nu_set_input (fp)
@@ -48,6 +48,7 @@
 static integer_t
 inputc ()
 {
+  if ( ! inputfp ) inputfp = stdin;
   return getc (inputfp);
 }
 
--- netmaj/global.h.build	2003-10-08 22:25:12.601978048 +0900
+++ netmaj/global.h	2003-10-08 22:25:58.308029672 +0900
@@ -36,14 +36,6 @@
 #define bzero(d,n)	memset(d,0,n)
 #endif
 
-#ifdef SYSV
-#define index 	strchr
-#define rindex 	strrchr
-#endif
-extern char *index();
-extern char *rindex();
-
-
 extern FILE *plog;	/* protocol logging */
 
 #ifndef	NETMAJ_LIB
--- netmaj/xui/src/int/expr.c.build	2003-10-08 22:29:05.945504440 +0900
+++ netmaj/xui/src/int/expr.c	2003-10-08 22:29:32.952398768 +0900
@@ -364,12 +364,14 @@
 
 
 /** print **/
-static FILE *fp = stderr;
+static FILE *fp;
 
 void
 expr_print (p)
      pointer p;
 {
+  if ( ! fp ) fp = stderr;
+
   switch (xid (p))
     {
     case id_expr:
--- netmaj/xui/src/int/interror.c.build	2003-10-08 22:29:51.403593760 +0900
+++ netmaj/xui/src/int/interror.c	2003-10-08 22:30:35.238929776 +0900
@@ -93,7 +93,7 @@
 #define LX  "%x"
 #endif
 
-static FILE *outfp = stderr;
+#define outfp stderr
 
 static char *
 message (msg, argp)