From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id gE8jEhhk815CPQAA0tVLHw (envelope-from ) for ; Wed, 24 Jun 2020 14:32:56 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id mLn/DRhk815uIAAAB5/wlQ (envelope-from ) for ; Wed, 24 Jun 2020 14:32:56 +0000 Received: from arlo.cworth.org (arlo.cworth.org [50.126.95.6]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id C0DA9940145 for ; Wed, 24 Jun 2020 14:32:52 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id 054556DE13A8; Wed, 24 Jun 2020 07:32:47 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org 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 LQHmjtg97Izw; Wed, 24 Jun 2020 07:32:46 -0700 (PDT) Received: from arlo.cworth.org (localhost [IPv6:::1]) by arlo.cworth.org (Postfix) with ESMTP id EB6996DE102B; Wed, 24 Jun 2020 07:32:45 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id BB7FA6DE1050 for ; Wed, 24 Jun 2020 07:32:44 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org 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 t0Y2-zjv5wrN for ; Wed, 24 Jun 2020 07:32:42 -0700 (PDT) Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) by arlo.cworth.org (Postfix) with ESMTP id 027FE6DE0F9A for ; Wed, 24 Jun 2020 07:32:41 -0700 (PDT) Received: by fethera.tethera.net (Postfix, from userid 1001) id 68340613AF; Wed, 24 Jun 2020 10:32:40 -0400 (EDT) Received: (nullmailer pid 540572 invoked by uid 1000); Wed, 24 Jun 2020 14:32:38 -0000 From: David Bremner To: David Bremner , notmuch@notmuchmail.org Subject: [PATCH 1/2] configure: detect 64 bit time_t Date: Wed, 24 Jun 2020 11:32:33 -0300 Message-Id: <20200624143234.540526-1-david@tethera.net> X-Mailer: git-send-email 2.27.0 In-Reply-To: <87lfkcocvi.fsf@tethera.net> References: <87lfkcocvi.fsf@tethera.net> MIME-Version: 1.0 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: notmuch-bounces@notmuchmail.org Sender: "notmuch" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 50.126.95.6 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Spam-Score: -0.01 X-TUID: EanhTEvG3wzK Certain tests involving timestamps > 32bits cannot pass with the current libnotmuch API. We will avoid this isssue for now by disabling those tests on "old" architectures with 32bit time_t. --- configure | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/configure b/configure index 05ade05b..ecb0bdb7 100755 --- a/configure +++ b/configure @@ -1045,6 +1045,34 @@ else fi rm -f compat/have_timegm +cat < _time_t.c +#include +#include +int main(int argc, char**argv) { + printf("%d\n",sizeof(time_t) >= 8); +} +EOF + +printf "Checking for 64 bit time_t... " +if ${CC} _time_t.c -o _time_t > /dev/null 2>&1; +then + have_64bit_time_t=$(./_time_t) + if [ $have_64bit_time_t -eq 1 ] + then + printf "Yes.\n" + else + printf "No.\n" + fi +else + cat < /dev/null 2>&1 then @@ -1128,7 +1156,7 @@ for flag in -Wmissing-declarations; do done printf "\n\t%s\n" "${WARN_CFLAGS}" -rm -f minimal minimal.c _libversion.c _libversion _libversion.sh _check_session_keys.c _check_session_keys _check_x509_validity.c _check_x509_validity +rm -f minimal minimal.c _time_t _time_t.c _libversion.c _libversion _libversion.sh _check_session_keys.c _check_session_keys _check_x509_validity.c _check_x509_validity # construct the Makefile.config cat > Makefile.config <