This is the mail archive of the libc-alpha@sourceware.org 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: [RFC2 RESEND PATCH] [AARCH64] ILP32: support stat syscall family


On Mon, Aug 01, 2016 at 03:59:05PM +0000, Joseph Myers wrote:
> On Mon, 1 Aug 2016, Yury Norov wrote:
> 
> > When I wrote it initially, it was an attempt to start solving Y2038
> > problem, and it looks like this to me:
> >  - we declare new structure (kernel_timespec or __timespec or timespec64)
> >    that is identical with 64-bit timespec;
> 
> As that's for interfacing to the kernel, it should not appear in any 
> public header at all, only in internal sources.

This is for Y2038. For interfacing to the kernel, it's enough to leave
space for 64-bit time types with align directive, and do conversion
internally.

32-bit ports should have 64-bit time types and structures to be ready
to Y2038, and for now we have no such structures.

> >  - we declare struct timespec in existing structures in union with new
> >    timespec64 (in this patch - __timespec), and use convert_timespec()
> >    macro where needed;
> 
> No.  The structures passed to/from the kernel, containing the 
> kernel_timespec structure, should be declared in internal headers (e.g. 
> kernel_stat.h, if you need to convert a struct stat containing a struct 
> timespec), and conversion should deal with converting a kernel structure 
> to a public one.  No such unions should appear in public headers.  Public 
> headers should only contain the public userspace types, not types for 
> interfacing with the kernel.

OK, I'll prepare the patch w/o unions. Anyway, I think we'd have
64-bit timespec for 32-bit ports. Are you OK if I will introduce
struct timespec64 in separated installed header, and use it under
SUPPORT_64_BIT_TIME_TYPES option?

Yury.

> -- 
> Joseph S. Myers
> joseph@codesourcery.com


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