This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [RFC2 RESEND PATCH] [AARCH64] ILP32: support stat syscall family
- From: Joseph Myers <joseph at codesourcery dot com>
- To: Yury Norov <ynorov at caviumnetworks dot com>
- Cc: <libc-alpha at sourceware dot org>, <arnd at arndb dot de>, <catalin dot marinas at arm dot com>, <davem at davemloft dot net>, <szabolcs dot nagy at arm dot com>, <maxim dot kuvyrkov at linaro dot org>, <pinskia at gmail dot com>, <bamvor dot zhangjian at huawei dot com>, <schwab at suse dot de>, <fweimer at redhat dot com>, <Prasun dot Kapoor at cavium dot com>, <adhemerval dot zanella at linaro dot org>
- Date: Mon, 1 Aug 2016 15:59:05 +0000
- Subject: Re: [RFC2 RESEND PATCH] [AARCH64] ILP32: support stat syscall family
- Authentication-results: sourceware.org; auth=none
- References: <1467816908-15290-1-git-send-email-ynorov@caviumnetworks.com> <alpine.DEB.2.20.1607201556470.12251@digraph.polyomino.org.uk> <20160801155356.GA20010@yury-N73SV>
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