[Pkg-voip-commits] [bctoolbox] 13/57: fix compilation errors due to C++11 specific code being used in C++(old) programs.
daniel at gnoutcheff.name
daniel at gnoutcheff.name
Thu Mar 30 04:31:31 UTC 2017
This is an automated email from the git hooks/post-receive script.
gnoutchd-guest pushed a commit to branch debian/sid
in repository bctoolbox.
commit 90e8a0b4710925f1e6f381d655e4a77edece09f1
Author: Simon Morlat <simon.morlat at linphone.org>
Date: Sat Nov 19 11:05:37 2016 +0100
fix compilation errors due to C++11 specific code being used in C++(old) programs.
---
configure.ac | 3 +++
include/bctoolbox/logging.h | 6 +++++-
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index 2d18d5e..b9aa0c3 100755
--- a/configure.ac
+++ b/configure.ac
@@ -166,6 +166,9 @@ AC_CHECK_HEADER(mbedtls/ssl.h, [
CPPFLAGS=$CPPFLAGS_save
LIBS=$LIBS_save
+AC_CHECK_LIB(dl, dladdr)
+
+
AM_CONDITIONAL(ENABLE_MBEDTLS, test "$mbdetls_found" = "true")
if test "$mbedtls_found" = "false" ; then
diff --git a/include/bctoolbox/logging.h b/include/bctoolbox/logging.h
index ac3dfc8..cc63f72 100644
--- a/include/bctoolbox/logging.h
+++ b/include/bctoolbox/logging.h
@@ -208,12 +208,14 @@ namespace bctoolbox {
}
}
+#if __cplusplus > 199711L /*if compiled with C++11 support*/
+
#include <ostream>
struct pumpstream : public std::ostringstream {
const std::string mDomain;
const BctbxLogLevel level;
- pumpstream(std::string domain, BctbxLogLevel l) : mDomain(domain), level(l) {}
+ pumpstream(const std::string &domain, BctbxLogLevel l) : mDomain(domain), level(l) {}
~pumpstream() {
bctbx_log(mDomain.empty()?NULL:mDomain.c_str(), level, "%s", str().c_str());
@@ -237,6 +239,8 @@ if (bctbx_log_level_enabled((domain), (thelevel))) \
#define BCTBX_SLOGW(DOMAIN) BCTBX_SLOG(DOMAIN, BCTBX_LOG_WARNING)
#define BCTBX_SLOGE(DOMAIN) BCTBX_SLOG(DOMAIN, BCTBX_LOG_ERROR)
+#endif /*c++11*/
+
#endif
#endif
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-voip/bctoolbox.git
More information about the Pkg-voip-commits
mailing list