This is the mail archive of the newlib@sourceware.org mailing list for the newlib 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: [Patch] Always declare "kill" in include/sys/signal.h


On Aug 25 14:31, James Greenhalgh wrote:
> 
> Hi,
> 
> As I mentioned recently [1], newlib is providing a "kill" symbol to link
> against, without declaring "kill" in signal.h. This is confusing for the
> libgfortran build, which tries to link against kill (which succeeds), then
> tries to use it (which triggers -Werror=implicit-function-declaration).
> 
> This patch implements my suggestion in that thread - making the declaration
> of 'kill' in libc/include/sys/signal.h unconditional.
> 
> I've tested this by building a modified libgfortran on AArch64/ARM to see
> that the Werror goes away, and the libgfortran build succeeds.
> 
> Is something like this OK for newlib? If so, can someone please commit
> it on my behalf, as I have no commit access here.
> 
> Otherwise, what is your preferred direction for me to take this patch?
> 
> Thanks,
> James
> ---
> 2015-08-25  James Greenhalgh  <james.greenhalgh@arm.com>
> 
> 	* libc/include/sys/signal.h (kill): Unconditionally declare.
> 

> diff --git a/newlib/libc/include/sys/signal.h b/newlib/libc/include/sys/signal.h
> index e9aba7c..09f0778 100644
> --- a/newlib/libc/include/sys/signal.h
> +++ b/newlib/libc/include/sys/signal.h
> @@ -183,9 +183,9 @@ int _EXFUN(pthread_sigmask, (int how, const sigset_t *set, sigset_t *oset));
>  int _EXFUN(_kill, (pid_t, int));
>  #endif /* _COMPILING_NEWLIB */
>  #endif /* __CYGWIN__ || __rtems__ */
> -#if defined(__CYGWIN__) || defined(__rtems__) || defined(__SPU__)
> +
>  int _EXFUN(kill, (pid_t, int));
> -#endif /* __CYGWIN__ || __rtems__ || __SPU__ */
> +
>  #if defined(__CYGWIN__) || defined(__rtems__)
>  int _EXFUN(killpg, (pid_t, int));
>  int _EXFUN(sigaction, (int, const struct sigaction *, struct sigaction *));

Commited.


Thanks,
Corinna

-- 
Corinna Vinschen
Cygwin Maintainer
Red Hat

Attachment: pgpBPkDPXydkY.pgp
Description: PGP signature


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