struct stat.h with nanosecond resolution
Martin v. Löwis
martin@v.loewis.de
Tue Dec 3 13:52:00 GMT 2002
Ulrich Drepper <drepper@redhat.com> writes:
> #ifdef __USE_GNU
> struct timespec st_atim;
> #else
> time_t st_atime;
> unsigned long int st_atime_nsec;
> #endif
>
>
> Maybe add || defined __USE_BSD.
For that matter, FreeBSD uses
#ifndef _POSIX_SOURCE
struct timespec st_atimespec; /* time of last access */
struct timespec st_mtimespec; /* time of last data modification */
struct timespec st_ctimespec; /* time of last file status change */
#else
time_t st_atime; /* time of last access */
long st_atimensec; /* nsec of last access */
time_t st_mtime; /* time of last data modification */
long st_mtimensec; /* nsec of last data modification */
time_t st_ctime; /* time of last file status change */
long st_ctimensec; /* nsec of last file status change */
#endif
So if the structures are flattened, it might be sensible to flatten
them in the same way as other systems.
Regards,
Martin
More information about the Libc-alpha
mailing list