This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH v2 2/7] y2038: Introduce __ASSUME_64BIT_TIME define
- From: Joseph Myers <joseph at codesourcery dot com>
- To: Stepan Golosunov <stepan at golosunov dot pp dot ru>
- Cc: Lukasz Majewski <lukma at denx dot de>, <libc-alpha at sourceware dot org>, Arnd Bergmann <arnd at arndb dot de>, Paul Eggert <eggert at cs dot ucla dot edu>
- Date: Tue, 7 May 2019 20:44:08 +0000
- Subject: Re: [PATCH v2 2/7] y2038: Introduce __ASSUME_64BIT_TIME define
- References: <alpine.DEB.2.21.1904292138430.21580@digraph.polyomino.org.uk> <20190430110505.2a0c7d1a@jawa> <20190430214748.rzjlcu3f3hdyqnhw@sghpc.golosunov.pp.ru> <20190502105108.541fe118@jawa> <20190502115459.d3qwvhvmzl6c5kmo@sghpc.golosunov.pp.ru> <20190502155549.2f7bf82d@jawa> <20190506153844.77cad546@jawa> <20190506162659.6d7e4a59@jawa> <20190506193617.nd44jtdt4tty5few@sghpc.golosunov.pp.ru> <20190506231444.088274fc@jawa> <20190507200358.l6gtrjucsnm3vx6r@sghpc.golosunov.pp.ru>
On Wed, 8 May 2019, Stepan Golosunov wrote:
> If you replace
>
> #ifdef __ASSUME_TIME64_SYSCALLS
>
> with
>
> #ifdef __NR_clock_settime64
>
> result would make more sense than what you have now.
Actually I'd expect it to start something more like
#ifdef __ASSUME_TIME64_SYSCALLS
return INLINE_SYSCALL_CALL (clock_settime64, clock_id, tp);
#elif defined __NR_clock_settime64
to behave as expected for both __ASSUME_TIME64_SYSCALLS, and the case
where __NR_clock_settime64 is defined but __ASSUME_TIME64_SYSCALLS is not.
(The correct fallback when __NR_clock_settime64 is not defined depends on
the size of time_t as used in the old syscalls. Note that you *cannot*
assume that 5.1 kernel headers are in use, so __NR_clock_settime64
undefined might means a system where the syscall ABI already uses 64-bit
times with clock_settime, or it might mean one where the syscall ABI uses
32-bit times with clock_settime but old kernel headers are in use.)
--
Joseph S. Myers
joseph@codesourcery.com