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: [PATCH v5 2/3] y2038: Provide conversion helpers for struct __timespec64


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.


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