From a06b40cdf5ba0d2ab4f9b4c77d21e45ff284fac7 Mon Sep 17 00:00:00 2001 From: Szabolcs Nagy Date: Tue, 26 May 2015 22:27:23 +0530 Subject: struct stat is not posix conform On 21/05/15 05:29, Siddhesh Poyarekar wrote: > On Wed, May 20, 2015 at 06:55:02PM +0100, Szabolcs Nagy wrote: >> i guess it's ok for consistency if i fix struct stat64 >> too to use __USE_XOPEN2K8. >> >> i will run some tests and come back with a patch > > I also think it would be appropriate to change this code in other > architectures (microblaze and nacl IIRC) to make all of them > consistent. It is a mechanical enough change IMO that all arch > maintainer acks is not necessary. > here is the patch with consistent __USE_XOPEN2K8 ok to commit? 2015-05-21 Szabolcs Nagy [BZ #18234] * conform/data/sys/stat.h-data (struct stat): Add tests for st_atim, st_mtim and st_ctim members. * sysdeps/nacl/bits/stat.h (struct stat, struct stat64): Make st_atim, st_ctim, st_mtim visible under __USE_XOPEN2K8 only. * sysdeps/unix/sysv/linux/generic/bits/stat.h (struct stat,): (struct stat64): Likewise. * sysdeps/unix/sysv/linux/ia64/bits/stat.h (struct stat,): (struct stat64): Likewise. * sysdeps/unix/sysv/linux/microblaze/bits/stat.h (struct stat,): (struct stat64): Likewise. --- conform/data/sys/stat.h-data | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'conform') diff --git a/conform/data/sys/stat.h-data b/conform/data/sys/stat.h-data index 631daa41b0..f5b17a31ac 100644 --- a/conform/data/sys/stat.h-data +++ b/conform/data/sys/stat.h-data @@ -39,6 +39,11 @@ element {struct stat} off_t st_size element {struct stat} time_t st_atime element {struct stat} time_t st_mtime element {struct stat} time_t st_ctime +#if defined XOPEN2K8 || defined POSIX2008 +element {struct stat} {struct timespec} st_atim +element {struct stat} {struct timespec} st_mtim +element {struct stat} {struct timespec} st_ctim +#endif #if !defined POSIX && !defined POSIX2008 element {struct stat} blksize_t st_blksize element {struct stat} blkcnt_t st_blocks -- cgit 1.4.1