Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 90C4E431FBC for ; Tue, 9 Feb 2010 11:20:05 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -2.269 X-Spam-Level: X-Spam-Status: No, score=-2.269 tagged_above=-999 required=5 tests=[ALL_TRUSTED=-1.8, AWL=0.271, BAYES_20=-0.74] autolearn=ham Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id gLeuOneumtZl; Tue, 9 Feb 2010 11:20:04 -0800 (PST) Received: from yoom.home.cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id D111F431FAE; Tue, 9 Feb 2010 11:20:03 -0800 (PST) Received: by yoom.home.cworth.org (Postfix, from userid 1000) id 61BB725416F; Tue, 9 Feb 2010 11:20:01 -0800 (PST) From: Carl Worth To: Michal Sojka , notmuch@notmuchmail.org In-Reply-To: <87r5oua2wv.fsf@steelpick.localdomain> References: <87mxzjpl9v.fsf@yoom.home.cworth.org> <87eikvpfzl.fsf@yoom.home.cworth.org> <87r5oua2wv.fsf@steelpick.localdomain> Date: Tue, 09 Feb 2010 11:19:54 -0800 Message-ID: <87ljf2md2d.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Subject: Re: [notmuch] [PATCH] Switch from random to sequential thread identifiers. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Feb 2010 19:20:05 -0000 --=-=-= On Tue, 09 Feb 2010 15:40:00 +0100, Michal Sojka wrote: > What about the following? This could also fix Sebastian's problem. ... > +#define __STDC_FORMAT_MACROS > +#include ... > - sprintf (thread_id, "%016llx", notmuch->last_thread_id); > + sprintf (thread_id, "%016"PRIx64, notmuch->last_thread_id); Excellent! I did hesitate for a moment when typing "llx" into the format string, but I had no idea what the correct thing to use was. I'm sure glad to have access to such a knowledgeable community where I can learn for the low cost of exposing my ignorance in public. I did verify the above in a copy of WG14/N1124. For anyone that doesn't recognize that, that's the draft from the C99 working group that I've been told is remarkably similar to C99 but distinct in that it's freely available[*]. I haven't verified the similarity, but I have found that document quite useful in cases like this one. Thanks for the fix. I'll likely push my change out now that I've added this fix. -Carl [*] http://www.open-std.org/JTC1/SC22/wg14/www/docs/n1124.pdf --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iD8DBQFLcbVb6JDdNq8qSWgRAjwWAJ9XVMsC8QE+CQVFkVE3CgXz8SXe1wCeKGdV EIVX9Fqmmqwmb9IrFLocIYg= =+y68 -----END PGP SIGNATURE----- --=-=-=--