From: David Bremner Date: Tue, 7 Jun 2016 10:37:57 +0000 (+2100) Subject: [PATCH] lib: fix definition of LIBNOTMUCH_CHECK_VERSION X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=e23762de10a0156856a57551d3c03ad39718d85a;p=notmuch-archives.git [PATCH] lib: fix definition of LIBNOTMUCH_CHECK_VERSION --- diff --git a/13/ea1e45f78790a6b626a680e3d7a282226ec202 b/13/ea1e45f78790a6b626a680e3d7a282226ec202 new file mode 100644 index 000000000..f67640d27 --- /dev/null +++ b/13/ea1e45f78790a6b626a680e3d7a282226ec202 @@ -0,0 +1,79 @@ +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 2EF1C6DE0130 + for ; Tue, 7 Jun 2016 03:38:27 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at cworth.org +X-Spam-Flag: NO +X-Spam-Score: -0.011 +X-Spam-Level: +X-Spam-Status: No, score=-0.011 tagged_above=-999 required=5 + tests=[AWL=-0.000, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01] + 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 oBiu3v0Jkl2Y for ; + Tue, 7 Jun 2016 03:38:19 -0700 (PDT) +Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) + by arlo.cworth.org (Postfix) with ESMTPS id 78DCC6DE00DA + for ; Tue, 7 Jun 2016 03:38:19 -0700 (PDT) +Received: from remotemail by fethera.tethera.net with local (Exim 4.84) + (envelope-from ) + id 1bAEOc-0006LI-Gt; Tue, 07 Jun 2016 06:38:06 -0400 +Received: (nullmailer pid 17473 invoked by uid 1000); + Tue, 07 Jun 2016 10:38:06 -0000 +From: David Bremner +To: David Bremner , notmuch@notmuchmail.org +Subject: [PATCH] lib: fix definition of LIBNOTMUCH_CHECK_VERSION +Date: Tue, 7 Jun 2016 07:37:57 -0300 +Message-Id: <1465295877-17431-1-git-send-email-david@tethera.net> +X-Mailer: git-send-email 2.8.1 +In-Reply-To: <87lh2inyub.fsf@tesseract.cs.unb.ca> +References: <87lh2inyub.fsf@tesseract.cs.unb.ca> +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: Tue, 07 Jun 2016 10:38:27 -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 + +#include +#define foo (x) (x+1) + +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.8.1 +