--- /dev/null
+Return-Path: <too@guru-group.fi>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by arlo.cworth.org (Postfix) with ESMTP id 34B366DE01F7\r
+ for <notmuch@notmuchmail.org>; Tue, 1 Mar 2016 11:30:08 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at cworth.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0.307\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0.307 tagged_above=-999 required=5 tests=[AWL=0.316, \r
+ HEADER_FROM_DIFFERENT_DOMAINS=0.001, T_RP_MATCHES_RCVD=-0.01]\r
+ autolearn=disabled\r
+Received: from arlo.cworth.org ([127.0.0.1])\r
+ by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id WyoYyzqGJ8ST for <notmuch@notmuchmail.org>;\r
+ Tue, 1 Mar 2016 11:30:05 -0800 (PST)\r
+Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34])\r
+ by arlo.cworth.org (Postfix) with ESMTP id 8E5606DE00DF\r
+ for <notmuch@notmuchmail.org>; Tue, 1 Mar 2016 11:30:05 -0800 (PST)\r
+Received: by guru.guru-group.fi (Postfix, from userid 501)\r
+ id C676A1001A7; Tue, 1 Mar 2016 21:30:09 +0200 (EET)\r
+From: Tomi Ollila <tomi.ollila@iki.fi>\r
+To: notmuch@notmuchmail.org\r
+Cc: tomi.ollila@iki.fi\r
+Subject: [PATCH v2] lib: NOTMUCH_DEPRECATED macro also for older compilers\r
+Date: Tue, 1 Mar 2016 21:30:07 +0200\r
+Message-Id: <1456860607-3523-1-git-send-email-tomi.ollila@iki.fi>\r
+X-Mailer: git-send-email 2.6.4\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.20\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <https://notmuchmail.org/mailman/options/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch/>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <https://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Tue, 01 Mar 2016 19:30:08 -0000\r
+\r
+Some compilers (older than gcc 4.5 and clang 2.9) do support\r
+__attribute__ ((deprecated)) but not\r
+__attribute__ ((deprecated("message"))).\r
+\r
+Check if clang version is at least 3.0, or gcc version\r
+is at least 4.5 to define NOTMUCH_DEPRECATED as the\r
+latter variant above. Otherwise define NOTMUCH_DEPRECATED\r
+as the former variant above.\r
+\r
+For a bit simpler implementation clang 2.9 is not included\r
+to use the newer variant. It is just one release, and the\r
+older one works fine. Clang 3.0 was released around 2011-11\r
+and gcc 5.1 2015-04-22 (therefore newer macro for gcc 4.5+)\r
+---\r
+\r
+V2 of id:1439303834-27030-1-git-send-email-tomi.ollila@iki.fi\r
+-- without the namespace problem (and somewhat better commit message).\r
+\r
+ lib/notmuch.h | 9 +++++++++\r
+ 1 file changed, 9 insertions(+)\r
+\r
+diff --git a/lib/notmuch.h b/lib/notmuch.h\r
+index 310a8b8a3132..cb46fc057d3e 100644\r
+--- a/lib/notmuch.h\r
++++ b/lib/notmuch.h\r
+@@ -59,8 +59,17 @@ NOTMUCH_BEGIN_DECLS\r
+ #define LIBNOTMUCH_MINOR_VERSION 3\r
+ #define LIBNOTMUCH_MICRO_VERSION 0\r
+ \r
++\r
++#if defined (__clang_major__) && __clang_major__ >= 3 \\r
++ || defined (__GNUC__) && __GNUC__ >= 5 \\r
++ || defined (__GNUC__) && __GNUC__ == 4 && __GNUC_MINOR__ >= 5\r
+ #define NOTMUCH_DEPRECATED(major,minor) \\r
+ __attribute__ ((deprecated ("function deprecated as of libnotmuch " #major "." #minor)))\r
++#else\r
++#define NOTMUCH_DEPRECATED(major,minor) __attribute__ ((deprecated))\r
++#endif\r
++\r
++\r
+ #endif /* __DOXYGEN__ */\r
+ \r
+ /**\r
+-- \r
+2.6.4\r
+\r