From: David Bremner <david@tethera.net>
To: notmuch@notmuchmail.org
Subject: Re: [PATCH] lib: avoid casting gint64 to time_t
Date: Wed, 24 Jun 2020 09:40:49 -0300 [thread overview]
Message-ID: <87lfkcocvi.fsf@tethera.net> (raw)
In-Reply-To: <20200624110429.178032-1-david@tethera.net>
David Bremner <david@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
next prev parent reply other threads:[~2020-06-24 12:41 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-22 14:18 test failures on 32 bit architectures David Bremner
2020-06-22 23:12 ` David Bremner
2020-06-24 0:39 ` David Bremner
2020-06-24 11:04 ` [PATCH] lib: avoid casting gint64 to time_t David Bremner
2020-06-24 12:40 ` David Bremner [this message]
2020-06-24 14:32 ` [PATCH 1/2] configure: detect 64 bit time_t David Bremner
2020-06-24 14:32 ` [PATCH 2/2] test: mark two tests broken on machines with 32 " David Bremner
2020-06-27 1:25 ` David Bremner
2020-06-24 19:38 ` [PATCH 1/2] configure: detect 64 " Tomi Ollila
2020-06-27 1:25 ` David Bremner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://notmuchmail.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87lfkcocvi.fsf@tethera.net \
--to=david@tethera.net \
--cc=notmuch@notmuchmail.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).