Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2008-06-19 04:02:13 +0400
committerChristopher Faylor <me@cgf.cx>2008-06-19 04:02:13 +0400
commit4f1ed68c5c9f982faf4d4ba13655f351ebf6488b (patch)
treea7023aa9e3be6048a77d43ad37bbeacbd6b0464c
parente81e314651900e629ad40370bc1751d7bce56ac5 (diff)
* strsig.cc (strsignal): Return non-const buffer to allow building with recent
newlib change.
-rw-r--r--winsup/cygwin/ChangeLog5
-rw-r--r--winsup/cygwin/strsig.cc10
2 files changed, 12 insertions, 3 deletions
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 <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.
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;
}