This is the mail archive of the gcc-patches@gcc.gnu.org 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]

Re: gcc-4_2-branch: tiny issue with libiberty


Hello!

On Mon, Nov 12, 2007 at 09:16:21PM -0500, DJ Delorie wrote:
> > 	* strsignal.c (psignal): Adjust parameters to the declaration.
> 
> Which declaration?

OK, that ChangeLog comment was not the best one possible, I agree...

#v+
$ info libc Signal\ Messages
[...]
 -- Function: void psignal (int SIGNUM, const char *MESSAGE)
[...]
     This function is a BSD feature, declared in the header file
     `signal.h'.
[...]
$ echo '#include <signal.h>' | gcc -x c -o - -E - | grep psignal
extern void psignal (int __sig, __const char *__s);
#v-

Same for ``man psignal''.


Here is a better patch.  (It was late last night...)

#v+
2007-11-13  Thomas Schwinge  <tschwinge@gnu.org>

	* strsignal.c (psignal): Adjust comment and parameters to what is
	used in BSD systems.

Index: strsignal.c
===================================================================
--- strsignal.c	(Revision 130136)
+++ strsignal.c	(Arbeitskopie)
@@ -536,7 +536,7 @@
 
 /*
 
-@deftypefn Supplemental void psignal (unsigned @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},
@@ -549,7 +549,7 @@
 #ifndef HAVE_PSIGNAL
 
 void
-psignal (unsigned signo, char *message)
+psignal (int signo, const char *message)
 {
   if (signal_names == NULL)
     {
#v-


Someone then also needs to regenerate the `functions.texi' file.  Shall I
also submit a patch for that one?


Regards,
 Thomas

Attachment: signature.asc
Description: Digital signature


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