From: David Goulet Date: Mon, 27 Aug 2012 16:49:35 +0000 (-0400) Subject: Add C++ support to API header files X-Git-Tag: v2.1.0-rc3~10 X-Git-Url: https://git.lttng.org/?a=commitdiff_plain;ds=inline;h=5168918c35a95e9d955fa4efb6533aaafe05b2e5;hp=d00c599e39ae45ec7c8e12e6bac6b5e58f08f817;p=lttng-tools.git Add C++ support to API header files Signed-off-by: David Goulet --- 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 */