public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Nathan Sidwell <nathan@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc r11-6230] bootstrap: Don't use strsignal [PR 98300]
Date: Thu, 17 Dec 2020 14:07:26 +0000 (GMT)	[thread overview]
Message-ID: <20201217140727.0433D387540F@sourceware.org> (raw)

https://gcc.gnu.org/g:b429f53eba87b780beaa93a811c47f1254bf5517

commit r11-6230-gb429f53eba87b780beaa93a811c47f1254bf5517
Author: Nathan Sidwell <nathan@acm.org>
Date:   Thu Dec 17 06:05:25 2020 -0800

    bootstrap: Don't use strsignal [PR 98300]
    
    Sadly strsignal is nonportable, so signal numbers it is then.
    
            c++tools/
            * server.cc (crash_signal): Don't use strsignal.

Diff:
---
 c++tools/server.cc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/c++tools/server.cc b/c++tools/server.cc
index 6457dc5b878..8514ef6293b 100644
--- a/c++tools/server.cc
+++ b/c++tools/server.cc
@@ -213,7 +213,8 @@ static void ATTRIBUTE_NORETURN ATTRIBUTE_COLD
 crash_signal (int sig)
 {
   signal (sig, SIG_DFL);
-  internal_error ("signal %s", strsignal (sig));
+  // strsignal is not portable :(
+  internal_error ("signal %d", sig);
 }
 
 /* A fatal error of some kind.  */


                 reply	other threads:[~2020-12-17 14:07 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201217140727.0433D387540F@sourceware.org \
    --to=nathan@gcc.gnu.org \
    --cc=gcc-cvs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).