diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 341f6ca12..e3c4e12fc 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +2008-06-18 Christopher Faylor + + * strsig.cc (strsignal): Return non-const buffer to allow building with + recent newlib change. + 2008-06-17 Corinna Vinschen * sec_auth.cc (DsGetDcNameA): Drop declaration. diff --git a/winsup/cygwin/strsig.cc b/winsup/cygwin/strsig.cc index 71a8eb56c..b8d3207ed 100644 --- a/winsup/cygwin/strsig.cc +++ b/winsup/cygwin/strsig.cc @@ -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; }