signal.2: Update FTM requirements (_DEFAULT_SOURCE)

Also remove redundant text covering FTM details that
are already provided in feature_test_macros(7).

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2016-02-12 15:26:53 +01:00
parent 6b0f5f5c4c
commit f8e7625cad
1 changed files with 13 additions and 25 deletions

View File

@ -155,6 +155,10 @@ glibc also defines (the BSD-derived)
.I sig_t
if
.B _BSD_SOURCE
(glibc 2.19 and earlier)
or
.BR _DEFAULT_SOURCE
(glibc 2.19 and later)
is defined.
Without use of such a type, the declaration of
.BR signal ()
@ -232,34 +236,18 @@ wrapper function does not invoke the kernel system call.
Instead, it calls
.BR sigaction (2)
using flags that supply BSD semantics.
This default behavior is provided as long as the
This default behavior is provided as long as a suitable
feature test macro is defined:
.B _BSD_SOURCE
feature test macro is defined.
By default,
.B _BSD_SOURCE
is defined;
it is also implicitly defined if one defines
.BR _GNU_SOURCE ,
and can of course be explicitly defined.
.IP *
On glibc 2 and later, if the
.B _BSD_SOURCE
feature test macro is not defined, then
on glibc 2.19 and earlier or
.BR _DEFAULT_SOURCE
in glibc 2.19 and later.
(By default, these macros are defined; see
.BR feature_test_macros (7)
for details.)
If such a feature test macro is not defined, then
.BR signal ()
provides System\ V semantics.
(The default implicit definition of
.B _BSD_SOURCE
is not provided if one invokes
.BR gcc (1)
in one of its standard modes
.RI ( -std=xxx " or " -ansi )
or defines various other feature test macros such as
.BR _POSIX_SOURCE ,
.BR _XOPEN_SOURCE ,
or
.BR _SVID_SOURCE ;
see
.BR feature_test_macros (7).)
.\"
.\" System V semantics are also provided if one uses the separate
.\" .BR sysv_signal (3)