[PATCH] <signal.h>: Make bsd_signal available with _GNU_SOURCE
Adhemerval Zanella Netto
adhemerval.zanella@linaro.org
Thu Dec 8 18:23:34 GMT 2022
On 08/12/22 15:10, Florian Weimer wrote:
> * 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?
I think deprecation works better here, I kind reluctant because moving it
to _GNU_SOURCE means that we are 'promoting' a symbol where there is
already a replacement.
More information about the Libc-alpha
mailing list