src/common/{assert,macros}.h: wrap code in C++ guards
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Mon, 7 Dec 2020 19:21:47 +0000 (14:21 -0500)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Tue, 8 Dec 2020 15:01:45 +0000 (10:01 -0500)
Not strictly needed for `macros.h`, but adding it just in case.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Change-Id: I6d13ab5a062c6c5b1ecaa996c119a149d2487f0b
Reviewed-on: https://review.lttng.org/c/babeltrace/+/4504
Reviewed-by: Simon Marchi <simon.marchi@efficios.com>
Tested-by: jenkins <jenkins@lttng.org>
src/common/assert.h
src/common/macros.h

index 77c35e2e14700547de416270a8d37f43739d9a58..dd9b91276730c342c1ee174bc912c52240f4893f 100644 (file)
 
 #include "common/macros.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 BT_HIDDEN
 extern void bt_common_assert_failed(const char *file, int line,
                const char *func, const char *assertion)
@@ -56,4 +60,8 @@ extern void bt_common_assert_failed(const char *file, int line,
 # define BT_ASSERT_DBG_FUNC    __attribute__((unused))
 #endif /* BT_DEBUG_MODE */
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* BABELTRACE_ASSERT_INTERNAL_H */
index 718a3050ccb1b4b96b9a00cf84adeb35185bdae0..9014afc2c637d1b1df6eb31764c4815074ae03c3 100644 (file)
@@ -7,6 +7,10 @@
 #ifndef _BABELTRACE_INTERNAL_H
 #define _BABELTRACE_INTERNAL_H
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #define bt_max_t(type, a, b)   \
        ((type) (a) > (type) (b) ? (type) (a) : (type) (b))
 
@@ -71,4 +75,8 @@
        ((void) sizeof((void) (_expr1), (void) (_expr2),                \
                (void) (_expr3), (void) (_expr4), (void) (_expr5), 0))
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif
This page took 0.025054 seconds and 4 git commands to generate.