On 2024-01-22 15:01, Matthew Donadio via tz wrote:
doesn't POSIX require CHAR_BIT==8? And recent POSIX says time_t is an integral type (compared to an arithmetic type)? Wouldn't this mean that time_t has to at least be a multiple of 8-bit in size now?
No, because integers can have padding bits that do not contribute to their values (or can cause the values to be invalid).
And for historical purposes, weird non-POSIX platforms with C compilers have long life in the DSP and micro-controller world. I worked on a system into the early 2000's that had CHAR_BIT==32, and sizeof() all types was 1 as a result (along with 40-bit non-IEEE floating point).
Sounds like the SHARC processor. All integer types are 32 bits. (The hardware supports 40-bit integers but you shouldn't try to use them from C.) Not a likely target for POSIX or for tzcode.
wouldn't surprise me if there is a VAX somewhere that won't die, and someone still is dealing with the MJD epoch and 100ns ticks.
My own practice is to not worry about porting current software to computers used only in museums. Life is too short. People with museum hardware should run museum software.