[PATCH] <signal.h>: Make bsd_signal available with _GNU_SOURCE

Florian Weimer fweimer@redhat.com
Thu Dec 8 18:10:23 GMT 2022


* Adhemerval Zanella Netto:

> 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.

And I thought this was the least controversial patch. 8-/

If -D_GNU_SOURCE is not the superset of all functionalities, it gets
more difficult to obtain all function prototypes, as needed for building
with stricter C99 compilers.  Currently, with default GCC flags, this
builds anyway due to an implicit function declaration, and I'd like to
preserve this behavior with GCC 14.

What about adding a deprecation warning?

Thanks,
Florian



More information about the Libc-alpha mailing list