summaryrefslogtreecommitdiffstats
path: root/libdivecomputer.h
diff options
context:
space:
mode:
authorGravatar Thiago Macieira <thiago@macieira.org>2013-10-05 12:11:46 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-10-05 13:59:59 -0700
commit5a139c934dcd5ee3514c04ac9dc3e1dcb0a13ff7 (patch)
tree180f6c14f05eb6fe7400caf2a1f534c6b6860373 /libdivecomputer.h
parent3e0ecb5ff6a95e1be8f22359048e4dfa85d165bc (diff)
downloadsubsurface-5a139c934dcd5ee3514c04ac9dc3e1dcb0a13ff7.tar.gz
Don't include headers under extern "C" unless we have to.
libxml headers include ICU headers and ICU has C++ code. If it detects __cplusplus, it will start declaring C++ templates and whatnot, which aren't allowed under extern "C". Signed-off-by: Thiago Macieira <thiago@macieira.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'libdivecomputer.h')
-rw-r--r--libdivecomputer.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/libdivecomputer.h b/libdivecomputer.h
index 4bb0239e9..07d965ef6 100644
--- a/libdivecomputer.h
+++ b/libdivecomputer.h
@@ -2,10 +2,6 @@
#define LIBDIVECOMPUTER_H
-#ifdef __cplusplus
-extern "C" {
-#endif
-
/* libdivecomputer */
#include <libdivecomputer/version.h>
#include <libdivecomputer/device.h>
@@ -14,6 +10,10 @@ extern "C" {
/* handling uemis Zurich SDA files */
#include "uemis.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* don't forget to include the UI toolkit specific display-XXX.h first
to get the definition of progressbar_t */
typedef struct device_data_t {