struct stat.h with nanosecond resolution

Andi Kleen ak@suse.de
Mon Dec 2 02:49:00 GMT 2002


> OK, then the only remaining problem is the namespace.we cannot use
> struct timespec as the type.  'timespec' is not allowed.  In fact, your
> current patch should produce syntax errors if you don't include <time.h>
> before <sys/stat.h>.  The #include in <sys/stat.h> is supposed to define
> only time_t.
> 
> 
> What I suggest we do is to add
> 
> typedef struct timespec __timespec_t;

Solaris makes it conditional on _XOPEN_SOURCE || _POSIX_SOURCE 

(struct timespec if these are not defined, otherwise _timespec) 

Probably a good idea, to keep maximum type compatibility.

-Andi



More information about the Libc-alpha mailing list