[tz] strftime %s

Paul Eggert eggert at cs.ucla.edu
Mon Jan 22 21:24:41 UTC 2024


On 1/22/24 12:49, Garrett Wollman wrote:
> 32 bits being clearly inadequate, what is the next available integer
> type of greater width, that every implementation is required to
> provide?  In POSIX, that's int64_t.

POSIX doesn't require int64_t. This is true even of POSIX 202x/D4.

And even if POSIX required int64_t, it wouldn't need to require time_t 
to be 64 bits. It could allow 60-bit time_t on implementations that have 
60-bit integer types, much as it already allows 60-bit implementations 
of types like off_t and size_t.

This is all hypothetical of course. As far as I know, 60-bit commercial 
hardware hasn't been produced since CDC Cyber 180 series of the 1980s, 
60-bit machines never conformed to POSIX, the only remaining examples 
are in museums, and as far as I know none of them are actually running 
now (though simulators are available).

If you're interested in computer history, here's an example 60-bitter 
built in 1988:

https://cray-cyber.org/systems/cdc-cyber-180-960/

This machine could run in both 60- and 64-bit mode. The 60-bit mode was 
for backward compatibility with the CDC 6600 (1964), the first 
successful supercomputer.



More information about the tz mailing list