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:

> 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.

Ok, I'll do this now,

Thanks for the comments,
Andreas
-- 
 Andreas Jaeger
  SuSE Labs aj@suse.de
   private aj@arthur.inka.de
    http://www.suse.de/~aj


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