forked from Imagelibrary/binutils-gdb
2008-06-19 Eric Blake <ebb9@byu.net>
Adjust strsignal to POSIX 200x prototype. * strsignal.c (strsignal): Remove const.
This commit is contained in:
@@ -404,10 +404,10 @@ call to @code{strsignal}.
|
||||
|
||||
#ifndef HAVE_STRSIGNAL
|
||||
|
||||
const char *
|
||||
char *
|
||||
strsignal (int signo)
|
||||
{
|
||||
const char *msg;
|
||||
char *msg;
|
||||
static char buf[32];
|
||||
|
||||
#ifndef HAVE_SYS_SIGLIST
|
||||
@@ -428,14 +428,16 @@ strsignal (int signo)
|
||||
{
|
||||
/* In range, but no sys_siglist or no entry at this index. */
|
||||
sprintf (buf, "Signal %d", signo);
|
||||
msg = (const char *) buf;
|
||||
msg = buf;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* In range, and a valid message. Just return the message. */
|
||||
msg = (const char *) sys_siglist[signo];
|
||||
/* In range, and a valid message. Just return the message. We
|
||||
can safely cast away const, since POSIX says the user must
|
||||
not modify the result. */
|
||||
msg = (char *) sys_siglist[signo];
|
||||
}
|
||||
|
||||
|
||||
return (msg);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user