From c0a2d0b7edacbc6389574821b0231e07431dabb6 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Fri, 5 Feb 2016 21:07:40 +0100 Subject: frv: resurrect port somehow, totally untested The FR-V port is really broken, and I have no emulator or hardware for this platform. I tried to get some hardware from RedHat, who made the FR-V port initially. Unfortunately Fujitsi didn't agreed to sent me some of their unused spare hardware lying @RedHat. As I invested some time to get stuff compiled, I decided to add the code and may be anytime later I can gain access to some emulator or hardware. GDB simulator for FR-V doesn't support booting Linux AFAIK. --- libc/sysdeps/linux/frv/bits/stat.h | 33 ++++++++++++++++++++++++++++++--- 1 file changed, 30 insertions(+), 3 deletions(-) (limited to 'libc/sysdeps/linux/frv/bits/stat.h') diff --git a/libc/sysdeps/linux/frv/bits/stat.h b/libc/sysdeps/linux/frv/bits/stat.h index 83f5b4726..e6a1944bb 100644 --- a/libc/sysdeps/linux/frv/bits/stat.h +++ b/libc/sysdeps/linux/frv/bits/stat.h @@ -70,6 +70,20 @@ struct stat __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 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 unsigned long int __unused1; __time_t st_atime; /* Time of last access. */ @@ -78,7 +92,7 @@ struct stat unsigned long int __unused3; __time_t st_ctime; /* Time of last status change. */ - +#endif unsigned long long __unused4; }; @@ -103,7 +117,20 @@ 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 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 unsigned long int __unused1; __time_t st_atime; /* Time of last access. */ @@ -112,7 +139,7 @@ struct stat64 unsigned long int __unused3; __time_t st_ctime; /* Time of last status change. */ - +#endif unsigned long long __unused4; }; #endif -- cgit v1.2.3