public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* libgloss psignal declaration [PATCH]
@ 2005-10-26 22:00 Shaun Jackman
  2005-10-26 23:19 ` DJ Delorie
  0 siblings, 1 reply; 2+ messages in thread
From: Shaun Jackman @ 2005-10-26 22:00 UTC (permalink / raw)
  To: GCC Bugs

I found the following patch necessary to build libiberty with newlib
headers. Although, glibc seems to use the same signature now.

Cheers,
Shaun

2005-10-26  Shaun Jackman  <sjackman@gmail.com>

	* libiberty/strsignal.c (psignal): Change the signo parameter from
	unsigned to int, and message from char * to const char*.

Index: libiberty/strsignal.c
===================================================================
RCS file: /cvs/src/src/libiberty/strsignal.c,v
retrieving revision 1.9
diff -u -r1.9 strsignal.c
--- libiberty/strsignal.c	28 Mar 2005 02:09:01 -0000	1.9
+++ libiberty/strsignal.c	26 Oct 2005 21:56:29 -0000
@@ -549,7 +549,7 @@
 #ifndef HAVE_PSIGNAL

 void
-psignal (unsigned signo, char *message)
+psignal (int signo, const char *message)
 {
   if (signal_names == NULL)
     {


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: libgloss psignal declaration [PATCH]
  2005-10-26 22:00 libgloss psignal declaration [PATCH] Shaun Jackman
@ 2005-10-26 23:19 ` DJ Delorie
  0 siblings, 0 replies; 2+ messages in thread
From: DJ Delorie @ 2005-10-26 23:19 UTC (permalink / raw)
  To: sjackman; +Cc: gcc-bugs


> I found the following patch necessary to build libiberty with newlib
> headers. Although, glibc seems to use the same signature now.

While I'm generally OK with this...

1. The patch is incomplete, as you don't update the documentation to
   match the new prototype.

2. GCC patches go to gcc-patches@gcc.gnu.org

3. If you have a psignal prototype, you should have a psignal
   function, and thus should not be compiling this code at all.  Thus,
   something else is broken.  Look for newlib-specific code in
   configure.ac.

I suggest leaving the prototype as-is until #3 is resolved, since the
conflict tells you when it's still broken.

> Cheers,
> Shaun
> 
> 2005-10-26  Shaun Jackman  <sjackman@gmail.com>
> 
> 	* libiberty/strsignal.c (psignal): Change the signo parameter from
> 	unsigned to int, and message from char * to const char*.
> 
> Index: libiberty/strsignal.c
> ===================================================================
> RCS file: /cvs/src/src/libiberty/strsignal.c,v
> retrieving revision 1.9
> diff -u -r1.9 strsignal.c
> --- libiberty/strsignal.c	28 Mar 2005 02:09:01 -0000	1.9
> +++ libiberty/strsignal.c	26 Oct 2005 21:56:29 -0000
> @@ -549,7 +549,7 @@
>  #ifndef HAVE_PSIGNAL
> 
>  void
> -psignal (unsigned signo, char *message)
> +psignal (int signo, const char *message)
>  {
>    if (signal_names == NULL)
>      {
> 


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-10-26 23:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-10-26 22:00 libgloss psignal declaration [PATCH] Shaun Jackman
2005-10-26 23:19 ` DJ Delorie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).