HomeClusterLabs Projects

Log: fencer: always format time_t values as long long

Description

Log: fencer: always format time_t values as long long

Conventionally it's signed long under the GNU C library, which is 32
bits on 32-bit architectures, but Glibc provides the __TIME_BITS==64
option, which makes it signed long long instead (64 bits) and makes no
difference on 64-bit architectures [1]. This enables using the %lld
conversion specifier uniformly across all supported architectures.
This got exposed by Debian recently transitioning to 64-bit time_t [2].

[1] https://sourceware.org/glibc/wiki/Y2038ProofnessDesign
[2] https://wiki.debian.org/ReleaseGoals/64bit-time

Signed-off-by: Ferenc Wágner <wferi@debian.org>

Details

Provenance
wferiAuthored on Mar 22 2024, 11:40 AM
Parents
rPd84c84e61c9f: Merge pull request #3397 from nrwahl2/nrwahl2-xml_attrs3
Branches
Unknown
Tags
Unknown

Event Timeline

Ferenc Wágner <wferi@debian.org> committed rP6a882fe8c09c: Log: fencer: always format time_t values as long long (authored by Ferenc Wágner <wferi@debian.org>).Mar 31 2024, 11:50 AM