* strsig.cc (strsignal): Return non-const buffer to allow building with recent

newlib change.
This commit is contained in:
Christopher Faylor 2008-06-19 00:02:13 +00:00
parent e81e314651
commit 4f1ed68c5c
2 changed files with 12 additions and 3 deletions

View file

@ -1,3 +1,8 @@
2008-06-18 Christopher Faylor <me+cygwin@cgf.cx>
* strsig.cc (strsignal): Return non-const buffer to allow building with
recent newlib change.
2008-06-17 Corinna Vinschen <corinna@vinschen.de>
* sec_auth.cc (DsGetDcNameA): Drop declaration.

View file

@ -73,13 +73,17 @@ static const sigdesc siglist[] =
{0, NULL, NULL}
};
extern "C" const char *
extern "C" char *
strsignal (int signo)
{
const char *sigstring = "Unknown signal %d";
for (int i = 0; siglist[i].n; i++)
if (siglist[i].n == signo)
return siglist[i].str;
__small_sprintf (_my_tls.locals.signamebuf, "Unknown signal %d", signo);
{
sigstring = siglist[i].str;
break;
}
__small_sprintf (_my_tls.locals.signamebuf, sigstring, signo);
return _my_tls.locals.signamebuf;
}