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 v9 1/2] Y2038: Add 64-bit time for all architectures


Hi Joseph,

On Wed, 10 Oct 2018 16:22:49 +0000, Joseph Myers
<joseph@codesourcery.com> wrote :

> On Wed, 10 Oct 2018, Albert ARIBAUD (3ADEV) wrote:
> 
> >  bits/time64.h                               | 36 +++++++++++++++++++
> >  bits/timesize.h                             | 22 ++++++++++++
> >  include/time.h                              |  7 +---
> >  posix/bits/types.h                          |  8 +++++
> >  stdlib/Makefile                             |  2 +-
> >  sysdeps/unix/sysv/linux/x86/bits/time64.h   | 39 +++++++++++++++++++++
> >  sysdeps/unix/sysv/linux/x86/bits/timesize.h | 25 +++++++++++++  
> 
> My understanding from review comments on previous versions of this patch 
> was that the generic bits/time64.h was in fact fully correct for x32, so 
> no x86-specific version of that header should be needed - only the 
> x86-specific version of bits/timesize.h.

That was not my understanding, which was as follows:

- We need to determine the size of the target architecture time_t type
  in order to decide whether we need to define a 64-bit time type.
- we do not have the time_t size readily available, so we must infer it
  based on some other type size.
- The best candidate is the word size, which matches the time_t size for
  all architectures ; that is the most general rule.
- However, for x32 the word size is 32 yet the time_t size is 64, so
  x32 needs an exception.

Cordialement,
Albert ARIBAUD
3ADEV


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