From 0ea67a24516d54c3e5e35df656fcdb1bd6e174b7 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 --- src/util/bdstring.cc | 2 +- src/util/bdstring.h | 11 +++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/util/bdstring.cc b/src/util/bdstring.cc index 1eab1bc..3870b70 100644 --- a/src/util/bdstring.cc +++ b/src/util/bdstring.cc @@ -25,7 +25,7 @@ #include #else #include -#include +#include #endif #include diff --git a/src/util/bdstring.h b/src/util/bdstring.h index 17cf74d..9c4dc94 100644 --- a/src/util/bdstring.h +++ b/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