aboutsummaryrefslogtreecommitdiff
path: root/util/xutil.h
diff options
context:
space:
mode:
authorDavid Bremner <david@tethera.net>2019-03-02 16:26:06 -0400
committerDavid Bremner <david@tethera.net>2019-03-11 22:26:50 -0300
commit152b6cac5d496aaad816d20d7b2286e9ac73207d (patch)
treeb3796f575398e2588d102b327572265e342afd47 /util/xutil.h
parent9f7e851263b96acacc9ea542e9f5d837563fea05 (diff)
util: make remaining headers includable from C++
libnotmuch_util.a is supposed to be usable from the library and the CLI, but much the library is compiled as C++. Add in appropriate wrapping to prevent symbol mangling. These wrappers already existed in string-util.h; it seems better to be consistent.
Diffstat (limited to 'util/xutil.h')
-rw-r--r--util/xutil.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/util/xutil.h b/util/xutil.h
index 4829f33c..e2707000 100644
--- a/util/xutil.h
+++ b/util/xutil.h
@@ -25,6 +25,10 @@
#include <sys/types.h>
#include <regex.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* xutil.c */
void *
xcalloc (size_t nmemb, size_t size);
@@ -49,4 +53,8 @@ int
xregexec (const regex_t *preg, const char *string,
size_t nmatch, regmatch_t pmatch[], int eflags);
+#ifdef __cplusplus
+}
+#endif
+
#endif