From e9b6f6c88b7713369a514a6ccb3a15e312ac9f56 Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Sun, 13 Oct 2013 22:43:19 +0200 Subject: [PATCH] lt_debug: use C linkage, allows usage from non-C++ code --- common/Makefile.am | 2 +- common/{lt_debug.cpp => lt_debug.c} | 0 common/lt_debug.h | 6 ++++++ 3 files changed, 7 insertions(+), 1 deletion(-) rename common/{lt_debug.cpp => lt_debug.c} (100%) diff --git a/common/Makefile.am b/common/Makefile.am index f44757c..918a268 100644 --- a/common/Makefile.am +++ b/common/Makefile.am @@ -4,5 +4,5 @@ AM_CXXFLAGS = -fno-rtti -fno-exceptions -fno-strict-aliasing libcommon_la_SOURCES = \ ca.cpp \ - lt_debug.cpp \ + lt_debug.c \ proc_tools.c diff --git a/common/lt_debug.cpp b/common/lt_debug.c similarity index 100% rename from common/lt_debug.cpp rename to common/lt_debug.c diff --git a/common/lt_debug.h b/common/lt_debug.h index 69a451a..4512bab 100644 --- a/common/lt_debug.h +++ b/common/lt_debug.h @@ -21,10 +21,16 @@ #define HAL_DEBUG_RECORD 7 #define HAL_DEBUG_ALL ((1<<8)-1) +#ifdef __cplusplus +extern "C" { +#endif extern int debuglevel; void hal_set_threadname(const char *name); void _lt_debug(int facility, const void *, const char *fmt, ...) __attribute__ ((format (printf, 3, 4))); void _lt_info(int facility, const void *, const char *fmt, ...) __attribute__ ((format (printf, 3, 4))); void lt_debug_init(void); +#ifdef __cplusplus +} +#endif #endif