Hi,

I noticed that lib/parse-duration.c does:

#define TIME_MAX 0x7FFFFFFF

This is naturally entirely unacceptable as the 2038 bug ((time_t)
INT32_MAX) is coming up soon and most operating systems are 64-bit
time_t capable by now. This should be rewritten as something involving
sizeof(time_t) in a safe and portable manner.

It would probably be best to not use a define named TIME_MAX, as that
name would be ideal if a standard header wanted to expose the domain of
time_t for use in cases like this (indeed, this came up because I am
adding a TIME_MAX constant to my libc).

Jonas 'Sortie' Termansen

Reply via email to