[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ✘64-bit time_t on glibc 2.34 and up

From: Gary E. Miller
Subject: Re: ✘64-bit time_t on glibc 2.34 and up
Date: Fri, 13 Jan 2023 13:19:27 -0800

Yo Hal!

On Thu, 12 Jan 2023 23:15:25 -0800
Hal Murray <> wrote:

> said:
> > Recent glibc (2.34 and up) and recent Linux kernels, allow 64 bit
> > time_t on 32-bit Linux without much work.   
> What does "without much work" mean?

See commit 19d76e95312b03028752d57e76098d56adac63d9

   #define _TIME_BITS 64
   #define _FILE_OFFSET_BITS 64

That's not much work.

> How does gcc/clang/whatever decide if it is using 32 or 64 bits for
> time_t?

gcc and clang do not care, what matters is sys/time.h.  That file
decides based on the presence, or abscense, of:

   #define _TIME_BITS 64
   #define _FILE_OFFSET_BITS 64

> What do I do if I want to use the one the distro didn't pick?

You do nothing that you did not already always do: use time.h

Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703  Tel:+1 541 382 8588

            Veritas liberabit vos. -- Quid est veritas?
    "If you can't measure it, you can't improve it." - Lord Kelvin

Attachment: pgpGlmQFxPeAX.pgp
Description: OpenPGP digital signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]