2 Jan
2010
2 Jan
'10
10:06 p.m.
Jeremy wrote:
On Wed, Dec 30, 2009 at 07:32:19PM +0000, corvid wrote:
... but maybe you will know a nicer calculation, or a portability subtlety that I should handle.
[...] +#define DILLO_TIME_MAX ((time_t) ((1UL << (sizeof(time_t) * 8 - 1)) - 1))
Quoting "man -S 0p types.h"
* time_t and clock_t shall be integer or real-floating types.
So at least in theory you should not assume that time_t is an integer type. I've no idea how likely that is to be wrong in practice. (On my system time_t is long.) Unfortunatly "man sysconf" does not describe any maximum time value constant.
Hmm... well, at least it wouldn't be any worse than it already is! There's a bunch of time_t <-> long in dpi/cookies.c.