From fe628d093252209a458c8604c6980ee69580683c Mon Sep 17 00:00:00 2001 From: Doug Evans Date: Thu, 13 Jun 1996 14:45:59 +0000 Subject: * gcc.c (pfatal_pexecute): Delete code to check errno < sys_nerr. From-SVN: r12281 --- gcc/gcc.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) (limited to 'gcc/gcc.c') diff --git a/gcc/gcc.c b/gcc/gcc.c index eba5f07..f13803d 100644 --- a/gcc/gcc.c +++ b/gcc/gcc.c @@ -973,8 +973,8 @@ char * my_strerror(e) int e; { - #ifdef HAVE_STRERROR + return strerror(e); #else @@ -4557,18 +4557,6 @@ pfatal_pexecute (errmsg_fmt, errmsg_arg) char *errmsg_fmt; 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) { /* Space for trailing '\0' is in %s. */ @@ -4577,7 +4565,7 @@ pfatal_pexecute (errmsg_fmt, errmsg_arg) 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. -- cgit v1.1