From 5168918c35a95e9d955fa4efb6533aaafe05b2e5 Mon Sep 17 00:00:00 2001 From: David Goulet Date: Mon, 27 Aug 2012 12:49:35 -0400 Subject: [PATCH] Add C++ support to API header files Signed-off-by: David Goulet --- include/lttng/lttng-error.h | 8 ++++++++ include/lttng/lttng.h | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/include/lttng/lttng-error.h b/include/lttng/lttng-error.h index 0e1730a33..3c28d1603 100644 --- a/include/lttng/lttng-error.h +++ b/include/lttng/lttng-error.h @@ -25,6 +25,10 @@ #ifndef LTTNG_ERROR_H #define LTTNG_ERROR_H +#ifdef __cplusplus +extern "C" { +#endif + enum lttng_error_code { LTTNG_OK = 10, /* Ok */ LTTNG_ERR_UNK = 11, /* Unknown Error */ @@ -131,4 +135,8 @@ enum lttng_error_code { LTTNG_ERR_NR, /* Last element */ }; +#ifdef __cplusplus +} +#endif + #endif /* LTTNG_ERROR_H */ diff --git a/include/lttng/lttng.h b/include/lttng/lttng.h index dd5d936c5..a9aee7233 100644 --- a/include/lttng/lttng.h +++ b/include/lttng/lttng.h @@ -29,6 +29,10 @@ /* Error codes that can be returned by API calls */ #include +#ifdef __cplusplus +extern "C" { +#endif + /* * Event symbol length. Copied from LTTng kernel ABI. */ @@ -576,4 +580,8 @@ extern int lttng_disable_consumer(struct lttng_handle *handle); */ extern int lttng_health_check(enum lttng_health_component c); +#ifdef __cplusplus +} +#endif + #endif /* LTTNG_H */ -- 2.34.1