summaryrefslogtreecommitdiff
path: root/shells
diff options
context:
space:
mode:
authoragc <agc@pkgsrc.org>1999-08-03 15:00:57 +0000
committeragc <agc@pkgsrc.org>1999-08-03 15:00:57 +0000
commit37dc7b39ee7b5f400626430ba064256831990cd2 (patch)
tree73dfe53bcbfd3bb53c7b5aa8bd90ffa5ee5cb9d1 /shells
parentf5f867a0089f9d8c8f5d8195f031099db945883a (diff)
downloadpkgsrc-37dc7b39ee7b5f400626430ba064256831990cd2.tar.gz
Use strerror(3), rather than mucking about with sys_nerr and sys_errlist
specifically - makes this work on Solaris again.
Diffstat (limited to 'shells')
-rw-r--r--shells/rc/files/patch-sum4
-rw-r--r--shells/rc/patches/patch-aa35
2 files changed, 31 insertions, 8 deletions
diff --git a/shells/rc/files/patch-sum b/shells/rc/files/patch-sum
index 040659b0d57..dc531dae096 100644
--- a/shells/rc/files/patch-sum
+++ b/shells/rc/files/patch-sum
@@ -1,3 +1,3 @@
-$NetBSD: patch-sum,v 1.1 1999/07/09 14:17:03 agc Exp $
+$NetBSD: patch-sum,v 1.2 1999/08/03 15:00:57 agc Exp $
-MD5 (patch-aa) = c43744163990d902603e87acd15860f2
+MD5 (patch-aa) = 878149aa77e0f175c9ac8eebd3fdf5fd
diff --git a/shells/rc/patches/patch-aa b/shells/rc/patches/patch-aa
index 1ea0cfff6a5..89cfbd1663f 100644
--- a/shells/rc/patches/patch-aa
+++ b/shells/rc/patches/patch-aa
@@ -1,13 +1,36 @@
-$NetBSD: patch-aa,v 1.8 1999/06/20 20:38:39 kim Exp $
+$NetBSD: patch-aa,v 1.9 1999/08/03 15:00:58 agc Exp $
+
+Use the strerror(3) function - it's much better at this than we are,
+and hides the internals of the error list.
--- utils.c.orig Thu Oct 29 08:26:08 1998
+++ utils.c Sun Jun 20 16:35:35 1999
-@@ -19,8 +19,6 @@
+@@ -2,6 +2,7 @@
+
+ #include <errno.h>
+ #include <setjmp.h>
++#include <string.h>
+ #include "rc.h"
+ #include "jbwrap.h"
+
+@@ -19,6 +20,7 @@
/* our perror */
extern void uerror(char *s) {
-- extern int sys_nerr;
-- extern char *sys_errlist[];
++#if 0
+ extern int sys_nerr;
+ extern char *sys_errlist[];
if (errno > sys_nerr)
- return;
- if (s != NULL)
+@@ -27,6 +29,12 @@
+ fprint(2, "%s: %s\n", s, sys_errlist[errno]);
+ else
+ fprint(2, "%s\n", sys_errlist[errno]);
++#else
++ if (s != (char *) NULL) {
++ fprint(2, "%s: ", s);
++ }
++ fprint(2, "%s\n", strerror(errno));
++#endif
+ }
+
+ /* Die horribly. This should never get called. Please let me know if it does. */