diff options
| author | David Bremner <david@tethera.net> | 2016-06-07 07:37:57 -0300 |
|---|---|---|
| committer | David Bremner <david@tethera.net> | 2016-06-30 17:49:29 +0200 |
| commit | ff9284db6ebec1e4cbd7528d63da3cdf4ea9ddff (patch) | |
| tree | 8fd8125ada7487d2a60b435d220ae0c9e3a57c25 | |
| parent | f2886b80c1addc3d358ba910a4eebf76ba74c00b (diff) | |
lib: fix definition of LIBNOTMUCH_CHECK_VERSION
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 <stdio.h>
#define foo (x) (x+1)
int main(int argc, char **argv){
printf("%d\n",foo(1));
}
| -rw-r--r-- | lib/notmuch.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/notmuch.h b/lib/notmuch.h index a43e167c..24944f0b 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) && \ |
