stat.2: _BSD_SOURCE and _SVID_SOURCE no longer expose nanosecond timestamps

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2016-07-26 13:02:46 +02:00
parent cdff989b46
commit 2a0bd971fa
1 changed files with 11 additions and 9 deletions

View File

@ -808,19 +808,21 @@ Since kernel 2.5.48, the
structure supports nanosecond resolution for the three file timestamp fields.
The nanosecond components of each timestamp are available
via names of the form
.IR st_atim.tv_nsec
if the
.B _BSD_SOURCE
or
.B _SVID_SOURCE
feature test macro is defined.
Nanosecond timestamps are nowadays standardized,
starting with POSIX.1-2008, and, starting with version 2.12,
glibc also exposes the nanosecond component names if
.IR st_atim.tv_nsec ,
if suitable feature test macros are defined.
Nanosecond timestamps were standardized in POSIX.1-2008,
and, starting with version 2.12,
glibc exposes the nanosecond component names if
.BR _POSIX_C_SOURCE
is defined with the value 200809L or greater, or
.BR _XOPEN_SOURCE
is defined with the value 700 or greater.
Up to and including glibc 2.19,
the definitions of the nanoseconds components are also defined if
.B _BSD_SOURCE
or
.B _SVID_SOURCE
is defined.
If none of the aforementioned macros are defined,
then the nanosecond values are exposed with names of the form
.IR st_atimensec .