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 RFC 2] 02/63] Y2038: add function __difftime64


On 05/02/2018 12:22 AM, Albert ARIBAUD wrote:
At least the
syscall-dependent ones work differently: the 32-bit impelmentations
just use the 32-bit syscalls, while the 64-bit implementations have to
use the 64-bit syscalls *if availaible at run-time*, and be able to
fallback on the 32-bit syscalls if they have to.

That's fine, and we can have code protected by ifdef to do that as needed for the special case where the system has multiple time_t flavors some of which might not work. This doesn't mean we need to have separate copies of the entire module that needs to use such code.

And for functions like difftime that do not use time_t-related syscalls, things should be even simpler, as we shouldn't need to worry about this issue in those functions.

Using a single source code for both 32-bit time and 64-bit time
would mean that 32-bit syscall-based implementation behavior would
change,

I don't see why it would, at least not if things were done as suggested above.


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