struct stat.h with nanosecond resolution
Ulrich Drepper
drepper@redhat.com
Mon Dec 2 02:46:00 GMT 2002
Andi Kleen wrote:
>>What about filesystems which don't support nanosecond resolution? Do
>>they actively clear the fields? If not, we'll have to change the
>
>
> Yes, they do.
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;
in <time.h> and use __timespec_t as the type for the fields.
If you do this change, recompile glibc successfully, and if necessary
check that using <sys/stat.h> without prior #include <time.h> works,
then check the patch in.
--
--------------. ,-. 444 Castro Street
Ulrich Drepper \ ,-----------------' \ Mountain View, CA 94041 USA
Red Hat `--' drepper at redhat.com `---------------------------
More information about the Libc-alpha
mailing list