BSD signal blocking
Kaz Kylheku
kaz@ashi.footprints.net
Wed Aug 2 13:20:00 GMT 2000
On 2 Aug 2000, Ulrich Drepper wrote:
> Date: 02 Aug 2000 12:38:56 -0700
> From: Ulrich Drepper <drepper@redhat.com>
> Reply-To: Ulrich Drepper <drepper@cygnus.com>
> To: Bruno Haible <haible@ilog.fr>
> Cc: libc-alpha@sourceware.cygnus.com
> Subject: Re: BSD signal blocking
>
> Bruno Haible <haible@ilog.fr> writes:
>
> > Programs that make use of BSD signal blocking functions, like the following
> > one, cannot be compiled with CC="gcc -ansi" on Linux, because the libc is
> > missing the sigmask() function. Therefore sigmask() should be added to the
> > libc.
>
> I don't want to add this. This is a "then don't do it" case. Don't
> use the -ansi flag if you are not writing code which is ISO/ANSI C.
I use -ansi all the time, and then use various feature selection macros
to select additional interfaces that are not in ANSI C. That's how it
s supposed to work.
Bruno, does it not work if you use
gcc -ansi -D_BSD_SOURCE
?
Without the -D_BSD_SOURCE, the compiler must not add any non-ANSI-C
materials into standard ANSI C headers like <signal.h>, except where
permitted.
More information about the Libc-alpha
mailing list