public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Adhemerval Zanella Netto <adhemerval.zanella@linaro.org>
To: Florian Weimer <fweimer@redhat.com>, libc-alpha@sourceware.org
Subject: Re: [PATCH] <signal.h>: Make bsd_signal available with _GNU_SOURCE
Date: Thu, 8 Dec 2022 14:11:19 -0300	[thread overview]
Message-ID: <e044567c-aca8-c219-4383-3f0f93cd5205@linaro.org> (raw)
In-Reply-To: <8735a3tlg9.fsf@oldenburg.str.redhat.com>



On 28/11/22 07:36, Florian Weimer via Libc-alpha wrote:
> The declaration does not conflict with anything.  This simplifies
> porting older software to C99 compilers which do not support implicit
> function declarations and which need -D_GNU_SOURCE for other function
> declarations.  Using __USE_MISC does not seem appropriate here because
> other systems (e.g., FreeBSD) do not declare bsd_signal.

I am not sure about this, bsd_signal is a POSIX deprecated and I think
old software should really move to sigaction or define the correct flags
to explicit use it.

> 
> ---
>  signal/signal.h | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/signal/signal.h b/signal/signal.h
> index 78d0d819aa..d175d7c3c4 100644
> --- a/signal/signal.h
> +++ b/signal/signal.h
> @@ -98,7 +98,8 @@ extern __sighandler_t __REDIRECT_NTH (signal,
>  # endif
>  #endif
>  
> -#if defined __USE_XOPEN_EXTENDED && !defined __USE_XOPEN2K8
> +#if (defined __USE_XOPEN_EXTENDED && !defined __USE_XOPEN2K8) \
> +  || defined __USE_GNU
>  /* The X/Open definition of `signal' conflicts with the BSD version.
>     So they defined another function `bsd_signal'.  */
>  extern __sighandler_t bsd_signal (int __sig, __sighandler_t __handler)
> 
> base-commit: f704192911c6c7b65a54beab3ab369fca7609a5d
> 

  reply	other threads:[~2022-12-08 17:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-28 10:36 Florian Weimer
2022-12-08 17:11 ` Adhemerval Zanella Netto [this message]
2022-12-08 18:10   ` Florian Weimer
2022-12-08 18:23     ` Adhemerval Zanella Netto

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e044567c-aca8-c219-4383-3f0f93cd5205@linaro.org \
    --to=adhemerval.zanella@linaro.org \
    --cc=fweimer@redhat.com \
    --cc=libc-alpha@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).