lib: optionally silence Xapian deprecation warnings
authorDavid Bremner <david@tethera.net>
Wed, 5 Oct 2016 11:34:34 +0000 (08:34 -0300)
committerDavid Bremner <david@tethera.net>
Tue, 15 Nov 2016 11:47:55 +0000 (07:47 -0400)
This is not ideal, but the new API is not available in Xapian 1.2.x, and
it seems to soon to depend on Xapian >= 1.4

configure
lib/database-private.h

index 2a0ce9eb41568c017b95e3066e4c21ce2869d87d..f0fc466eead546174868fb79d753e7d1b138060b 100755 (executable)
--- a/configure
+++ b/configure
@@ -1142,6 +1142,7 @@ COMMON_CONFIGURE_CFLAGS = \\
        -DSTD_GETPWUID=\$(STD_GETPWUID)                         \\
        -DSTD_ASCTIME=\$(STD_ASCTIME)                           \\
        -DHAVE_XAPIAN_COMPACT=\$(HAVE_XAPIAN_COMPACT)           \\
+       -DSILENCE_XAPIAN_DEPRECATION_WARNINGS                   \\
        -DHAVE_XAPIAN_FIELD_PROCESSOR=\$(HAVE_XAPIAN_FIELD_PROCESSOR) \\
        -DHAVE_XAPIAN_DB_RETRY_LOCK=\$(HAVE_XAPIAN_DB_RETRY_LOCK) \\
        -DUTIL_BYTE_ORDER=\$(UTIL_BYTE_ORDER)
index ca71a92f6c26893d92cc1435d0713d4cc69e5d96..ccc1e9a17fbddde4839fc754a7f781d799146469 100644 (file)
 
 #include "notmuch-private.h"
 
+#ifdef SILENCE_XAPIAN_DEPRECATION_WARNINGS
+#define XAPIAN_DEPRECATED(D) D
+#endif
+
 #include <xapian.h>
 
 #pragma GCC visibility push(hidden)