This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [[PATCH RFC 2] 02/63] Y2038: add function __difftime64
- From: Albert ARIBAUD <albert dot aribaud at 3adev dot fr>
- To: Florian Weimer <fweimer at redhat dot com>
- Cc: Paul Eggert <eggert at cs dot ucla dot edu>, libc-alpha at sourceware dot org
- Date: Wed, 2 May 2018 13:26:46 +0200
- Subject: Re: [[PATCH RFC 2] 02/63] Y2038: add function __difftime64
- References: <20180418201819.15952-1-albert.aribaud@3adev.fr> <20180418201819.15952-2-albert.aribaud@3adev.fr> <20180418201819.15952-3-albert.aribaud@3adev.fr> <0a04fc43-9e92-1bbc-843d-049d1026d971@cs.ucla.edu> <20180419150411.4d7ee629@athena> <34e2461c-5da4-181d-d34b-b63c7f89dbf6@cs.ucla.edu> <20180502092209.540847ad@athena> <1a4c2101-130f-79bd-71ff-3393c42c000e@redhat.com>
Hi Florian,
On Wed, 2 May 2018 09:46:19 +0200, Florian Weimer <fweimer@redhat.com>
wrote :
> On 05/02/2018 09:22 AM, Albert ARIBAUD wrote:
> > IOW: does the set of 32-bit architectures on which we will use
> > 64-bit with 32-bit time need all the complexities of current difftime?
> > I'm thinking for instance about padding bits.
>
> Yes, you can simplify the code if you want, assuming that time_t doesn't
> have padding bits, and even hard-code the matching unsigned type.
Watch out __time64_t is signed, not unsigned (if it were unsigned, that
would really simplify things, and we could just use subtraction).
> Thanks,
> Florian
Cordialement,
Albert ARIBAUD
3ADEV