4d472f8700
No user visible changes - basically, half a patch we had is now in the upstream sources (no more statical initializers using stderr).
31 lines
733 B
Text
31 lines
733 B
Text
$NetBSD: patch-aa,v 1.6 2011/11/23 16:25:07 is Exp $
|
|
|
|
--- lib/error.c.orig 1998-04-04 22:38:04.000000000 +0000
|
|
+++ lib/error.c
|
|
@@ -143,13 +145,16 @@ file_error (severity, filename)
|
|
int severity;
|
|
char *filename;
|
|
{
|
|
-#ifndef linux
|
|
+#if 0
|
|
extern int sys_nerr;
|
|
extern char *sys_errlist[];
|
|
#endif
|
|
|
|
- char *error_text;
|
|
+ const char *error_text;
|
|
|
|
+#if 1 /* was defined( __INTERIX) */
|
|
+ error_text = strerror(errno);
|
|
+#else
|
|
if (errno) {
|
|
if (errno < sys_nerr)
|
|
error_text = sys_errlist[errno];
|
|
@@ -158,6 +163,7 @@ file_error (severity, filename)
|
|
} else {
|
|
error_text = "(Hmm, no error?)";
|
|
}
|
|
+#endif
|
|
|
|
if (filename == (char *)NULL)
|
|
handle_error (severity, "%s", error_text, NULL, NULL);
|