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: [RFC v2 03/20] y2038: linux: Provide __clock_settime64 implementation


On Thu, Jun 27, 2019 at 12:36 PM Lukasz Majewski <lukma@denx.de> wrote:
> > On Thu, Jun 27, 2019 at 12:55 AM Lukasz Majewski <lukma@denx.de>

> After the discussion I do believe that it would be correct to change
> the proposed patch [1] '__clock_settime' to:
>
> #if __TIMESIZE != 64

This would hide the function on 64-bit architectures, right?

Maybe
#if (__TIMESIZE == __WORDSIZE) || (defined __x86_64__ && defined __ILP32__)

or shortening that by adding a new macro

#if __ASSUME_TIME32_SYSCALLS

> int
> __clock_settime (clockid_t clock_id, const struct timespec *tp)
> {
> /* For archs with WORDSIZE==32, which do not support clock_settime64
> the clock_settime supporting 32 bit time ABI will be used */

Same for the comment: __clock_settime would be used both
on 64-bit architectures as the normal path, and for compatiblity
with applications built without _TIME_BITS=64.

> return INLINE_SYSCALL_CALL (clock_settime, clock_id, tp);
> }
> #endif
>
> The "__clock_settime64()" part could be left untouched.

Ok.

      Arnd


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