cyrusimap / cyrus-sasl

Other
128 stars 146 forks source link

Extend the time_t format specifiers to 64 bit #827

Closed bgermann closed 4 months ago

bgermann commented 4 months ago

In some format strings, it is expected that time_t is long. long is 32 bit for 32 bit architectures, while time_t might be 64 bit. Extend the format string specifiers to long long, which is guaranteed to consist of 64 bits.

Closes: #484

hyc commented 4 months ago

just to note ... the right thing to do is first write an autoconf test to get the size of time_t. After that I'd define a macro for the correct printf format specifier. Also there were platforms where long = 64 and long long = 128 bits (although I think they're all extinct now, like Itanium).

bgermann commented 4 months ago

Please see #828 for a corrected version of the patch.