[Please keep me CCed, I'm not subscribed to gcc-patches.  Thank you]

Hi,

the definition of psignal in libiberty is

   void psignal (int, char *);

The correct definition per POSIX is

   void psignal (int, const char *);

The below patch fixes that.


Thanks,
Corinna


        * strsignal.c (psignal): Change second parameter to const char *.
        Fix comment accordingly.


Index: strsignal.c
===================================================================
RCS file: /cvs/src/src/libiberty/strsignal.c,v
retrieving revision 1.11
diff -u -p -r1.11 strsignal.c
--- strsignal.c 19 Jun 2008 15:17:56 -0000      1.11
+++ strsignal.c 5 May 2011 07:29:42 -0000
@@ -538,7 +538,7 @@ strtosigno (const char *name)
 
 /*
 
-@deftypefn Supplemental void psignal (int @var{signo}, char *@var{message})
+@deftypefn Supplemental void psignal (int @var{signo}, const char 
*@var{message})
 
 Print @var{message} to the standard error, followed by a colon,
 followed by the description of the signal specified by @var{signo},
@@ -551,7 +551,7 @@ followed by a newline.
 #ifndef HAVE_PSIGNAL
 
 void
-psignal (int signo, char *message)
+psignal (int signo, const char *message)
 {
   if (signal_names == NULL)
     {


-- 
Corinna Vinschen
Cygwin Project Co-Leader
Red Hat

Reply via email to