Commit fe628d09 by Doug Evans

* gcc.c (pfatal_pexecute): Delete code to check errno < sys_nerr.

From-SVN: r12281
parent 745466f2
...@@ -973,8 +973,8 @@ char * ...@@ -973,8 +973,8 @@ char *
my_strerror(e) my_strerror(e)
int e; int e;
{ {
#ifdef HAVE_STRERROR #ifdef HAVE_STRERROR
return strerror(e); return strerror(e);
#else #else
...@@ -4557,18 +4557,6 @@ pfatal_pexecute (errmsg_fmt, errmsg_arg) ...@@ -4557,18 +4557,6 @@ pfatal_pexecute (errmsg_fmt, errmsg_arg)
char *errmsg_fmt; char *errmsg_fmt;
char *errmsg_arg; char *errmsg_arg;
{ {
char buf[30];
char *s;
/* ??? Why doesn't my_strerror handle this? */
if (errno < sys_nerr)
s = my_strerror (errno);
else
{
sprintf (buf, "unknown error %d", errno);
s = buf;
}
if (errmsg_arg) if (errmsg_arg)
{ {
/* Space for trailing '\0' is in %s. */ /* Space for trailing '\0' is in %s. */
...@@ -4577,7 +4565,7 @@ pfatal_pexecute (errmsg_fmt, errmsg_arg) ...@@ -4577,7 +4565,7 @@ pfatal_pexecute (errmsg_fmt, errmsg_arg)
errmsg_fmt = msg; errmsg_fmt = msg;
} }
fatal ("%s: %s", errmsg_fmt, s); fatal ("%s: %s", errmsg_fmt, my_strerror (errno));
} }
/* More 'friendly' abort that prints the line and file. /* More 'friendly' abort that prints the line and file.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment