Recently, commits to fix SDT issues with extern C
(https://bugs.lttng.org/issues/597) brougt in compile errors when the
tracepoint is defined in the same file where the tracepoint provider is
created.
This was due to the presence of extern C guards in tracepoint-event.h, a
header dedicated to tracepoint probe provider compilation. After commits
"Tracepoint probes don't need extern C", it should have gone away. This
is the main fix done by this patch.
This patch also adds missing extern C guards in ust-error.h and
ust-events.h.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
* SOFTWARE.
*/
-#ifdef __cplusplus
-extern "C" {
-#endif
-
#ifdef TRACEPOINT_CREATE_PROBES
#define __tp_stringify1(x) #x
#define TRACEPOINT_CREATE_PROBES
#endif /* TRACEPOINT_CREATE_PROBES */
-
-#ifdef __cplusplus
-}
-#endif
#include <unistd.h>
#include <lttng/ust-abi.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/*
* ustcomm error code.
*/
*/
extern const char *lttng_ust_strerror(int code);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _LTTNG_UST_ERROR_H */
#include <lttng/ust-endian.h>
#include <float.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#define LTTNG_UST_UUID_LEN 16
/*
struct cds_list_head *lttng_get_probe_list_head(void);
int lttng_session_active(void);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _LTTNG_UST_EVENTS_H */