summaryrefslogtreecommitdiff
path: root/comms/xisp/patches/patch-ai
blob: 178f02292742cc2178c095b06c2875426b1448e1 (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
28
29
30
31
32
33
34
35
36
$NetBSD: patch-ai,v 1.1.1.1 1998/12/03 15:08:53 frueauf Exp $

--- xispterm.c.orig	Mon Oct 26 05:35:01 1998
+++ xispterm.c	Mon Nov 30 16:41:25 1998
@@ -88,13 +88,13 @@
 {
 	char emsg[MSGLEN_ERR+1];
 
-#ifndef SUNOS5x
+#ifdef HAVE_STRERROR
+	sprintf(emsg, "xisprccv: %s: %s\n", msg, strerror(errno));
+#else
 	if (errno < sys_nerr)
 		sprintf(emsg, "xispterm: %s: %s\n", msg, sys_errlist[errno]);
 	else
 		sprintf(emsg, "xispterm: %s: error #%d\n", msg, errno);
-#else
-	sprintf(emsg, "xisprccv: %s: %s\n", msg, strerror(errno));
 #endif
 	fputs(emsg, stderr);
 	exit(1);
@@ -150,11 +150,11 @@
 
 	va_start(ap);								/* start variable arg list */
 	fmt = va_arg(ap, char*);					/* first string is format */
-#ifndef SUNOS41x
-	bw = vsprintf(btmp, fmt, ap);				/* pass the rest to vsprintf */
-#else
+#ifdef BROKEN_VSPRINTF
 	vsprintf(btmp, fmt, ap);
 	bw = strlen(btmp);
+#else
+	bw = vsprintf(btmp, fmt, ap);				/* pass the rest to vsprintf */
 #endif
 	va_end(ap);									/* end variable arg list */
 	if ((tot+bw) < (MSGLEN_BROWSER-1))			/* do we have space for new? */