1 Return-Path: <tomi.ollila@iki.fi>
\r
2 X-Original-To: notmuch@notmuchmail.org
\r
3 Delivered-To: notmuch@notmuchmail.org
\r
4 Received: from localhost (localhost [127.0.0.1])
\r
5 by olra.theworths.org (Postfix) with ESMTP id 19C45431FBD
\r
6 for <notmuch@notmuchmail.org>; Thu, 7 Nov 2013 05:14:16 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]
\r
13 Received: from olra.theworths.org ([127.0.0.1])
\r
14 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
15 with ESMTP id S81In-yVBqkC for <notmuch@notmuchmail.org>;
\r
16 Thu, 7 Nov 2013 05:14:07 -0800 (PST)
\r
17 Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34])
\r
18 by olra.theworths.org (Postfix) with ESMTP id CEF75431FAE
\r
19 for <notmuch@notmuchmail.org>; Thu, 7 Nov 2013 05:14:06 -0800 (PST)
\r
20 Received: from guru.guru-group.fi (localhost [IPv6:::1])
\r
21 by guru.guru-group.fi (Postfix) with ESMTP id 3CED3100051;
\r
22 Thu, 7 Nov 2013 15:14:00 +0200 (EET)
\r
23 From: Tomi Ollila <tomi.ollila@iki.fi>
\r
24 To: Jani Nikula <jani@nikula.org>, notmuch@notmuchmail.org
\r
25 Subject: Re: [PATCH] lib: add library version check macro
\r
26 In-Reply-To: <1383764501-18973-1-git-send-email-jani@nikula.org>
\r
27 References: <1383764501-18973-1-git-send-email-jani@nikula.org>
\r
28 User-Agent: Notmuch/0.16+119~g219c55f (http://notmuchmail.org) Emacs/24.3.1
\r
29 (x86_64-unknown-linux-gnu)
\r
30 X-Face: HhBM'cA~<r"^Xv\KRN0P{vn'Y"Kd;zg_y3S[4)KSN~s?O\"QPoL
\r
31 $[Xv_BD:i/F$WiEWax}R(MPS`^UaptOGD`*/=@\1lKoVa9tnrg0TW?"r7aRtgk[F
\r
32 !)g;OY^,BjTbr)Np:%c_o'jj,Z
\r
33 Date: Thu, 07 Nov 2013 15:13:59 +0200
\r
34 Message-ID: <m2bo1w9wx4.fsf@guru.guru-group.fi>
\r
36 Content-Type: text/plain
\r
37 X-BeenThere: notmuch@notmuchmail.org
\r
38 X-Mailman-Version: 2.1.13
\r
40 List-Id: "Use and development of the notmuch mail system."
\r
41 <notmuch.notmuchmail.org>
\r
42 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
43 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
44 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
45 List-Post: <mailto:notmuch@notmuchmail.org>
\r
46 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
47 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
48 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
49 X-List-Received-Date: Thu, 07 Nov 2013 13:14:16 -0000
\r
51 On Wed, Nov 06 2013, Jani Nikula <jani@nikula.org> wrote:
\r
53 > There have been some plans for making build incompatible changes to
\r
54 > the library API. This is inconvenient, but it is much more so without
\r
55 > a way to easily conditional build against multiple versions of
\r
58 > The macro has been lifted from glib.
\r
66 > lib/notmuch.h | 24 ++++++++++++++++++++++++
\r
67 > 1 file changed, 24 insertions(+)
\r
69 > diff --git a/lib/notmuch.h b/lib/notmuch.h
\r
70 > index 9dab555..d109a2c 100644
\r
71 > --- a/lib/notmuch.h
\r
72 > +++ b/lib/notmuch.h
\r
73 > @@ -41,6 +41,30 @@ NOTMUCH_BEGIN_DECLS
\r
77 > +#define NOTMUCH_MAJOR_VERSION 0
\r
78 > +#define NOTMUCH_MINOR_VERSION 17
\r
79 > +#define NOTMUCH_MICRO_VERSION 0
\r
82 > + * Check the version of the notmuch library being compiled against.
\r
84 > + * Return true if the library being compiled against is of the
\r
85 > + * specified version or above. For example:
\r
87 > + * #if NOTMUCH_CHECK_VERSION(0, 18, 0)
\r
88 > + * (code requiring notmuch 0.18 or above)
\r
91 > + * NOTMUCH_CHECK_VERSION has been defined since version 0.17.0; you
\r
92 > + * can use #if !defined(NOTMUCH_CHECK_VERSION) to check for versions
\r
93 > + * prior to that.
\r
95 > +#define NOTMUCH_CHECK_VERSION (major, minor, micro) \
\r
96 > + (NOTMUCH_MAJOR_VERSION > (major) || \
\r
97 > + (NOTMUCH_MAJOR_VERSION == (major) && NOTMUCH_MINOR_VERSION > (minor)) || \
\r
98 > + (NOTMUCH_MAJOR_VERSION == (major) && NOTMUCH_MINOR_VERSION == (minor) && \
\r
99 > + NOTMUCH_MICRO_VERSION >= (micro)))
\r
101 > typedef int notmuch_bool_t;
\r
103 > /* Status codes used for the return values of most functions.
\r
107 > _______________________________________________
\r
108 > notmuch mailing list
\r
109 > notmuch@notmuchmail.org
\r
110 > http://notmuchmail.org/mailman/listinfo/notmuch
\r