Page MenuHomeFreeBSD

sys/stat.h: Improve timespec compatibility with other BSDs
ClosedPublic

Authored by mhorne063_gmail.com on Mar 18 2019, 6:11 PM.
Tags
None
Referenced Files
F174460212: D19626.id55208.diff
Sat, Oct 3, 10:38 AM
Unknown Object (File)
Fri, Oct 2, 5:16 PM
Unknown Object (File)
Thu, Oct 1, 4:57 AM
Unknown Object (File)
Fri, Sep 25, 9:19 AM
Unknown Object (File)
Fri, Sep 25, 9:18 AM
Unknown Object (File)
Fri, Sep 25, 8:18 AM
Unknown Object (File)
Sun, Sep 20, 1:39 PM
Unknown Object (File)
Sun, Sep 20, 8:26 AM
Subscribers

Details

Summary

OpenBSD and NetBSD provide macros to directly reference the underlying
struct timespec's tv_nsec member. While FreeBSD has such macros for
tv_sec, the others are missing. The following macros are added:

st->st_atimensec
st->st_mtimensec
st->st_ctimensec
st->st_birthtimensec

Adding these fields will provide programs which reference them better
portability to FreeBSD. An example of such a program is makefs(8), which
has unused support for subseconds that it has inherited from NetBSD.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable