$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? */