From ede890417ef51c6d5a4f4ee2d4cc65bfcaf2300a Mon Sep 17 00:00:00 2001 From: drbob Date: Tue, 19 Jun 2012 10:36:48 +0000 Subject: [PATCH] Changes to make libbitdht compile on OSX. - changed => - put #ifdef __cplusplus protection in bdstring.h so it can be used by C modules. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@5231 b45a01b8-16f6-495d-af2f-9b41ad6348cc --- libbitdht/src/util/bdstring.cc | 2 +- libbitdht/src/util/bdstring.h | 11 +++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/libbitdht/src/util/bdstring.cc b/libbitdht/src/util/bdstring.cc index 1eab1bc70..3870b70d6 100644 --- a/libbitdht/src/util/bdstring.cc +++ b/libbitdht/src/util/bdstring.cc @@ -25,7 +25,7 @@ #include #else #include -#include +#include #endif #include diff --git a/libbitdht/src/util/bdstring.h b/libbitdht/src/util/bdstring.h index 17cf74d2a..9c4dc94aa 100644 --- a/libbitdht/src/util/bdstring.h +++ b/libbitdht/src/util/bdstring.h @@ -22,8 +22,6 @@ * Boston, MA 02110-1301, USA. ****************************************************************/ -#include - #ifdef WIN32 // for proper handling of %ll #define bd_snprintf __mingw_snprintf @@ -33,7 +31,12 @@ #define bd_fprintf fprintf #endif -int bd_sprintf(std::string &str, const char *fmt, ...); -int bd_sprintf_append(std::string &str, const char *fmt, ...); +#ifdef __cplusplus + // These definitions are only available for C++ Modules. + #include + + int bd_sprintf(std::string &str, const char *fmt, ...); + int bd_sprintf_append(std::string &str, const char *fmt, ...); +#endif #endif