summaryrefslogtreecommitdiffstats
path: root/sys/compat/svr4
diff options
context:
space:
mode:
authored <ed@FreeBSD.org>2010-03-28 13:13:22 +0000
committered <ed@FreeBSD.org>2010-03-28 13:13:22 +0000
commit4f08ecd7ed8b39a0e0cd094967835fa85d105793 (patch)
tree303a032d575560ac8850d94e75f68865c40f1161 /sys/compat/svr4
parent9eaa28fa3641501bd3b827e9b55aa8240713c80d (diff)
downloadFreeBSD-src-4f08ecd7ed8b39a0e0cd094967835fa85d105793.zip
FreeBSD-src-4f08ecd7ed8b39a0e0cd094967835fa85d105793.tar.gz
Rename st_*timespec fields to st_*tim for POSIX 2008 compliance.
A nice thing about POSIX 2008 is that it finally standardizes a way to obtain file access/modification/change times in sub-second precision, namely using struct timespec, which we already have for a very long time. Unfortunately POSIX uses different names. This commit adds compatibility macros, so existing code should still build properly. Also change all source code in the kernel to work without any of the compatibility macros. This makes it all a less ambiguous. I am also renaming st_birthtime to st_birthtim, even though it was a local extension anyway. It seems Cygwin also has a st_birthtim.
Diffstat (limited to 'sys/compat/svr4')
-rw-r--r--sys/compat/svr4/svr4_stat.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/sys/compat/svr4/svr4_stat.c b/sys/compat/svr4/svr4_stat.c
index cfb8276..cc84396 100644
--- a/sys/compat/svr4/svr4_stat.c
+++ b/sys/compat/svr4/svr4_stat.c
@@ -106,9 +106,9 @@ bsd_to_svr4_stat(st, st4)
st4->st_gid = st->st_gid;
st4->st_rdev = bsd_to_svr4_odev_t(st->st_rdev);
st4->st_size = st->st_size;
- st4->st_atim = st->st_atimespec.tv_sec;
- st4->st_mtim = st->st_mtimespec.tv_sec;
- st4->st_ctim = st->st_ctimespec.tv_sec;
+ st4->st_atim = st->st_atim.tv_sec;
+ st4->st_mtim = st->st_mtim.tv_sec;
+ st4->st_ctim = st->st_ctim.tv_sec;
}
#endif
@@ -127,9 +127,9 @@ bsd_to_svr4_xstat(st, st4)
st4->st_gid = st->st_gid;
st4->st_rdev = bsd_to_svr4_dev_t(st->st_rdev);
st4->st_size = st->st_size;
- st4->st_atim = st->st_atimespec;
- st4->st_mtim = st->st_mtimespec;
- st4->st_ctim = st->st_ctimespec;
+ st4->st_atim = st->st_atim;
+ st4->st_mtim = st->st_mtim;
+ st4->st_ctim = st->st_ctim;
st4->st_blksize = st->st_blksize;
st4->st_blocks = st->st_blocks;
strcpy(st4->st_fstype, "unknown");
@@ -150,9 +150,9 @@ bsd_to_svr4_stat64(st, st4)
st4->st_gid = st->st_gid;
st4->st_rdev = bsd_to_svr4_dev_t(st->st_rdev);
st4->st_size = st->st_size;
- st4->st_atim = st->st_atimespec;
- st4->st_mtim = st->st_mtimespec;
- st4->st_ctim = st->st_ctimespec;
+ st4->st_atim = st->st_atim;
+ st4->st_mtim = st->st_mtim;
+ st4->st_ctim = st->st_ctim;
st4->st_blksize = st->st_blksize;
st4->st_blocks = st->st_blocks;
strcpy(st4->st_fstype, "unknown");
OpenPOWER on IntegriCloud