summaryrefslogtreecommitdiff
path: root/mail/faces/patches/patch-av
blob: a5c5fad19d437c1ef268eecadb76d8ddd47d965b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
$NetBSD: patch-av,v 1.4 2006/01/08 14:30:01 tron Exp $

--- compface/cmain.c.orig	1991-10-24 03:28:07.000000000 +0100
+++ compface/cmain.c	2006-01-08 14:19:04.000000000 +0000
@@ -33,12 +33,21 @@
 
 /* error handling definitions follow */
 
-extern int errno, sys_nerr;
+#include <errno.h>
+#include <stdio.h>
+
+#if !defined(__NetBSD__) && !defined(__INTERIX) && !defined(__DragonFly__) && !defined(__FreeBSD__) && !defined(__APPLE__)
+extern int sys_nerr;
 extern char *sys_errlist[];
+#endif
 
 extern void exit P((int)) ;
 
+#ifdef __INTERIX
+#define ERR strerror(errno)
+#else
 #define ERR ((errno < sys_nerr) ? sys_errlist[errno] : "")
+#endif
 #define INITERR(s) {(void)strcpy(fbuf, cmdname); (void)strcat(fbuf, ": ");\
 					(void)strcat(fbuf, (s));}
 #define ADDERR(s) (void)strcat(fbuf, (s));