Sorry, I missed your patch and already committed a different fix. Please let me know if my fix has any issue.
We usually encompass the entire header file (except #include) with extern C by the way. Thanks, Mathieu ----- Original Message ----- > From: "Gerlando Falauto" <[email protected]> > To: [email protected] > Cc: "Gerlando Falauto" <[email protected]> > Sent: Tuesday, May 13, 2014 5:33:46 AM > Subject: [lttng-dev] [PATCH] tracef: add extern "C" wrapper > > Add an extern "C" wrapper so that tracef.h can be included > (and the tracef() function can be used) from C++ files, too. > > Signed-off-by: Gerlando Falauto <[email protected]> > --- > include/lttng/tracef.h | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/include/lttng/tracef.h b/include/lttng/tracef.h > index 16a984b..45d0587 100644 > --- a/include/lttng/tracef.h > +++ b/include/lttng/tracef.h > @@ -25,9 +25,17 @@ > > #include <lttng/lttng-ust-tracef.h> > > +#ifdef __cplusplus > +extern "C" { > +#endif > + > extern > void _lttng_ust_tracef(const char *fmt, ...); > > +#ifdef __cplusplus > +} > +#endif > + > #define tracef(fmt, ...) \ > do { \ > STAP_PROBEV(tracepoint_lttng_ust_tracef, event, ## > __VA_ARGS__); \ > -- > 1.8.0.1 > > > _______________________________________________ > lttng-dev mailing list > [email protected] > http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev > -- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com _______________________________________________ lttng-dev mailing list [email protected] http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
