This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: struct stat.h with nanosecond resolution


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]