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

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

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