(_HAVE_STAT_NSEC,_HAVE_STAT_NSEC64): New.

This commit is contained in:
Andreas Jaeger 2003-01-01 19:56:23 +00:00
parent 7c18d1917f
commit a5dfb0e651
2 changed files with 48 additions and 0 deletions

View File

@ -28,6 +28,8 @@ struct kernel_stat
#define _HAVE_STAT___UNUSED5 #define _HAVE_STAT___UNUSED5
#define _HAVE_STAT___PAD1 #define _HAVE_STAT___PAD1
#define _HAVE_STAT___PAD2 #define _HAVE_STAT___PAD2
#define _HAVE_STAT_NSEC
#define _HAVE_STAT64___PAD1 #define _HAVE_STAT64___PAD1
#define _HAVE_STAT64___PAD2 #define _HAVE_STAT64___PAD2
#define _HAVE_STAT64___ST_INO #define _HAVE_STAT64___ST_INO
#define _HAVE_STAT64_NSEC

View File

@ -60,12 +60,27 @@ xstat_conv (int vers, struct kernel_stat *kbuf, void *ubuf)
buf->st_size = kbuf->st_size; buf->st_size = kbuf->st_size;
buf->st_blksize = kbuf->st_blksize; buf->st_blksize = kbuf->st_blksize;
buf->st_blocks = kbuf->st_blocks; buf->st_blocks = kbuf->st_blocks;
#ifdef _HAVE_STAT_NSEC
buf->st_atim.tv_sec = kbuf->st_atim.tv_sec; buf->st_atim.tv_sec = kbuf->st_atim.tv_sec;
buf->st_atim.tv_nsec = kbuf->st_atim.tv_nsec; buf->st_atim.tv_nsec = kbuf->st_atim.tv_nsec;
buf->st_mtim.tv_sec = kbuf->st_mtim.tv_sec; buf->st_mtim.tv_sec = kbuf->st_mtim.tv_sec;
buf->st_mtim.tv_nsec = kbuf->st_mtim.tv_nsec; buf->st_mtim.tv_nsec = kbuf->st_mtim.tv_nsec;
buf->st_ctim.tv_sec = kbuf->st_ctim.tv_sec; buf->st_ctim.tv_sec = kbuf->st_ctim.tv_sec;
buf->st_ctim.tv_nsec = kbuf->st_ctim.tv_nsec; buf->st_ctim.tv_nsec = kbuf->st_ctim.tv_nsec;
#else
buf->st_atime = kbuf->st_atime;
buf->st_mtime = kbuf->st_mtime;
buf->st_ctime = kbuf->st_ctime;
#endif
#ifdef _HAVE_STAT___UNUSED1
buf->__unused1 = 0;
#endif
#ifdef _HAVE_STAT___UNUSED2
buf->__unused2 = 0;
#endif
#ifdef _HAVE_STAT___UNUSED3
buf->__unused3 = 0;
#endif
#ifdef _HAVE_STAT___UNUSED4 #ifdef _HAVE_STAT___UNUSED4
buf->__unused4 = 0; buf->__unused4 = 0;
#endif #endif
@ -115,12 +130,27 @@ xstat64_conv (int vers, struct kernel_stat *kbuf, void *ubuf)
buf->st_size = kbuf->st_size; buf->st_size = kbuf->st_size;
buf->st_blksize = kbuf->st_blksize; buf->st_blksize = kbuf->st_blksize;
buf->st_blocks = kbuf->st_blocks; buf->st_blocks = kbuf->st_blocks;
#ifdef _HAVE_STAT64_NSEC
buf->st_atim.tv_sec = kbuf->st_atim.tv_sec; buf->st_atim.tv_sec = kbuf->st_atim.tv_sec;
buf->st_atim.tv_nsec = kbuf->st_atim.tv_nsec; buf->st_atim.tv_nsec = kbuf->st_atim.tv_nsec;
buf->st_mtim.tv_sec = kbuf->st_mtim.tv_sec; buf->st_mtim.tv_sec = kbuf->st_mtim.tv_sec;
buf->st_mtim.tv_nsec = kbuf->st_mtim.tv_nsec; buf->st_mtim.tv_nsec = kbuf->st_mtim.tv_nsec;
buf->st_ctim.tv_sec = kbuf->st_ctim.tv_sec; buf->st_ctim.tv_sec = kbuf->st_ctim.tv_sec;
buf->st_ctim.tv_nsec = kbuf->st_ctim.tv_nsec; buf->st_ctim.tv_nsec = kbuf->st_ctim.tv_nsec;
#else
buf->st_atime = kbuf->st_atime;
buf->st_mtime = kbuf->st_mtime;
buf->st_ctime = kbuf->st_ctime;
#endif
#ifdef _HAVE_STAT64___UNUSED1
buf->__unused1 = 0;
#endif
#ifdef _HAVE_STAT64___UNUSED2
buf->__unused2 = 0;
#endif
#ifdef _HAVE_STAT64___UNUSED3
buf->__unused3 = 0;
#endif
#ifdef _HAVE_STAT64___UNUSED4 #ifdef _HAVE_STAT64___UNUSED4
buf->__unused4 = 0; buf->__unused4 = 0;
#endif #endif
@ -204,12 +234,28 @@ xstat32_conv (int vers, struct stat64 *kbuf, struct stat *buf)
__set_errno (EOVERFLOW); __set_errno (EOVERFLOW);
return -1; return -1;
} }
#ifdef _HAVE_STAT_NSEC
buf->st_atim.tv_sec = kbuf->st_atim.tv_sec; buf->st_atim.tv_sec = kbuf->st_atim.tv_sec;
buf->st_atim.tv_nsec = kbuf->st_atim.tv_nsec; buf->st_atim.tv_nsec = kbuf->st_atim.tv_nsec;
buf->st_mtim.tv_sec = kbuf->st_mtim.tv_sec; buf->st_mtim.tv_sec = kbuf->st_mtim.tv_sec;
buf->st_mtim.tv_nsec = kbuf->st_mtim.tv_nsec; buf->st_mtim.tv_nsec = kbuf->st_mtim.tv_nsec;
buf->st_ctim.tv_sec = kbuf->st_ctim.tv_sec; buf->st_ctim.tv_sec = kbuf->st_ctim.tv_sec;
buf->st_ctim.tv_nsec = kbuf->st_ctim.tv_nsec; buf->st_ctim.tv_nsec = kbuf->st_ctim.tv_nsec;
#else
buf->st_atime = kbuf->st_atime;
buf->st_mtime = kbuf->st_mtime;
buf->st_ctime = kbuf->st_ctime;
#endif
#ifdef _HAVE_STAT___UNUSED1
buf->__unused1 = 0;
#endif
#ifdef _HAVE_STAT___UNUSED2
buf->__unused2 = 0;
#endif
#ifdef _HAVE_STAT___UNUSED3
buf->__unused3 = 0;
#endif
#ifdef _HAVE_STAT___UNUSED4 #ifdef _HAVE_STAT___UNUSED4
buf->__unused4 = 0; buf->__unused4 = 0;
#endif #endif