This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: BSD signal blocking
- To: Ulrich Drepper <drepper at cygnus dot com>
- Subject: Re: BSD signal blocking
- From: Kaz Kylheku <kaz at ashi dot footprints dot net>
- Date: Wed, 2 Aug 2000 13:20:09 -0700 (PDT)
- cc: Bruno Haible <haible at ilog dot fr>, libc-alpha at sourceware dot cygnus dot com
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.