Hi all,
please consider printing the errno value together with "Unknown system
error" if strerror() failed. It failed for me on Interix for
errno=-1, which I'm interested to know about, just to get an idea what
could be wrong, and that strerror() is not wrong.
Martin
--- gnulib/lib/error.c.orig Sat Jul 21 10:10:38 2007
+++ gnulib/lib/error.c Mon Sep 24 20:38:36 2007
@@ -121,15 +121,16 @@
s = strerror (errnum);
#endif
-#if !_LIBC
- if (! s)
- s = _("Unknown system error");
-#endif
-
#if _LIBC
__fxprintf (NULL, ": %s", s);
#else
- fprintf (stderr, ": %s", s);
+ if (s)
+ fprintf (stderr, ": %s", s);
+ else
+ {
+ s = _("Unknown system error");
+ fprintf (stderr, ": %s (errno=%d)", s, errnum);
+ }
#endif
}
_______________________________________________
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils