aboutsummaryrefslogtreecommitdiff
path: root/util/gmime-extra.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/gmime-extra.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/gmime-extra.h')
-rw-r--r--util/gmime-extra.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/util/gmime-extra.h b/util/gmime-extra.h
index ca822b8c..5d8c52f7 100644
--- a/util/gmime-extra.h
+++ b/util/gmime-extra.h
@@ -1,11 +1,13 @@
#ifndef _GMIME_EXTRA_H
#define _GMIME_EXTRA_H
#include <gmime/gmime.h>
-
-GMimeStream *g_mime_stream_stdout_new(void);
-
#include <talloc.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+GMimeStream *g_mime_stream_stdout_new(void);
#if (GMIME_MAJOR_VERSION < 3)
@@ -100,4 +102,8 @@ gint64 g_mime_utils_header_decode_date_unix (const char *date);
*/
const char * g_mime_certificate_get_valid_userid (GMimeCertificate *cert);
+#ifdef __cplusplus
+}
+#endif
+
#endif