diff -p -up uClibc-0.9.30.1/libc/sysdeps/linux/alpha/bits/kernel_stat.h.ns_stat~ uClibc-0.9.30.1/libc/sysdeps/linux/alpha/bits/kernel_stat.h --- uClibc-0.9.30.1/libc/sysdeps/linux/alpha/bits/kernel_stat.h.ns_stat~ 2009-11-30 12:24:11.920934849 -0500 +++ uClibc-0.9.30.1/libc/sysdeps/linux/alpha/bits/kernel_stat.h 2009-11-30 12:24:21.517926710 -0500 @@ -40,12 +40,9 @@ struct kernel_stat64 { unsigned int st_nlink; unsigned int __pad0; - unsigned long st_atime; - unsigned long st_atimensec; - unsigned long st_mtime; - unsigned long st_mtimensec; - unsigned long st_ctime; - unsigned long st_ctimensec; + struct timespec st_atim; + struct timespec st_mtim; + struct timespec st_ctim; long __unused[3]; }; diff -p -up uClibc-0.9.30.1/libc/sysdeps/linux/alpha/bits/stat.h.ns_stat~ uClibc-0.9.30.1/libc/sysdeps/linux/alpha/bits/stat.h --- uClibc-0.9.30.1/libc/sysdeps/linux/alpha/bits/stat.h.ns_stat~ 2009-11-30 12:24:11.920934849 -0500 +++ uClibc-0.9.30.1/libc/sysdeps/linux/alpha/bits/stat.h 2009-11-30 12:24:21.533923172 -0500 @@ -41,7 +41,7 @@ Use neat tidy anonymous unions and structures when possible. */ -#if 0 /*def __USE_MISC*/ +#ifdef __USE_MISC # if __GNUC_PREREQ(3,3) # define __ST_TIME(X) \ __extension__ union { \ diff -p -up uClibc-0.9.30.1/libc/sysdeps/linux/arm/bits/kernel_stat.h.ns_stat~ uClibc-0.9.30.1/libc/sysdeps/linux/arm/bits/kernel_stat.h --- uClibc-0.9.30.1/libc/sysdeps/linux/arm/bits/kernel_stat.h.ns_stat~ 2009-11-30 12:24:11.921965428 -0500 +++ uClibc-0.9.30.1/libc/sysdeps/linux/arm/bits/kernel_stat.h 2009-11-30 12:24:21.533923172 -0500 @@ -9,8 +9,6 @@ * struct kernel_stat should look like... It turns out each arch has a * different opinion on the subject... */ -#define STAT_HAVE_NSEC 1 - struct kernel_stat { #if defined(__ARMEB__) unsigned short st_dev; @@ -32,12 +30,9 @@ struct kernel_stat { unsigned long st_size; unsigned long st_blksize; unsigned long st_blocks; - unsigned long st_atime; - unsigned long st_atime_nsec; - unsigned long st_mtime; - unsigned long st_mtime_nsec; - unsigned long st_ctime; - unsigned long st_ctime_nsec; + struct timespec st_atim; + struct timespec st_mtim; + struct timespec st_ctim; unsigned long __unused4; unsigned long __unused5; }; @@ -60,12 +55,9 @@ struct kernel_stat64 { unsigned long st_blksize; unsigned long long st_blocks; /* Number 512-byte blocks allocated. */ - unsigned long st_atime; - unsigned long st_atime_nsec; - unsigned long st_mtime; - unsigned long st_mtime_nsec; - unsigned long st_ctime; - unsigned long st_ctime_nsec; + struct timespec st_atim; + struct timespec st_mtim; + struct timespec st_ctim; unsigned long long st_ino; #ifndef __ARM_EABI__ } __attribute__((packed)); diff -p -up uClibc-0.9.30.1/libc/sysdeps/linux/avr32/bits/kernel_stat.h.ns_stat~ uClibc-0.9.30.1/libc/sysdeps/linux/avr32/bits/kernel_stat.h --- uClibc-0.9.30.1/libc/sysdeps/linux/avr32/bits/kernel_stat.h.ns_stat~ 2009-11-30 12:24:11.921965428 -0500 +++ uClibc-0.9.30.1/libc/sysdeps/linux/avr32/bits/kernel_stat.h 2009-11-30 12:24:21.534924417 -0500 @@ -21,18 +21,13 @@ struct kernel_stat { unsigned long st_size; unsigned long st_blksize; unsigned long st_blocks; - unsigned long st_atime; - unsigned long st_atime_nsec; - unsigned long st_mtime; - unsigned long st_mtime_nsec; - unsigned long st_ctime; - unsigned long st_ctime_nsec; + struct timespec st_atim; + struct timespec st_mtim; + struct timespec st_ctim; unsigned long __unused4; unsigned long __unused5; }; -#define STAT_HAVE_NSEC 1 - struct kernel_stat64 { unsigned long long st_dev; @@ -51,14 +46,9 @@ struct kernel_stat64 { unsigned long long st_blocks; - unsigned long st_atime; - unsigned long st_atime_nsec; - - unsigned long st_mtime; - unsigned long st_mtime_nsec; - - unsigned long st_ctime; - unsigned long st_ctime_nsec; + struct timespec st_atim; + struct timespec st_mtim; + struct timespec st_ctim; unsigned long __unused1; unsigned long __unused2; diff -p -up uClibc-0.9.30.1/libc/sysdeps/linux/bfin/bits/kernel_stat.h.ns_stat~ uClibc-0.9.30.1/libc/sysdeps/linux/bfin/bits/kernel_stat.h --- uClibc-0.9.30.1/libc/sysdeps/linux/bfin/bits/kernel_stat.h.ns_stat~ 2009-11-30 12:24:11.921965428 -0500 +++ uClibc-0.9.30.1/libc/sysdeps/linux/bfin/bits/kernel_stat.h 2009-11-30 12:24:21.534924417 -0500 @@ -22,12 +22,9 @@ struct kernel_stat { unsigned long st_size; unsigned long st_blksize; unsigned long st_blocks; - unsigned long st_atime; - unsigned long __unused1; - unsigned long st_mtime; - unsigned long __unused2; - unsigned long st_ctime; - unsigned long __unused3; + struct timespec st_atim; + struct timespec st_mtim; + struct timespec st_ctim; unsigned long __unused4; unsigned long __unused5; }; @@ -47,12 +44,9 @@ struct kernel_stat64 { unsigned long st_blksize; unsigned long st_blocks; /* Number 512-byte blocks allocated. */ unsigned long __pad4; /* future possible st_blocks high bits */ - unsigned long st_atime; - unsigned long __pad5; - unsigned long st_mtime; - unsigned long __pad6; - unsigned long st_ctime; - unsigned long __pad7; /* will be high 32 bits of ctime someday */ + struct timespec st_atim; + struct timespec st_mtim; + struct timespec st_ctim; unsigned long long st_ino; }; diff -p -up uClibc-0.9.30.1/libc/sysdeps/linux/common/bits/stat.h.ns_stat~ uClibc-0.9.30.1/libc/sysdeps/linux/common/bits/stat.h --- uClibc-0.9.30.1/libc/sysdeps/linux/common/bits/stat.h.ns_stat~ 2009-11-30 12:24:11.921965428 -0500 +++ uClibc-0.9.30.1/libc/sysdeps/linux/common/bits/stat.h 2009-11-30 12:24:21.534924417 -0500 @@ -62,7 +62,7 @@ struct stat #else __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */ #endif -#if 0 /*def __USE_MISC*/ +#ifdef __USE_MISC /* Nanosecond resolution timestamps are stored in a format equivalent to 'struct timespec'. This is the type used whenever possible but the Unix namespace rules do not allow the @@ -108,7 +108,7 @@ struct stat64 __blksize_t st_blksize; /* Optimal block size for I/O. */ __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */ -#if 0 /*def __USE_MISC*/ +#ifdef __USE_MISC /* Nanosecond resolution timestamps are stored in a format equivalent to 'struct timespec'. This is the type used whenever possible but the Unix namespace rules do not allow the diff -p -up uClibc-0.9.30.1/libc/sysdeps/linux/common/xstatconv.c.ns_stat~ uClibc-0.9.30.1/libc/sysdeps/linux/common/xstatconv.c --- uClibc-0.9.30.1/libc/sysdeps/linux/common/xstatconv.c.ns_stat~ 2009-11-30 12:24:11.921965428 -0500 +++ uClibc-0.9.30.1/libc/sysdeps/linux/common/xstatconv.c 2009-11-30 12:24:21.534924417 -0500 @@ -41,14 +41,9 @@ void attribute_hidden __xstat_conv(struc buf->st_size = kbuf->st_size; buf->st_blksize = kbuf->st_blksize; buf->st_blocks = kbuf->st_blocks; - buf->st_atime = kbuf->st_atime; - buf->st_mtime = kbuf->st_mtime; - buf->st_ctime = kbuf->st_ctime; -#ifdef STAT_HAVE_NSEC - buf->st_atimensec = kbuf->st_atime_nsec; - buf->st_mtimensec = kbuf->st_mtime_nsec; - buf->st_ctimensec = kbuf->st_ctime_nsec; -#endif + buf->st_atim = kbuf->st_atim; + buf->st_mtim = kbuf->st_mtim; + buf->st_ctim = kbuf->st_ctim; } #ifdef __UCLIBC_HAS_LFS__ @@ -70,14 +65,9 @@ void attribute_hidden __xstat64_conv(str buf->st_size = kbuf->st_size; buf->st_blksize = kbuf->st_blksize; buf->st_blocks = kbuf->st_blocks; - buf->st_atime = kbuf->st_atime; - buf->st_mtime = kbuf->st_mtime; - buf->st_ctime = kbuf->st_ctime; -# ifdef STAT_HAVE_NSEC - buf->st_atimensec = kbuf->st_atime_nsec; - buf->st_mtimensec = kbuf->st_mtime_nsec; - buf->st_ctimensec = kbuf->st_ctime_nsec; -# endif + buf->st_atim = kbuf->st_atim; + buf->st_mtim = kbuf->st_mtim; + buf->st_ctim = kbuf->st_ctim; } #endif /* __UCLIBC_HAS_LFS__ */ diff -p -up uClibc-0.9.30.1/libc/sysdeps/linux/cris/bits/kernel_stat.h.ns_stat~ uClibc-0.9.30.1/libc/sysdeps/linux/cris/bits/kernel_stat.h --- uClibc-0.9.30.1/libc/sysdeps/linux/cris/bits/kernel_stat.h.ns_stat~ 2009-11-30 12:24:11.923058584 -0500 +++ uClibc-0.9.30.1/libc/sysdeps/linux/cris/bits/kernel_stat.h 2009-11-30 12:24:21.535925174 -0500 @@ -7,20 +7,6 @@ #error bits/kernel_stat.h is for internal uClibc use only! #endif -struct __old_kernel_stat { - unsigned short st_dev; - unsigned short st_ino; - unsigned short st_mode; - unsigned short st_nlink; - unsigned short st_uid; - unsigned short st_gid; - unsigned short st_rdev; - unsigned long st_size; - unsigned long st_atime; - unsigned long st_mtime; - unsigned long st_ctime; -}; - struct kernel_stat { unsigned short st_dev; unsigned short __pad1; @@ -34,12 +20,9 @@ struct kernel_stat { unsigned long st_size; unsigned long st_blksize; unsigned long st_blocks; - unsigned long st_atime; - unsigned long __unused1; - unsigned long st_mtime; - unsigned long __unused2; - unsigned long st_ctime; - unsigned long __unused3; + struct timespec st_atim; + struct timespec st_mtim; + struct timespec st_ctim; unsigned long __unused4; unsigned long __unused5; }; @@ -69,14 +52,9 @@ struct kernel_stat64 { unsigned long st_blocks; /* Number 512-byte blocks allocated. */ unsigned long __pad4; /* future possible st_blocks high bits */ - unsigned long st_atime; - unsigned long __pad5; - - unsigned long st_mtime; - unsigned long __pad6; - - unsigned long st_ctime; - unsigned long __pad7; /* will be high 32 bits of ctime someday */ + struct timespec st_atim; + struct timespec st_mtim; + struct timespec st_ctim; unsigned long long st_ino; }; diff -p -up uClibc-0.9.30.1/libc/sysdeps/linux/e1/bits/kernel_stat.h.ns_stat~ uClibc-0.9.30.1/libc/sysdeps/linux/e1/bits/kernel_stat.h --- uClibc-0.9.30.1/libc/sysdeps/linux/e1/bits/kernel_stat.h.ns_stat~ 2009-11-30 12:24:11.923058584 -0500 +++ uClibc-0.9.30.1/libc/sysdeps/linux/e1/bits/kernel_stat.h 2009-11-30 12:24:21.535925174 -0500 @@ -22,12 +22,9 @@ struct kernel_stat { unsigned long st_size; unsigned long st_blksize; unsigned long st_blocks; - unsigned long st_atime; - unsigned long __unused1; - unsigned long st_mtime; - unsigned long __unused2; - unsigned long st_ctime; - unsigned long __unused3; + struct timespec st_atim; + struct timespec st_mtim; + struct timespec st_ctim; unsigned long __unused4; unsigned long __unused5; }; @@ -47,12 +44,9 @@ struct kernel_stat64 { unsigned long st_blksize; unsigned long st_blocks; /* Number 512-byte blocks allocated. */ unsigned long __pad4; /* future possible st_blocks high bits */ - unsigned long st_atime; - unsigned long __pad5; - unsigned long st_mtime; - unsigned long __pad6; - unsigned long st_ctime; - unsigned long __pad7; /* will be high 32 bits of ctime someday */ + struct timespec st_atim; + struct timespec st_mtim; + struct timespec st_ctim; unsigned long long st_ino; }; diff -p -up uClibc-0.9.30.1/libc/sysdeps/linux/frv/bits/kernel_stat.h.ns_stat~ uClibc-0.9.30.1/libc/sysdeps/linux/frv/bits/kernel_stat.h --- uClibc-0.9.30.1/libc/sysdeps/linux/frv/bits/kernel_stat.h.ns_stat~ 2009-11-30 12:24:11.923058584 -0500 +++ uClibc-0.9.30.1/libc/sysdeps/linux/frv/bits/kernel_stat.h 2009-11-30 12:24:21.535925174 -0500 @@ -38,14 +38,9 @@ struct kernel_stat { unsigned long __pad10; /* future possible st_blocks high bits */ unsigned long st_blocks; /* Number 512-byte blocks allocated. */ - unsigned long __unused1; - unsigned long st_atime; - - unsigned long __unused2; - unsigned long st_mtime; - - unsigned long __unused3; - unsigned long st_ctime; + struct timespec st_atim; + struct timespec st_mtim; + struct timespec st_ctim; unsigned long long __unused4; }; @@ -73,14 +68,9 @@ struct kernel_stat64 { unsigned long __pad4; /* future possible st_blocks high bits */ unsigned long st_blocks; /* Number 512-byte blocks allocated. */ - unsigned long __unused1; - unsigned long st_atime; - - unsigned long __unused2; - unsigned long st_mtime; - - unsigned long __unused3; /* will be high 32 bits of ctime someday */ - unsigned long st_ctime; + struct timespec st_atim; + struct timespec st_mtim; + struct timespec st_ctim; unsigned long long __unused4; }; diff -p -up uClibc-0.9.30.1/libc/sysdeps/linux/h8300/bits/kernel_stat.h.ns_stat~ uClibc-0.9.30.1/libc/sysdeps/linux/h8300/bits/kernel_stat.h --- uClibc-0.9.30.1/libc/sysdeps/linux/h8300/bits/kernel_stat.h.ns_stat~ 2009-11-30 12:24:11.923058584 -0500 +++ uClibc-0.9.30.1/libc/sysdeps/linux/h8300/bits/kernel_stat.h 2009-11-30 12:24:21.535925174 -0500 @@ -22,12 +22,9 @@ struct kernel_stat { unsigned long st_size; unsigned long st_blksize; unsigned long st_blocks; - unsigned long st_atime; - unsigned long __unused1; - unsigned long st_mtime; - unsigned long __unused2; - unsigned long st_ctime; - unsigned long __unused3; + struct timespec st_atim; + struct timespec st_mtim; + struct timespec st_ctim; unsigned long __unused4; unsigned long __unused5; }; @@ -48,12 +45,9 @@ struct kernel_stat64 { unsigned long st_blksize; unsigned long st_blocks; /* Number 512-byte blocks allocated. */ unsigned long __pad4; /* future possible st_blocks high bits */ - unsigned long st_atime; - unsigned long __pad5; - unsigned long st_mtime; - unsigned long __pad6; - unsigned long st_ctime; - unsigned long __pad7; /* will be high 32 bits of ctime someday */ + struct timespec st_atim; + struct timespec st_mtim; + struct timespec st_ctim; unsigned long long st_ino; }; diff -p -up uClibc-0.9.30.1/libc/sysdeps/linux/hppa/bits/kernel_stat.h.ns_stat~ uClibc-0.9.30.1/libc/sysdeps/linux/hppa/bits/kernel_stat.h --- uClibc-0.9.30.1/libc/sysdeps/linux/hppa/bits/kernel_stat.h.ns_stat~ 2009-11-30 12:24:11.924048585 -0500 +++ uClibc-0.9.30.1/libc/sysdeps/linux/hppa/bits/kernel_stat.h 2009-11-30 12:24:21.535925174 -0500 @@ -17,12 +17,9 @@ struct kernel_stat { unsigned short st_reserved2; /* old st_gid */ unsigned int st_rdev; off_t st_size; - time_t st_atime; - unsigned int st_atime_nsec; - time_t st_mtime; - unsigned int st_mtime_nsec; - time_t st_ctime; - unsigned int st_ctime_nsec; + struct timespec st_atim; + struct timespec st_mtim; + struct timespec st_ctim; int st_blksize; int st_blocks; unsigned int __unused1; /* ACL stuff */ @@ -39,8 +36,6 @@ struct kernel_stat { unsigned int st_spare4[3]; }; -#define STAT_HAVE_NSEC 1 - /* This is the struct that 32-bit userspace applications are expecting. * How 64-bit apps are going to be compiled, I have no idea. But at least * this way, we don't have a wrapper in the kernel. @@ -60,12 +55,9 @@ struct kernel_stat64 { signed int st_blksize; signed long long st_blocks; - signed int st_atime; - unsigned int st_atime_nsec; - signed int st_mtime; - unsigned int st_mtime_nsec; - signed int st_ctime; - unsigned int st_ctime_nsec; + struct timespec st_atim; + struct timespec st_mtim; + struct timespec st_ctim; unsigned long long st_ino; }; diff -p -up uClibc-0.9.30.1/libc/sysdeps/linux/i386/bits/kernel_stat.h.ns_stat~ uClibc-0.9.30.1/libc/sysdeps/linux/i386/bits/kernel_stat.h --- uClibc-0.9.30.1/libc/sysdeps/linux/i386/bits/kernel_stat.h.ns_stat~ 2009-11-30 12:24:11.924048585 -0500 +++ uClibc-0.9.30.1/libc/sysdeps/linux/i386/bits/kernel_stat.h 2009-11-30 12:24:21.536923975 -0500 @@ -22,12 +22,9 @@ struct kernel_stat { unsigned long st_size; unsigned long st_blksize; unsigned long st_blocks; - unsigned long st_atime; - unsigned long __unused1; - unsigned long st_mtime; - unsigned long __unused2; - unsigned long st_ctime; - unsigned long __unused3; + struct timespec st_atim; + struct timespec st_mtim; + struct timespec st_ctim; unsigned long __unused4; unsigned long __unused5; }; @@ -47,12 +44,9 @@ struct kernel_stat64 { unsigned long st_blksize; unsigned long st_blocks; /* Number 512-byte blocks allocated. */ unsigned long __pad4; /* future possible st_blocks high bits */ - unsigned long st_atime; - unsigned long __pad5; - unsigned long st_mtime; - unsigned long __pad6; - unsigned long st_ctime; - unsigned long __pad7; /* will be high 32 bits of ctime someday */ + struct timespec st_atim; + struct timespec st_mtim; + struct timespec st_ctim; unsigned long long st_ino; }; diff -p -up uClibc-0.9.30.1/libc/sysdeps/linux/ia64/bits/kernel_stat.h.ns_stat~ uClibc-0.9.30.1/libc/sysdeps/linux/ia64/bits/kernel_stat.h --- uClibc-0.9.30.1/libc/sysdeps/linux/ia64/bits/kernel_stat.h.ns_stat~ 2009-11-30 12:24:11.924048585 -0500 +++ uClibc-0.9.30.1/libc/sysdeps/linux/ia64/bits/kernel_stat.h 2009-11-30 12:24:21.536923975 -0500 @@ -23,38 +23,14 @@ struct kernel_stat { unsigned int __pad0; unsigned long st_rdev; unsigned long st_size; - unsigned long st_atime; - unsigned long st_atime_nsec; - unsigned long st_mtime; - unsigned long st_mtime_nsec; - unsigned long st_ctime; - unsigned long st_ctime_nsec; + struct timespec st_atim; + struct timespec st_mtim; + struct timespec st_ctim; unsigned long st_blksize; long st_blocks; unsigned long __unused[3]; }; -#define STAT_HAVE_NSEC 1 - -struct __old_kernel_stat { - unsigned int st_dev; - unsigned int st_ino; - unsigned int st_mode; - unsigned int st_nlink; - unsigned int st_uid; - unsigned int st_gid; - unsigned int st_rdev; - unsigned int __pad1; - unsigned long st_size; - unsigned long st_atime; - unsigned long st_mtime; - unsigned long st_ctime; - unsigned int st_blksize; - int st_blocks; - unsigned int __unused1; - unsigned int __unused2; -}; - /* ia64 stat64 is same as stat */ #define kernel_stat64 kernel_stat diff -p -up uClibc-0.9.30.1/libc/sysdeps/linux/ia64/bits/stat.h.ns_stat~ uClibc-0.9.30.1/libc/sysdeps/linux/ia64/bits/stat.h --- uClibc-0.9.30.1/libc/sysdeps/linux/ia64/bits/stat.h.ns_stat~ 2009-11-30 12:24:11.924048585 -0500 +++ uClibc-0.9.30.1/libc/sysdeps/linux/ia64/bits/stat.h 2009-11-30 12:24:21.536923975 -0500 @@ -39,7 +39,7 @@ struct stat int pad0; __dev_t st_rdev; /* Device number, if device. */ __off_t st_size; /* Size of file, in bytes. */ -#if 0 /*def __USE_MISC*/ +#ifdef __USE_MISC /* Nanosecond resolution timestamps are stored in a format equivalent to 'struct timespec'. This is the type used whenever possible but the Unix namespace rules do not allow the @@ -78,7 +78,7 @@ struct stat64 int pad0; __dev_t st_rdev; /* Device number, if device. */ __off_t st_size; /* Size of file, in bytes. */ -#if 0 /*def __USE_MISC*/ +#ifdef __USE_MISC /* Nanosecond resolution timestamps are stored in a format equivalent to 'struct timespec'. This is the type used whenever possible but the Unix namespace rules do not allow the diff -p -up uClibc-0.9.30.1/libc/sysdeps/linux/m68k/bits/kernel_stat.h.ns_stat~ uClibc-0.9.30.1/libc/sysdeps/linux/m68k/bits/kernel_stat.h --- uClibc-0.9.30.1/libc/sysdeps/linux/m68k/bits/kernel_stat.h.ns_stat~ 2009-11-30 12:24:11.925048364 -0500 +++ uClibc-0.9.30.1/libc/sysdeps/linux/m68k/bits/kernel_stat.h 2009-11-30 12:24:21.536923975 -0500 @@ -22,12 +22,9 @@ struct kernel_stat { unsigned long st_size; unsigned long st_blksize; unsigned long st_blocks; - unsigned long st_atime; - unsigned long __unused1; - unsigned long st_mtime; - unsigned long __unused2; - unsigned long st_ctime; - unsigned long __unused3; + struct timespec st_atim; + struct timespec st_mtim; + struct timespec st_ctim; unsigned long __unused4; unsigned long __unused5; }; @@ -49,12 +46,9 @@ struct kernel_stat64 { unsigned long st_blksize; unsigned long __pad4; /* future possible st_blocks high bits */ unsigned long st_blocks; /* Number 512-byte blocks allocated. */ - unsigned long st_atime; - unsigned long __pad5; - unsigned long st_mtime; - unsigned long __pad6; - unsigned long st_ctime; - unsigned long __pad7; /* will be high 32 bits of ctime someday */ + struct timespec st_atim; + struct timespec st_mtim; + struct timespec st_ctim; unsigned long long st_ino; }; diff -p -up uClibc-0.9.30.1/libc/sysdeps/linux/m68k/bits/stat.h.ns_stat~ uClibc-0.9.30.1/libc/sysdeps/linux/m68k/bits/stat.h --- uClibc-0.9.30.1/libc/sysdeps/linux/m68k/bits/stat.h.ns_stat~ 2009-11-30 12:24:11.925048364 -0500 +++ uClibc-0.9.30.1/libc/sysdeps/linux/m68k/bits/stat.h 2009-11-30 12:24:21.536923975 -0500 @@ -61,7 +61,7 @@ struct stat #else __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */ #endif -#if 0 /*def __USE_MISC*/ +#ifdef __USE_MISC /* Nanosecond resolution timestamps are stored in a format equivalent to 'struct timespec'. This is the type used whenever possible but the Unix namespace rules do not allow the @@ -107,7 +107,7 @@ struct stat64 __blksize_t st_blksize; /* Optimal block size for I/O. */ __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */ -#if 0 /*def __USE_MISC*/ +#ifdef __USE_MISC /* Nanosecond resolution timestamps are stored in a format equivalent to 'struct timespec'. This is the type used whenever possible but the Unix namespace rules do not allow the diff -p -up uClibc-0.9.30.1/libc/sysdeps/linux/microblaze/bits/kernel_stat.h.ns_stat~ uClibc-0.9.30.1/libc/sysdeps/linux/microblaze/bits/kernel_stat.h --- uClibc-0.9.30.1/libc/sysdeps/linux/microblaze/bits/kernel_stat.h.ns_stat~ 2009-11-30 12:24:11.925048364 -0500 +++ uClibc-0.9.30.1/libc/sysdeps/linux/microblaze/bits/kernel_stat.h 2009-11-30 12:24:21.536923975 -0500 @@ -19,12 +19,9 @@ struct kernel_stat __kernel_off_t st_size; unsigned long st_blksize; unsigned long st_blocks; - unsigned long st_atime; - unsigned long __unused1; - unsigned long st_mtime; - unsigned long __unused2; - unsigned long st_ctime; - unsigned long __unused3; + struct timespec st_atim; + struct timespec st_mtim; + struct timespec st_ctim; unsigned long __unused4; unsigned long __unused5; }; @@ -53,14 +50,9 @@ struct kernel_stat64 unsigned long __unused4; /* future possible st_blocks high bits */ unsigned long st_blocks; /* Number 512-byte blocks allocated. */ - unsigned long st_atime; - unsigned long __unused5; - - unsigned long st_mtime; - unsigned long __unused6; - - unsigned long st_ctime; - unsigned long __unused7; /* high 32 bits of ctime someday */ + struct timespec st_atim; + struct timespec st_mtim; + struct timespec st_ctim; }; #endif /* _BITS_STAT_STRUCT_H */ diff -p -up uClibc-0.9.30.1/libc/sysdeps/linux/mips/bits/kernel_stat.h.ns_stat~ uClibc-0.9.30.1/libc/sysdeps/linux/mips/bits/kernel_stat.h --- uClibc-0.9.30.1/libc/sysdeps/linux/mips/bits/kernel_stat.h.ns_stat~ 2009-11-30 12:24:11.925048364 -0500 +++ uClibc-0.9.30.1/libc/sysdeps/linux/mips/bits/kernel_stat.h 2009-11-30 12:24:21.537924243 -0500 @@ -24,12 +24,9 @@ struct kernel_stat { __kernel_dev_t st_rdev; unsigned int st_pad2[3]; __kernel_off_t st_size; - unsigned int st_atime; - unsigned int st_atime_nsec; - unsigned int st_mtime; - unsigned int st_mtime_nsec; - unsigned int st_ctime; - unsigned int st_ctime_nsec; + struct timespec st_atim; + struct timespec st_mtim; + struct timespec st_ctim; unsigned int st_blksize; unsigned int reserved3; unsigned long st_blocks; @@ -48,12 +45,9 @@ struct kernel_stat { unsigned int st_rdev; unsigned int st_pad2[3]; unsigned long long st_size; - unsigned int st_atime; - unsigned int st_atime_nsec; - unsigned int st_mtime; - unsigned int st_mtime_nsec; - unsigned int st_ctime; - unsigned int st_ctime_nsec; + struct timespec st_atim; + struct timespec st_mtim; + struct timespec st_ctim; unsigned int st_blksize; unsigned int reserved3; unsigned long long st_blocks; @@ -72,12 +66,9 @@ struct kernel_stat { long st_pad2[2]; __kernel_off_t st_size; long st_pad3; - time_t st_atime; - long st_atime_nsec; - time_t st_mtime; - long st_mtime_nsec; - time_t st_ctime; - long st_ctime_nsec; + struct timespec st_atim; + struct timespec st_mtim; + struct timespec st_ctim; long st_blksize; long st_blocks; long st_pad4[14]; @@ -94,19 +85,14 @@ struct kernel_stat64 { unsigned long st_rdev; unsigned long st_pad1[3]; /* Reserved for st_rdev expansion */ long long st_size; - time_t st_atime; - unsigned long st_atime_nsec; - time_t st_mtime; - unsigned long st_mtime_nsec; - time_t st_ctime; - unsigned long st_ctime_nsec; + struct timespec st_atim; + struct timespec st_mtim; + struct timespec st_ctim; unsigned long st_blksize; unsigned long st_pad2; long long st_blocks; }; #endif /* O32 */ -#define STAT_HAVE_NSEC 1 - #endif /* _BITS_STAT_STRUCT_H */ diff -p -up uClibc-0.9.30.1/libc/sysdeps/linux/mips/bits/stat.h.ns_stat~ uClibc-0.9.30.1/libc/sysdeps/linux/mips/bits/stat.h --- uClibc-0.9.30.1/libc/sysdeps/linux/mips/bits/stat.h.ns_stat~ 2009-11-30 12:24:11.926054988 -0500 +++ uClibc-0.9.30.1/libc/sysdeps/linux/mips/bits/stat.h 2009-11-30 12:24:21.537924243 -0500 @@ -61,16 +61,27 @@ struct stat long int st_pad2[2]; __off64_t st_size; /* Size of file, in bytes. */ #endif - /* - * Actually this should be timestruc_t st_atime, st_mtime and - * st_ctime but we don't have it under Linux. - */ +#ifdef __USE_MISC + /* Nanosecond resolution timestamps are stored in a format + equivalent to 'struct timespec'. This is the type used + whenever possible but the Unix namespace rules do not allow the + identifier 'timespec' to appear in the <sys/stat.h> header. + Therefore we have to handle the use of this header in strictly + standard-compliant sources special. */ + struct timespec st_atim; /* Time of last access. */ + struct timespec st_mtim; /* Time of last modification. */ + struct timespec st_ctim; /* Time of last status change. */ +# define st_atime st_atim.tv_sec /* Backward compatibility. */ +# define st_mtime st_mtim.tv_sec +# define st_ctime st_ctim.tv_sec +#else __time_t st_atime; /* Time of last access. */ unsigned long int st_atimensec; /* Nscecs of last access. */ __time_t st_mtime; /* Time of last modification. */ unsigned long int st_mtimensec; /* Nsecs of last modification. */ __time_t st_ctime; /* Time of last status change. */ unsigned long int st_ctimensec; /* Nsecs of last status change. */ +#endif __blksize_t st_blksize; /* Optimal block size for I/O. */ #ifndef __USE_FILE_OFFSET64 __blkcnt_t st_blocks; /* Number of 512-byte blocks allocated. */ @@ -93,16 +104,27 @@ struct stat { unsigned int st_rdev; /* Device number, if device. */ int st_pad2[3]; __off_t st_size; /* Size of file, in bytes. */ - /* - * Actually this should be timestruc_t st_atime, st_mtime and - * st_ctime but we don't have it under Linux. - */ +#ifdef __USE_MISC + /* Nanosecond resolution timestamps are stored in a format + equivalent to 'struct timespec'. This is the type used + whenever possible but the Unix namespace rules do not allow the + identifier 'timespec' to appear in the <sys/stat.h> header. + Therefore we have to handle the use of this header in strictly + standard-compliant sources special. */ + struct timespec st_atim; /* Time of last access. */ + struct timespec st_mtim; /* Time of last modification. */ + struct timespec st_ctim; /* Time of last status change. */ +# define st_atime st_atim.tv_sec /* Backward compatibility. */ +# define st_mtime st_mtim.tv_sec +# define st_ctime st_ctim.tv_sec +#else int st_atime; int st_atimensec; int st_mtime; int st_mtimensec; int st_ctime; int st_ctimensec; +#endif int st_blksize; /* Optimal block size for I/O. */ int st_pad3; __blkcnt_t st_blocks; /* Number of 512-byte blocks allocated. */ @@ -124,16 +146,27 @@ struct stat64 __dev_t st_rdev; /* Device number, if device. */ long int st_pad2[2]; __off64_t st_size; /* Size of file, in bytes. */ - /* - * Actually this should be timestruc_t st_atime, st_mtime and - * st_ctime but we don't have it under Linux. - */ +#ifdef __USE_MISC + /* Nanosecond resolution timestamps are stored in a format + equivalent to 'struct timespec'. This is the type used + whenever possible but the Unix namespace rules do not allow the + identifier 'timespec' to appear in the <sys/stat.h> header. + Therefore we have to handle the use of this header in strictly + standard-compliant sources special. */ + struct timespec st_atim; /* Time of last access. */ + struct timespec st_mtim; /* Time of last modification. */ + struct timespec st_ctim; /* Time of last status change. */ +# define st_atime st_atim.tv_sec /* Backward compatibility. */ +# define st_mtime st_mtim.tv_sec +# define st_ctime st_ctim.tv_sec +#else __time_t st_atime; /* Time of last access. */ unsigned long int st_atimensec; /* Nscecs of last access. */ __time_t st_mtime; /* Time of last modification. */ unsigned long int st_mtimensec; /* Nsecs of last modification. */ __time_t st_ctime; /* Time of last status change. */ unsigned long int st_ctimensec; /* Nsecs of last status change. */ +#endif __blksize_t st_blksize; /* Optimal block size for I/O. */ long int st_pad3; __blkcnt64_t st_blocks; /* Number of 512-byte blocks allocated. */ @@ -152,16 +185,27 @@ struct stat64 { unsigned int st_rdev; /* Device number, if device. */ int st_pad2[3]; __off_t st_size; /* Size of file, in bytes. */ - /* - * Actually this should be timestruc_t st_atime, st_mtime and - * st_ctime but we don't have it under Linux. - */ +#ifdef __USE_MISC + /* Nanosecond resolution timestamps are stored in a format + equivalent to 'struct timespec'. This is the type used + whenever possible but the Unix namespace rules do not allow the + identifier 'timespec' to appear in the <sys/stat.h> header. + Therefore we have to handle the use of this header in strictly + standard-compliant sources special. */ + struct timespec st_atim; /* Time of last access. */ + struct timespec st_mtim; /* Time of last modification. */ + struct timespec st_ctim; /* Time of last status change. */ +# define st_atime st_atim.tv_sec /* Backward compatibility. */ +# define st_mtime st_mtim.tv_sec +# define st_ctime st_ctim.tv_sec +#else int st_atime; int st_atimensec; int st_mtime; int st_mtimensec; int st_ctime; int st_ctimensec; +#endif int st_blksize; /* Optimal block size for I/O. */ int st_pad3; __blkcnt_t st_blocks; /* Number of 512-byte blocks allocated. */ @@ -173,6 +217,8 @@ struct stat64 { /* Tell code we have these members. */ #define _STATBUF_ST_BLKSIZE #define _STATBUF_ST_RDEV +/* Nanosecond resolution time values are supported. */ +#define _STATBUF_ST_NSEC /* Encoding of the file mode. */ diff -p -up uClibc-0.9.30.1/libc/sysdeps/linux/nios/bits/stat.h.ns_stat~ uClibc-0.9.30.1/libc/sysdeps/linux/nios/bits/stat.h --- uClibc-0.9.30.1/libc/sysdeps/linux/nios/bits/stat.h.ns_stat~ 2009-11-30 12:24:11.926054988 -0500 +++ uClibc-0.9.30.1/libc/sysdeps/linux/nios/bits/stat.h 2009-11-30 12:24:21.537924243 -0500 @@ -60,12 +60,27 @@ struct stat #else __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */ #endif +#ifdef __USE_MISC + /* Nanosecond resolution timestamps are stored in a format + equivalent to 'struct timespec'. This is the type used + whenever possible but the Unix namespace rules do not allow the + identifier 'timespec' to appear in the <sys/stat.h> header. + Therefore we have to handle the use of this header in strictly + standard-compliant sources special. */ + struct timespec st_atim; /* Time of last access. */ + struct timespec st_mtim; /* Time of last modification. */ + struct timespec st_ctim; /* Time of last status change. */ +# define st_atime st_atim.tv_sec /* Backward compatibility. */ +# define st_mtime st_mtim.tv_sec +# define st_ctime st_ctim.tv_sec +#else __time_t st_atime; /* Time of last access. */ - unsigned long int __unused1; + unsigned long int st_atimensec; /* Nscecs of last access. */ __time_t st_mtime; /* Time of last modification. */ - unsigned long int __unused2; + unsigned long int st_mtimensec; /* Nsecs of last modification. */ __time_t st_ctime; /* Time of last status change. */ - unsigned long int __unused3; + unsigned long int st_ctimensec; /* Nsecs of last status change. */ +#endif #ifndef __USE_FILE_OFFSET64 unsigned long int __unused4; unsigned long int __unused5; @@ -91,12 +106,24 @@ struct stat64 __blksize_t st_blksize; /* Optimal block size for I/O. */ __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */ +#ifdef __USE_MISC + /* Nanosecond resolution timestamps are stored in a format + equivalent to 'struct timespec'. This is the type used + whenever possible but the Unix namespace rules do not allow the + identifier 'timespec' to appear in the <sys/stat.h> header. + Therefore we have to handle the use of this header in strictly + standard-compliant sources special. */ + struct timespec st_atim; /* Time of last access. */ + struct timespec st_mtim; /* Time of last modification. */ + struct timespec st_ctim; /* Time of last status change. */ +#else __time_t st_atime; /* Time of last access. */ - unsigned long int __unused1; + unsigned long int st_atimensec; /* Nscecs of last access. */ __time_t st_mtime; /* Time of last modification. */ - unsigned long int __unused2; + unsigned long int st_mtimensec; /* Nsecs of last modification. */ __time_t st_ctime; /* Time of last status change. */ - unsigned long int __unused3; + unsigned long int st_ctimensec; /* Nsecs of last status change. */ +#endif __ino64_t st_ino; /* File serial number. */ }; #endif @@ -104,6 +131,8 @@ struct stat64 /* Tell code we have these members. */ #define _STATBUF_ST_BLKSIZE #define _STATBUF_ST_RDEV +/* Nanosecond resolution time values are supported. */ +#define _STATBUF_ST_NSEC /* Encoding of the file mode. */ diff -p -up uClibc-0.9.30.1/libc/sysdeps/linux/nios2/bits/kernel_stat.h.ns_stat~ uClibc-0.9.30.1/libc/sysdeps/linux/nios2/bits/kernel_stat.h --- uClibc-0.9.30.1/libc/sysdeps/linux/nios2/bits/kernel_stat.h.ns_stat~ 2009-11-30 12:24:11.926054988 -0500 +++ uClibc-0.9.30.1/libc/sysdeps/linux/nios2/bits/kernel_stat.h 2009-11-30 12:24:21.537924243 -0500 @@ -22,12 +22,9 @@ struct kernel_stat { unsigned long st_size; unsigned long st_blksize; unsigned long st_blocks; - unsigned long st_atime; - unsigned long __unused1; - unsigned long st_mtime; - unsigned long __unused2; - unsigned long st_ctime; - unsigned long __unused3; + struct timespec st_atim; + struct timespec st_mtim; + struct timespec st_ctim; unsigned long __unused4; unsigned long __unused5; }; @@ -47,12 +44,9 @@ struct kernel_stat64 { unsigned long st_blksize; unsigned long st_blocks; /* Number 512-byte blocks allocated. */ unsigned long __pad4; /* future possible st_blocks high bits */ - unsigned long st_atime; - unsigned long __pad5; - unsigned long st_mtime; - unsigned long __pad6; - unsigned long st_ctime; - unsigned long __pad7; /* will be high 32 bits of ctime someday */ + struct timespec st_atim; + struct timespec st_mtim; + struct timespec st_ctim; unsigned long long st_ino; }; diff -p -up uClibc-0.9.30.1/libc/sysdeps/linux/nios2/bits/stat.h.ns_stat~ uClibc-0.9.30.1/libc/sysdeps/linux/nios2/bits/stat.h --- uClibc-0.9.30.1/libc/sysdeps/linux/nios2/bits/stat.h.ns_stat~ 2009-11-30 12:24:11.926054988 -0500 +++ uClibc-0.9.30.1/libc/sysdeps/linux/nios2/bits/stat.h 2009-11-30 12:24:21.538924022 -0500 @@ -60,12 +60,27 @@ struct stat #else __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */ #endif +#ifdef __USE_MISC + /* Nanosecond resolution timestamps are stored in a format + equivalent to 'struct timespec'. This is the type used + whenever possible but the Unix namespace rules do not allow the + identifier 'timespec' to appear in the <sys/stat.h> header. + Therefore we have to handle the use of this header in strictly + standard-compliant sources special. */ + struct timespec st_atim; /* Time of last access. */ + struct timespec st_mtim; /* Time of last modification. */ + struct timespec st_ctim; /* Time of last status change. */ +# define st_atime st_atim.tv_sec /* Backward compatibility. */ +# define st_mtime st_mtim.tv_sec +# define st_ctime st_ctim.tv_sec +#else __time_t st_atime; /* Time of last access. */ - unsigned long int __unused1; + unsigned long int st_atimensec; /* Nscecs of last access. */ __time_t st_mtime; /* Time of last modification. */ - unsigned long int __unused2; + unsigned long int st_mtimensec; /* Nsecs of last modification. */ __time_t st_ctime; /* Time of last status change. */ - unsigned long int __unused3; + unsigned long int st_ctimensec; /* Nsecs of last status change. */ +#endif #ifndef __USE_FILE_OFFSET64 unsigned long int __unused4; unsigned long int __unused5; @@ -91,12 +106,24 @@ struct stat64 __blksize_t st_blksize; /* Optimal block size for I/O. */ __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */ +#ifdef __USE_MISC + /* Nanosecond resolution timestamps are stored in a format + equivalent to 'struct timespec'. This is the type used + whenever possible but the Unix namespace rules do not allow the + identifier 'timespec' to appear in the <sys/stat.h> header. + Therefore we have to handle the use of this header in strictly + standard-compliant sources special. */ + struct timespec st_atim; /* Time of last access. */ + struct timespec st_mtim; /* Time of last modification. */ + struct timespec st_ctim; /* Time of last status change. */ +#else __time_t st_atime; /* Time of last access. */ - unsigned long int __unused1; + unsigned long int st_atimensec; /* Nscecs of last access. */ __time_t st_mtime; /* Time of last modification. */ - unsigned long int __unused2; + unsigned long int st_mtimensec; /* Nsecs of last modification. */ __time_t st_ctime; /* Time of last status change. */ - unsigned long int __unused3; + unsigned long int st_ctimensec; /* Nsecs of last status change. */ +#endif __ino64_t st_ino; /* File serial number. */ }; #endif @@ -104,6 +131,8 @@ struct stat64 /* Tell code we have these members. */ #define _STATBUF_ST_BLKSIZE #define _STATBUF_ST_RDEV +/* Nanosecond resolution time values are supported. */ +#define _STATBUF_ST_NSEC /* Encoding of the file mode. */ diff -p -up uClibc-0.9.30.1/libc/sysdeps/linux/powerpc/bits/kernel_stat.h.ns_stat~ uClibc-0.9.30.1/libc/sysdeps/linux/powerpc/bits/kernel_stat.h --- uClibc-0.9.30.1/libc/sysdeps/linux/powerpc/bits/kernel_stat.h.ns_stat~ 2009-11-30 12:24:11.927059167 -0500 +++ uClibc-0.9.30.1/libc/sysdeps/linux/powerpc/bits/kernel_stat.h 2009-11-30 12:24:21.538924022 -0500 @@ -8,6 +8,7 @@ /* This file provides whatever this particular arch's kernel thinks * struct kernel_stat should look like... It turns out each arch has a * different opinion on the subject... */ + #if __WORDSIZE == 64 #define kernel_stat kernel_stat64 #else @@ -22,12 +23,9 @@ struct kernel_stat { __kernel_off_t st_size; unsigned long st_blksize; unsigned long st_blocks; - unsigned long st_atime; - unsigned long __unused1; - unsigned long st_mtime; - unsigned long __unused2; - unsigned long st_ctime; - unsigned long __unused3; + struct timespec st_atim; + struct timespec st_mtim; + struct timespec st_ctim; unsigned long __unused4; unsigned long __unused5; }; @@ -45,12 +43,9 @@ struct kernel_stat64 { long long st_size; /* Size of file, in bytes. */ long st_blksize; /* Optimal block size for I/O. */ long long st_blocks; /* Number 512-byte blocks allocated. */ - long st_atime; /* Time of last access. */ - unsigned long int __unused1; - long st_mtime; /* Time of last modification. */ - unsigned long int __unused2; - long st_ctime; /* Time of last status change. */ - unsigned long int __unused3; + struct timespec st_atim; /* Time of last access. */ + struct timespec st_mtim; /* Time of last modification. */ + struct timespec st_ctim; /* Time of last status change. */ unsigned long int __unused4; unsigned long int __unused5; }; diff -p -up uClibc-0.9.30.1/libc/sysdeps/linux/powerpc/bits/stat.h.ns_stat~ uClibc-0.9.30.1/libc/sysdeps/linux/powerpc/bits/stat.h --- uClibc-0.9.30.1/libc/sysdeps/linux/powerpc/bits/stat.h.ns_stat~ 2009-11-30 12:24:11.927059167 -0500 +++ uClibc-0.9.30.1/libc/sysdeps/linux/powerpc/bits/stat.h 2009-11-30 12:24:21.560191690 -0500 @@ -69,7 +69,7 @@ struct stat # else __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */ # endif -#if 0 /*def __USE_MISC*/ +#ifdef __USE_MISC /* Nanosecond resolution timestamps are stored in a format equivalent to 'struct timespec'. This is the type used whenever possible but the Unix namespace rules do not allow the @@ -109,7 +109,7 @@ struct stat64 __off64_t st_size; /* Size of file, in bytes. */ __blksize_t st_blksize; /* Optimal block size for I/O. */ __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */ -#if 0 /*def __USE_MISC*/ +#ifdef __USE_MISC /* Nanosecond resolution timestamps are stored in a format equivalent to 'struct timespec'. This is the type used whenever possible but the Unix namespace rules do not allow the @@ -163,7 +163,7 @@ struct stat # else __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */ # endif -#if 0 /*def __USE_MISC*/ +#ifdef __USE_MISC /* Nanosecond resolution timestamps are stored in a format equivalent to 'struct timespec'. This is the type used whenever possible but the Unix namespace rules do not allow the @@ -203,7 +203,7 @@ struct stat64 __off64_t st_size; /* Size of file, in bytes. */ __blksize_t st_blksize; /* Optimal block size for I/O. */ __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */ -#if 0 /*def __USE_MISC*/ +#ifdef __USE_MISC /* Nanosecond resolution timestamps are stored in a format equivalent to 'struct timespec'. This is the type used whenever possible but the Unix namespace rules do not allow the diff -p -up uClibc-0.9.30.1/libc/sysdeps/linux/sh/bits/kernel_stat.h.ns_stat~ uClibc-0.9.30.1/libc/sysdeps/linux/sh/bits/kernel_stat.h --- uClibc-0.9.30.1/libc/sysdeps/linux/sh/bits/kernel_stat.h.ns_stat~ 2009-11-30 12:24:11.927059167 -0500 +++ uClibc-0.9.30.1/libc/sysdeps/linux/sh/bits/kernel_stat.h 2009-11-30 12:24:21.562931915 -0500 @@ -23,12 +23,9 @@ struct kernel_stat { unsigned long st_size; unsigned long st_blksize; unsigned long st_blocks; - unsigned long st_atime; - unsigned long __unused1; - unsigned long st_mtime; - unsigned long __unused2; - unsigned long st_ctime; - unsigned long __unused3; + struct timespec st_atim; + struct timespec st_mtim; + struct timespec st_ctim; unsigned long __unused4; unsigned long __unused5; }; @@ -72,14 +69,9 @@ struct kernel_stat64 { unsigned long __pad4; /* Future possible st_blocks hi bits */ #endif - unsigned long st_atime; - unsigned long __pad5; - - unsigned long st_mtime; - unsigned long __pad6; - - unsigned long st_ctime; - unsigned long __pad7; /* will be high 32 bits of ctime someday */ + struct timespec st_atim; + struct timespec st_mtim; + struct timespec st_ctim; unsigned long __unused1; unsigned long __unused2; diff -p -up uClibc-0.9.30.1/libc/sysdeps/linux/sh64/bits/kernel_stat.h.ns_stat~ uClibc-0.9.30.1/libc/sysdeps/linux/sh64/bits/kernel_stat.h --- uClibc-0.9.30.1/libc/sysdeps/linux/sh64/bits/kernel_stat.h.ns_stat~ 2009-11-30 12:24:11.927059167 -0500 +++ uClibc-0.9.30.1/libc/sysdeps/linux/sh64/bits/kernel_stat.h 2009-11-30 12:24:21.562931915 -0500 @@ -20,12 +20,9 @@ struct kernel_stat { unsigned long st_size; unsigned long st_blksize; unsigned long st_blocks; - unsigned long st_atime; - unsigned long __unused1; - unsigned long st_mtime; - unsigned long __unused2; - unsigned long st_ctime; - unsigned long __unused3; + struct timespec st_atim; + struct timespec st_mtim; + struct timespec st_ctim; unsigned long __unused4; unsigned long __unused5; }; @@ -50,14 +47,9 @@ struct kernel_stat64 { unsigned long st_blocks; /* Number 512-byte blocks allocated. */ unsigned long __pad4; /* future possible st_blocks high bits */ - unsigned long st_atime; - unsigned long __pad5; - - unsigned long st_mtime; - unsigned long __pad6; - - unsigned long st_ctime; - unsigned long __pad7; /* will be high 32 bits of ctime someday */ + struct timespec st_atim; + struct timespec st_mtim; + struct timespec st_ctim; unsigned long __unused1; unsigned long __unused2; diff -p -up uClibc-0.9.30.1/libc/sysdeps/linux/sparc/bits/kernel_stat.h.ns_stat~ uClibc-0.9.30.1/libc/sysdeps/linux/sparc/bits/kernel_stat.h --- uClibc-0.9.30.1/libc/sysdeps/linux/sparc/bits/kernel_stat.h.ns_stat~ 2009-11-30 12:24:11.927059167 -0500 +++ uClibc-0.9.30.1/libc/sysdeps/linux/sparc/bits/kernel_stat.h 2009-11-30 12:24:21.565934674 -0500 @@ -8,6 +8,7 @@ /* This file provides whatever this particular arch's kernel thinks * struct kernel_stat should look like... It turns out each arch has a * different opinion on the subject... */ + #if __WORDSIZE == 64 #define kernel_stat kernel_stat64 #else @@ -20,12 +21,9 @@ struct kernel_stat { unsigned short st_gid; unsigned short st_rdev; long st_size; - long st_atime; - unsigned long __unused1; - long st_mtime; - unsigned long __unused2; - long st_ctime; - unsigned long __unused3; + struct timespec st_atim; + struct timespec st_mtim; + struct timespec st_ctim; long st_blksize; long st_blocks; unsigned long __unused4[2]; @@ -46,12 +44,9 @@ struct kernel_stat64 { unsigned int st_blksize; unsigned char __pad4[8]; unsigned int st_blocks; - unsigned int st_atime; - unsigned int st_atime_nsec; - unsigned int st_mtime; - unsigned int st_mtime_nsec; - unsigned int st_ctime; - unsigned int st_ctime_nsec; + struct timespec st_atim; + struct timespec st_mtim; + struct timespec st_ctim; unsigned int __unused4; unsigned int __unused5; }; diff -p -up uClibc-0.9.30.1/libc/sysdeps/linux/sparc/bits/stat.h.ns_stat~ uClibc-0.9.30.1/libc/sysdeps/linux/sparc/bits/stat.h --- uClibc-0.9.30.1/libc/sysdeps/linux/sparc/bits/stat.h.ns_stat~ 2009-11-30 12:24:11.928048190 -0500 +++ uClibc-0.9.30.1/libc/sysdeps/linux/sparc/bits/stat.h 2009-11-30 12:24:21.572057036 -0500 @@ -61,7 +61,7 @@ struct stat #else __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */ #endif -#if 0 /*def __USE_MISC*/ +#ifdef __USE_MISC /* Nanosecond resolution timestamps are stored in a format equivalent to 'struct timespec'. This is the type used whenever possible but the Unix namespace rules do not allow the @@ -104,7 +104,7 @@ struct stat64 __blksize_t st_blksize; /* Optimal block size for I/O. */ __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */ -#if 0 /*def __USE_MISC*/ +#ifdef __USE_MISC /* Nanosecond resolution timestamps are stored in a format equivalent to 'struct timespec'. This is the type used whenever possible but the Unix namespace rules do not allow the diff -p -up uClibc-0.9.30.1/libc/sysdeps/linux/v850/bits/kernel_stat.h.ns_stat~ uClibc-0.9.30.1/libc/sysdeps/linux/v850/bits/kernel_stat.h --- uClibc-0.9.30.1/libc/sysdeps/linux/v850/bits/kernel_stat.h.ns_stat~ 2009-11-30 12:24:11.928048190 -0500 +++ uClibc-0.9.30.1/libc/sysdeps/linux/v850/bits/kernel_stat.h 2009-11-30 12:24:21.572057036 -0500 @@ -19,12 +19,9 @@ struct kernel_stat __kernel_off_t st_size; unsigned long st_blksize; unsigned long st_blocks; - unsigned long st_atime; - unsigned long __unused1; - unsigned long st_mtime; - unsigned long __unused2; - unsigned long st_ctime; - unsigned long __unused3; + struct timespec st_atim; + struct timespec st_mtim; + struct timespec st_ctim; unsigned long __unused4; unsigned long __unused5; }; @@ -53,14 +50,9 @@ struct kernel_stat64 unsigned long __unused4; /* future possible st_blocks high bits */ unsigned long st_blocks; /* Number 512-byte blocks allocated. */ - unsigned long st_atime; - unsigned long __unused5; - - unsigned long st_mtime; - unsigned long __unused6; - - unsigned long st_ctime; - unsigned long __unused7; /* high 32 bits of ctime someday */ + struct timespec st_atim; + struct timespec st_mtim; + struct timespec st_ctim; }; #endif /* _BITS_STAT_STRUCT_H */ diff -p -up uClibc-0.9.30.1/libc/sysdeps/linux/vax/bits/kernel_stat.h.ns_stat~ uClibc-0.9.30.1/libc/sysdeps/linux/vax/bits/kernel_stat.h --- uClibc-0.9.30.1/libc/sysdeps/linux/vax/bits/kernel_stat.h.ns_stat~ 2009-11-30 12:24:11.928048190 -0500 +++ uClibc-0.9.30.1/libc/sysdeps/linux/vax/bits/kernel_stat.h 2009-11-30 12:24:21.575059306 -0500 @@ -22,12 +22,9 @@ struct kernel_stat { unsigned long st_size; unsigned long st_blksize; unsigned long st_blocks; - unsigned long st_atime; - unsigned long __unused1; - unsigned long st_mtime; - unsigned long __unused2; - unsigned long st_ctime; - unsigned long __unused3; + struct timespec st_atim; + struct timespec st_mtim; + struct timespec st_ctim; unsigned long __unused4; unsigned long __unused5; }; @@ -47,12 +44,9 @@ struct kernel_stat64 { unsigned long st_blksize; unsigned long st_blocks; /* Number 512-byte blocks allocated. */ unsigned long __pad4; /* future possible st_blocks high bits */ - unsigned long st_atime; - unsigned long __pad5; - unsigned long st_mtime; - unsigned long __pad6; - unsigned long st_ctime; - unsigned long __pad7; /* will be high 32 bits of ctime someday */ + struct timespec st_atim; + struct timespec st_mtim; + struct timespec st_ctim; unsigned long long st_ino; }; diff -p -up uClibc-0.9.30.1/libc/sysdeps/linux/x86_64/bits/kernel_stat.h.ns_stat~ uClibc-0.9.30.1/libc/sysdeps/linux/x86_64/bits/kernel_stat.h --- uClibc-0.9.30.1/libc/sysdeps/linux/x86_64/bits/kernel_stat.h.ns_stat~ 2009-11-30 12:24:11.928048190 -0500 +++ uClibc-0.9.30.1/libc/sysdeps/linux/x86_64/bits/kernel_stat.h 2009-11-30 12:24:21.578057176 -0500 @@ -8,8 +8,6 @@ #error bits/kernel_stat.h is for internal uClibc use only! #endif -#define STAT_HAVE_NSEC 1 - struct kernel_stat { unsigned long st_dev; unsigned long st_ino; @@ -24,30 +22,12 @@ struct kernel_stat { long st_blksize; long st_blocks; /* Number 512-byte blocks allocated. */ - unsigned long st_atime; - unsigned long st_atime_nsec; - unsigned long st_mtime; - unsigned long st_mtime_nsec; - unsigned long st_ctime; - unsigned long st_ctime_nsec; + struct timespec st_atim; + struct timespec st_mtim; + struct timespec st_ctim; long __unused[3]; }; -/* For 32bit emulation */ -struct __old_kernel_stat { - unsigned short st_dev; - unsigned short st_ino; - unsigned short st_mode; - unsigned short st_nlink; - unsigned short st_uid; - unsigned short st_gid; - unsigned short st_rdev; - unsigned int st_size; - unsigned int st_atime; - unsigned int st_mtime; - unsigned int st_ctime; -}; - /* x86-64 stat64 is same as stat */ #define kernel_stat64 kernel_stat diff -p -up uClibc-0.9.30.1/libc/sysdeps/linux/x86_64/bits/stat.h.ns_stat~ uClibc-0.9.30.1/libc/sysdeps/linux/x86_64/bits/stat.h --- uClibc-0.9.30.1/libc/sysdeps/linux/x86_64/bits/stat.h.ns_stat~ 2009-11-30 12:24:11.928048190 -0500 +++ uClibc-0.9.30.1/libc/sysdeps/linux/x86_64/bits/stat.h 2009-11-30 12:24:21.581057001 -0500 @@ -78,7 +78,7 @@ struct stat #else __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */ #endif -#if 0 /*def __USE_MISC*/ +#ifdef __USE_MISC /* Nanosecond resolution timestamps are stored in a format equivalent to 'struct timespec'. This is the type used whenever possible but the Unix namespace rules do not allow the @@ -139,7 +139,7 @@ struct stat64 #endif __blksize_t st_blksize; /* Optimal block size for I/O. */ __blkcnt64_t st_blocks; /* Nr. 512-byte blocks allocated. */ -#if 0 /*def __USE_MISC*/ +#ifdef __USE_MISC /* Nanosecond resolution timestamps are stored in a format equivalent to 'struct timespec'. This is the type used whenever possible but the Unix namespace rules do not allow the diff -p -up uClibc-0.9.30.1/libc/sysdeps/linux/xtensa/bits/kernel_stat.h.ns_stat~ uClibc-0.9.30.1/libc/sysdeps/linux/xtensa/bits/kernel_stat.h --- uClibc-0.9.30.1/libc/sysdeps/linux/xtensa/bits/kernel_stat.h.ns_stat~ 2009-11-30 12:24:11.929048458 -0500 +++ uClibc-0.9.30.1/libc/sysdeps/linux/xtensa/bits/kernel_stat.h 2009-11-30 12:24:21.583933627 -0500 @@ -9,8 +9,6 @@ * struct kernel_stat should look like... It turns out each arch has a * different opinion on the subject... */ -#define STAT_HAVE_NSEC 1 - struct kernel_stat { unsigned long st_dev; unsigned long st_ino; @@ -22,12 +20,9 @@ struct kernel_stat { long st_size; unsigned long st_blksize; unsigned long st_blocks; - unsigned long st_atime; - unsigned long st_atime_nsec; - unsigned long st_mtime; - unsigned long st_mtime_nsec; - unsigned long st_ctime; - unsigned long st_ctime_nsec; + struct timespec st_atim; + struct timespec st_mtim; + struct timespec st_ctim; unsigned long __unused4; unsigned long __unused5; }; @@ -44,12 +39,9 @@ struct kernel_stat64 { unsigned long st_blksize; /* Optimal block size for I/O. */ unsigned long __unused2; unsigned long long st_blocks; /* Number 512-byte blocks allocated. */ - unsigned long st_atime; /* Time of last access. */ - unsigned long st_atime_nsec; - unsigned long st_mtime; /* Time of last modification. */ - unsigned long st_mtime_nsec; - unsigned long st_ctime; /* Time of last status change. */ - unsigned long st_ctime_nsec; + struct timespec st_atim; /* Time of last access. */ + struct timespec st_mtim; /* Time of last modification. */ + struct timespec st_ctim; /* Time of last status change. */ unsigned long __unused4; unsigned long __unused5; }; diff -p -up uClibc-0.9.30.1/libc/sysdeps/linux/xtensa/bits/stat.h.ns_stat~ uClibc-0.9.30.1/libc/sysdeps/linux/xtensa/bits/stat.h --- uClibc-0.9.30.1/libc/sysdeps/linux/xtensa/bits/stat.h.ns_stat~ 2009-11-30 12:24:11.929048458 -0500 +++ uClibc-0.9.30.1/libc/sysdeps/linux/xtensa/bits/stat.h 2009-11-30 12:24:21.587057141 -0500 @@ -55,7 +55,7 @@ struct stat unsigned long __pad2; __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */ #endif -#if 0 /*def __USE_MISC*/ +#ifdef __USE_MISC /* Nanosecond resolution timestamps are stored in a format equivalent to 'struct timespec'. This is the type used whenever possible but the Unix namespace rules do not allow the @@ -95,7 +95,7 @@ struct stat64 unsigned long __pad2; __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */ -#if 0 /*def __USE_MISC*/ +#ifdef __USE_MISC /* Nanosecond resolution timestamps are stored in a format equivalent to 'struct timespec'. This is the type used whenever possible but the Unix namespace rules do not allow the