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


> 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


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