e4c56b0f59
in addition to NetBSD.
49 lines
1.1 KiB
Text
49 lines
1.1 KiB
Text
$NetBSD: patch-aa,v 1.5 2008/12/15 15:37:56 is Exp $
|
|
|
|
--- lib/error.c.orig 1998-04-04 22:38:04.000000000 +0000
|
|
+++ lib/error.c
|
|
@@ -44,7 +44,7 @@ char *progname = NULL;
|
|
|
|
jmp_buf top_level;
|
|
|
|
-static FILE *errlog = stderr;
|
|
+static FILE *errlog = NULL;
|
|
|
|
/* **************************************************************** */
|
|
/* */
|
|
@@ -93,6 +93,8 @@ handle_error (severity, format, arg1, ar
|
|
int severity;
|
|
char *format, *arg1, *arg2, *arg3;
|
|
{
|
|
+ if (errlog == NULL)
|
|
+ errlog = stderr;
|
|
#ifdef USE_SYSLOG
|
|
if (errlog == LOG_SYS)
|
|
{
|
|
@@ -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);
|