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 Tue, 22 May 2018, Paul Eggert wrote:

> As I recall, there were other unnecessary duplications in the proposed set of
> patches, so this is not just an issue of difftime.

Indeed.  The global approach should be: the main implementation of any 
functionality that involves nontrivial implementation code in glibc is the 
one that uses 64-bit time, unconditionally, on all platforms.  On 
platforms that currently have 32-bit time_t, the public interfaces for 
32-bit times would become thin wrappers round those for 64-bit times while 
new public ABIs are added for 64-bit times (on platforms that currently 
have 64-bit time_t, there would be no new ABIs).  If kernel support for 
64-bit times is not known to be available for the (architecture, kernel 
version) pair for which glibc is built, the implementations in terms of 
64-bit times may then need to translate back to 32-bit times, with 
overflow checks, to call into the kernel.

-- 
Joseph S. Myers
joseph@codesourcery.com


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