summaryrefslogtreecommitdiff
path: root/print/dviselect/files/patch-lib_error.c
diff options
context:
space:
mode:
Diffstat (limited to 'print/dviselect/files/patch-lib_error.c')
-rw-r--r--print/dviselect/files/patch-lib_error.c53
1 files changed, 53 insertions, 0 deletions
diff --git a/print/dviselect/files/patch-lib_error.c b/print/dviselect/files/patch-lib_error.c
new file mode 100644
index 000000000000..6e9fb918a4c3
--- /dev/null
+++ b/print/dviselect/files/patch-lib_error.c
@@ -0,0 +1,53 @@
+--- lib/error.c.orig Wed Nov 15 04:19:40 1989
++++ lib/error.c Wed Oct 15 06:38:57 2003
+@@ -18,7 +18,8 @@
+ */
+
+ #include <stdio.h>
+-#include <varargs.h>
++#include <stdarg.h>
++#include <errno.h>
+
+ #ifdef lint
+
+@@ -31,20 +32,15 @@
+ #else lint
+
+ extern char *ProgName;
+-extern int errno;
+-extern char *sys_errlist[];
+-extern int sys_nerr;
+
+-error(va_alist)
+- va_dcl
++error(char *fmt,...)
+ {
+ va_list l;
+ int quit, e;
+- char *fmt;
+
+ (void) fflush(stdout); /* sync error messages */
+ (void) fprintf(stderr, "%s: ", ProgName);
+- va_start(l);
++ va_start(l,fmt);
+ /* pick up the constant arguments: quit, errno, printf format */
+ quit = va_arg(l, int);
+ e = va_arg(l, int);
+@@ -69,15 +65,13 @@
+ exit(quit);
+ }
+
+-panic(va_alist)
+- va_dcl
++panic(char *fmt,...)
+ {
+ va_list l;
+- char *fmt;
+
+ (void) fflush(stdout);
+ (void) fprintf(stderr, "%s: panic: ", ProgName);
+- va_start(l);
++ va_start(l,fmt);
+ /* pick up the constant argument: printf format */
+ fmt = va_arg(l, char *);
+ #if defined(sys5) || defined(HAVE_VPRINTF)