summaryrefslogtreecommitdiff
path: root/zwgc
diff options
context:
space:
mode:
authorGravatar Greg Hudson <ghudson@mit.edu>1994-11-12 13:10:36 +0000
committerGravatar Greg Hudson <ghudson@mit.edu>1994-11-12 13:10:36 +0000
commitce829e7200cce7792244d5c688a83c06fee6a704 (patch)
tree1d0f55825a5d8139a3c7d5e2b3de75a4fa3df331 /zwgc
parenta2ecd57dc6cdaed15efaebb3ea516e5a3891c6e7 (diff)
This is the 90s, we should use strerror().
Diffstat (limited to 'zwgc')
-rw-r--r--zwgc/port.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/zwgc/port.c b/zwgc/port.c
index c0d48a0..c30bfad 100644
--- a/zwgc/port.c
+++ b/zwgc/port.c
@@ -36,6 +36,7 @@ static char rcsid_port_c[] = "$Id$";
* <<<>>>
*/
+#if defined(SUNOS) || defined(vax)
extern int errno, sys_nerr;
extern char *sys_errlist[];
@@ -48,6 +49,15 @@ string perror_to_string(errno)
/* <<<>>> */
return("illegal error number returned in errno!");
}
+#else
+#include <errno.h>
+
+string perror_to_string(errno)
+ int errno;
+{
+ return(strerror(errno));
+}
+#endif
/****************************************************************************/
/* */