On Mon, May 15, 2017 at 09:55:12PM -0400, Ben Peart wrote:
quoted
quoted
quoted
+ istate->last_update = (time_t)ntohll(*(uint64_t *)index);
[...]
quoted
(I note also that time_t is not necessarily 64-bits in the first place,
but David said something about this not really being a time_t).
The in memory representation is a time_t as that is the return value of
time(NULL) but it is converted to/from a 64 bit value when written/read to
the index extension so that the index format is the same no matter the
native size of time_t.
OK. I guess your cast here will truncate on 32-bit systems, but
presumably not until 2038, so we can perhaps ignore it for now (and
anyway, time(NULL) will be broken on such a system at that point).
-Peff