This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH v5 2/3] y2038: Provide conversion helpers for struct __timespec64
- From: Stepan Golosunov <stepan at golosunov dot pp dot ru>
- To: Lukasz Majewski <lukma at denx dot de>
- Cc: libc-alpha at sourceware dot org, Arnd Bergmann <arnd at arndb dot de>, Paul Eggert <eggert at cs dot ucla dot edu>, Joseph Myers <joseph at codesourcery dot com>
- Date: Fri, 31 May 2019 15:47:40 +0400
- Subject: Re: [PATCH v5 2/3] y2038: Provide conversion helpers for struct __timespec64
- References: <20190529161850.30442-1-lukma@denx.de> <20190529161850.30442-3-lukma@denx.de>
29.05.2019 в 18:18:49 +0200 Lukasz Majewski написал:
> Those functions allow easy conversion between Y2038 safe struct
> __timespec64 and other time related data structures (like struct timeval).
>
> Moreover, those functions are NOT compiled when 64 bit time support is
> enabled (i.e. the __ASSUME_TIME64_SYSCALLS is defined) and are used only
> in 32 bit wrappers (like e.g. __clock_settime()).
> Changes for v5:
> - This code is now only compiled in when __ASSUME_TIME64_SYSCALLS is NOT
> defined. Previously it was depending on #if __TIMESIZE != 64.
That's wrong. valid_timespec_to_timespec64 is used when __TIMESIZE !=
64. Even when __ASSUME_TIME64_SYSCALLS is defined.
And when __ASSUME_TIME64_SYSCALLS is not defined __TIMESIZE should be
32. (Supporting __TIMESIZE == 64 without __ASSUME_TIME64_SYSCALLS is
a bad idea.)
Also, it doesn't look like __ASSUME_TIME64_SYSCALLS can be defined by
any header included from include/time.h.