From 56438fb8cb755c2b2664eff5883716bb642dc2be Mon Sep 17 00:00:00 2001 From: David Bremner Date: Tue, 7 Jun 2016 11:58:15 +2100 Subject: [PATCH] [PATCH] lib: fix definition of LIBNOTMUCH_CHECK_VERSION --- 66/abf63284a183c205f17bb5b1820647e4b2d7f9 | 78 +++++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 66/abf63284a183c205f17bb5b1820647e4b2d7f9 diff --git a/66/abf63284a183c205f17bb5b1820647e4b2d7f9 b/66/abf63284a183c205f17bb5b1820647e4b2d7f9 new file mode 100644 index 000000000..ffeae1d28 --- /dev/null +++ b/66/abf63284a183c205f17bb5b1820647e4b2d7f9 @@ -0,0 +1,78 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by arlo.cworth.org (Postfix) with ESMTP id 7952D6DE01C2 + for ; Mon, 6 Jun 2016 08:34:06 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at cworth.org +X-Spam-Flag: NO +X-Spam-Score: -0.006 +X-Spam-Level: +X-Spam-Status: No, score=-0.006 tagged_above=-999 required=5 + tests=[AWL=-0.007, HEADER_FROM_DIFFERENT_DOMAINS=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 jdwItI-Oggen for ; + Mon, 6 Jun 2016 08:33:57 -0700 (PDT) +X-Greylist: delayed 2135 seconds by postgrey-1.35 at arlo; + Mon, 06 Jun 2016 08:33:57 PDT +Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) + by arlo.cworth.org (Postfix) with ESMTPS id 54DE86DE00DA + for ; Mon, 6 Jun 2016 08:33:57 -0700 (PDT) +Received: from remotemail by fethera.tethera.net with local (Exim 4.84) + (envelope-from ) + id 1b9vyi-0000Di-K2; Mon, 06 Jun 2016 10:58:08 -0400 +Received: (nullmailer pid 3141 invoked by uid 1000); + Mon, 06 Jun 2016 14:58:17 -0000 +From: David Bremner +To: Richard Russon , notmuch@notmuchmail.org +Subject: [PATCH] lib: fix definition of LIBNOTMUCH_CHECK_VERSION +Date: Mon, 6 Jun 2016 11:58:15 -0300 +Message-Id: <1465225095-3098-1-git-send-email-david@tethera.net> +X-Mailer: git-send-email 2.1.4 +In-Reply-To: <20160606124522.g2y2eazhhrwjsa4h@flatcap.org> +References: <20160606124522.g2y2eazhhrwjsa4h@flatcap.org> +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.20 +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, 06 Jun 2016 15:34:06 -0000 + +Fix bug reported in id:20160606124522.g2y2eazhhrwjsa4h@flatcap.org + +Although the C99 standard 6.10 is a little non-obvious on this point, +the docs for e.g. gcc are unambiguous. And indeed in practice with the +extra space, this code fails + +int main(int argc, char **argv){ + printf("%d\n",foo(1)); +} +--- + lib/notmuch.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/lib/notmuch.h b/lib/notmuch.h +index 29713ae..d4a97cb 100644 +--- a/lib/notmuch.h ++++ b/lib/notmuch.h +@@ -93,7 +93,7 @@ NOTMUCH_BEGIN_DECLS + * #endif + * @endcode + */ +-#define LIBNOTMUCH_CHECK_VERSION (major, minor, micro) \ ++#define LIBNOTMUCH_CHECK_VERSION(major, minor, micro) \ + (LIBNOTMUCH_MAJOR_VERSION > (major) || \ + (LIBNOTMUCH_MAJOR_VERSION == (major) && LIBNOTMUCH_MINOR_VERSION > (minor)) || \ + (LIBNOTMUCH_MAJOR_VERSION == (major) && LIBNOTMUCH_MINOR_VERSION == (minor) && \ +-- +2.1.4 + -- 2.26.2