mirror of https://github.com/mkerrisk/man-pages
More refinements
This commit is contained in:
parent
18409fb814
commit
e9600b209a
|
@ -52,7 +52,7 @@ When a function requires that a feature test macro is defined,
|
|||
the manual page SYNOPSIS includes a note of the following form
|
||||
(this example from the
|
||||
.BR chmod (2)
|
||||
man page):
|
||||
manual page):
|
||||
.RS
|
||||
.sp
|
||||
.B #include <sys/stat.h>
|
||||
|
@ -96,8 +96,25 @@ cc -D_XOPEN_SOURCE=500 # Or any value > 500
|
|||
.PP
|
||||
Note that, as described below, some feature test macros are
|
||||
defined be default, so that it may not always be necessary to
|
||||
explicitly specify the feature test macro(s) shown
|
||||
in the SYNOPSIS.
|
||||
explicitly specify the feature test macro(s) shown in the
|
||||
SYNOPSIS.
|
||||
|
||||
In a few cases, manual pages use a shorthand for expressing the
|
||||
feature test macro requirements (this example from
|
||||
.BR readahead (2)):
|
||||
.RS
|
||||
.nf
|
||||
|
||||
.B #define _GNU_SOURCE
|
||||
.B #include <fcntl.h>
|
||||
.sp
|
||||
.BI "ssize_t readahead(int " fd ", off64_t *" offset ", size_t " count );
|
||||
.fi
|
||||
.RE
|
||||
.PP
|
||||
This syntax is used in cases where only a single
|
||||
feature test macro can be used to expose the function
|
||||
declaration, and that macro is not defined by default.
|
||||
.SS Feature test macros understood by glibc
|
||||
Linux/glibc understands the following feature test macros:
|
||||
.\" FIXME ? add _ATFILE_SOURCE to this list
|
||||
|
@ -273,10 +290,9 @@ and result in a run-time error if the check fails.
|
|||
Use of this macro requires compiler support, available with
|
||||
.BR gcc (1)
|
||||
since version 4.0.
|
||||
.SS Feature test macros defined by default
|
||||
.PP
|
||||
When
|
||||
.BR gcc (1)
|
||||
is invoked, the following macros are defined by default:
|
||||
The following macros are defined by default:
|
||||
.BR _BSD_SOURCE ,
|
||||
.BR _SVID_SOURCE ,
|
||||
.BR _POSIX_SOURCE ,
|
||||
|
|
Loading…
Reference in New Issue