From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id 5E80E6DE01D8 for ; Mon, 3 Feb 2020 05:40:55 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -0.066 X-Spam-Level: X-Spam-Status: No, score=-0.066 tagged_above=-999 required=5 tests=[AWL=-0.065, SPF_PASS=-0.001] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 6rnt7S6CKkYU for ; Mon, 3 Feb 2020 05:40:54 -0800 (PST) Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) by arlo.cworth.org (Postfix) with ESMTPS id 6115E6DE01CE for ; Mon, 3 Feb 2020 05:40:54 -0800 (PST) Received: from remotemail by fethera.tethera.net with local (Exim 4.89) (envelope-from ) id 1iyby6-0007wA-Jc; Mon, 03 Feb 2020 08:40:50 -0500 Received: (nullmailer pid 31707 invoked by uid 1000); Mon, 03 Feb 2020 13:40:49 -0000 From: David Bremner To: Peter Wang , notmuch@notmuchmail.org Subject: Re: timestamp overflows sprinter interface In-Reply-To: <20200130200231.GB4015@kurr.localdomain> References: <20200130200231.GB4015@kurr.localdomain> Date: Mon, 03 Feb 2020 09:40:49 -0400 Message-ID: <87lfpjaivy.fsf@tethera.net> MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.29 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: Mon, 03 Feb 2020 13:40:55 -0000 Peter Wang writes: > Hi, > > On a system where time_t is 64-bit and 'int' is a signed 32-bit integer > type, timestamps beyond some time in 2038 will be serialised to a > negative value. I admire your forward thinking! > > The simplest solution appears to be to change the type in the sprinter > method to int64_t: > > void (*integer)(struct sprinter *, int64_t); > > Any other suggestions? Since this is an internal API, I don't really see a big problem with doing this. d