[PATCH] lib: avoid casting gint64 to time_t
David Bremner
david at tethera.net
Wed Jun 24 05:40:49 PDT 2020
David Bremner <david at tethera.net> writes:
>
> This is not a complete fix, but at least the timestamp ends up
> aparently correct in the database. It looks like there are still
> wonky conversions on reading the large timestamp from the database.
There is another cast that is harder to avoid:
notmuch_message_get_date casts the output of
Xapian::sortable_unserialise to time_t.
Changing that would require an API/ABI change.
There are apparently still architectures where time_t is 32bits (it
seems like these machines with failing tests are among them). For 0.30 I
suspect the best thing is to mark the tests broken on architectures with
32 bit time_t. For the future I'm not sure, but maybe we should avoid
time_t completely.
d
More information about the notmuch
mailing list