This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Libiberty: POSIXify psignal definition

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


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.


	* 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.
-psignal (int signo, char *message)
+psignal (int signo, const char *message)
   if (signal_names == NULL)

Corinna Vinschen
Cygwin Project Co-Leader
Red Hat

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]