Re: Changing signed time_t (MAX 03:14:07 on Tuesday, 19 January 2038) to an unsigned 32-bit integer (MAX, 06:28:15 on Sunday, 7 February 2106)

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

 



Hi!

On Thu, Feb 25, 2021 at 10:13:04PM +0000, Steger, Matthew wrote:
> Has there been any consideration to adding a compiler/linker option like "-UnsignedTime" to convert "time_t" to UNSIGNED 32-bit INT so we (and I would presume a *LOT* of other embedded users) will have the option to extend  32-bit time past 2038 to 2106 with just a Compiler Option (of course losing times before 1970)???

time_t is defined via #include <time.h>, and that belongs to your C
library, not to GCC.

For many systems time_t is a 64-bit time, and most of the world will go
there for 32-bit systems as well, naming that new type __time64_t for
example, as described for glibc at
  <https://sourceware.org/glibc/wiki/Y2038ProofnessDesign>


You can ask whoever provides your <time.h> what their plans for y2038
are.  Sorry we cannot help you.  Good luck,


Segher



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux