From d02f2087b9efa14b4afaa270dc1fec07931c598a Mon Sep 17 00:00:00 2001 From: paulc Date: Wed, 20 Jan 2016 10:23:35 +0000 Subject: [PATCH] Fixed a GCC 6 build error: C++11 requires a space between literal and string macro. git-svn-id: http://voip.null.ro/svn/yate@6084 acf43c95-373e-0410-b603-e72c3f656dc1 --- libs/yasn/asn.cpp | 2 +- libs/yscript/evaluator.cpp | 2 +- libs/yscript/javascript.cpp | 4 ++-- libs/yscript/jsobjects.cpp | 2 +- libs/ysig/sccp.cpp | 2 +- libs/ysig/tcap.cpp | 2 +- modules/javascript.cpp | 24 ++++++++++++------------ modules/server/cpuload.cpp | 7 ++++--- modules/server/ysnmpagent.cpp | 2 +- modules/sig/ss7_lnp_ansi.cpp | 13 +++++++------ modules/test/jsext.cpp | 2 +- 11 files changed, 32 insertions(+), 30 deletions(-) diff --git a/libs/yasn/asn.cpp b/libs/yasn/asn.cpp index 3e2434a2..30c15b8b 100644 --- a/libs/yasn/asn.cpp +++ b/libs/yasn/asn.cpp @@ -956,7 +956,7 @@ DataBlock ASNLib::encodeInteger(u_int64_t intVal, bool tagCheck) data.append(len); } data.append(contents); - XDebug(s_libName.c_str(),DebugAll,"::encodeInteger('"FMT64"') - encoded into %u bytes",intVal,data.length()); + XDebug(s_libName.c_str(),DebugAll,"::encodeInteger('" FMT64 "') - encoded into %u bytes",intVal,data.length()); return data; } diff --git a/libs/yscript/evaluator.cpp b/libs/yscript/evaluator.cpp index 128e07ca..aa798ae5 100644 --- a/libs/yscript/evaluator.cpp +++ b/libs/yscript/evaluator.cpp @@ -1345,7 +1345,7 @@ bool ExpEvaluator::runOperation(ObjList& stack, const ExpOperation& oper, GenObj bool ExpEvaluator::runFunction(ObjList& stack, const ExpOperation& oper, GenObject* context) const { - DDebug(this,DebugAll,"runFunction(%p,'%s' "FMT64", %p) ext=%p", + DDebug(this,DebugAll,"runFunction(%p,'%s' " FMT64 ", %p) ext=%p", &stack,oper.name().c_str(),oper.number(),context,(void*)m_extender); if (oper.name() == YSTRING("chr")) { String res; diff --git a/libs/yscript/javascript.cpp b/libs/yscript/javascript.cpp index 6f4fdd8e..668c1280 100644 --- a/libs/yscript/javascript.cpp +++ b/libs/yscript/javascript.cpp @@ -2592,7 +2592,7 @@ void JsCode::resolveObjectParams(JsObject* object, ObjList& stack, GenObject* co bool JsCode::runFunction(ObjList& stack, const ExpOperation& oper, GenObject* context) const { - DDebug(this,DebugAll,"JsCode::runFunction(%p,'%s' "FMT64", %p) ext=%p", + DDebug(this,DebugAll,"JsCode::runFunction(%p,'%s' " FMT64 ", %p) ext=%p", &stack,oper.name().c_str(),oper.number(),context,extender()); if (context) { ScriptRun* sr = static_cast(context); @@ -2750,7 +2750,7 @@ bool JsCode::callFunction(ObjList& stack, const ExpOperation& oper, GenObject* c { if (!(func && context)) return false; - XDebug(this,DebugInfo,"JsCode::callFunction(%p,"FMT64",%p) in %s'%s' this=%p", + XDebug(this,DebugInfo,"JsCode::callFunction(%p," FMT64 ",%p) in %s'%s' this=%p", &stack,oper.number(),context,(constr ? "constructor " : ""), func->toString().c_str(),thisObj); JsRunner* runner = static_cast(context); diff --git a/libs/yscript/jsobjects.cpp b/libs/yscript/jsobjects.cpp index 9024dc8c..ad280191 100644 --- a/libs/yscript/jsobjects.cpp +++ b/libs/yscript/jsobjects.cpp @@ -1295,7 +1295,7 @@ bool JsMath::runNative(ObjList& stack, const ExpOperation& oper, GenObject* cont JsObject* JsDate::runConstructor(ObjList& stack, const ExpOperation& oper, GenObject* context) { - XDebug(DebugAll,"JsDate::runConstructor '%s'("FMT64")",oper.name().c_str(),oper.number()); + XDebug(DebugAll,"JsDate::runConstructor '%s'(" FMT64 ")",oper.name().c_str(),oper.number()); ObjList args; JsObject* obj = 0; switch (extractArgs(stack,oper,context,args)) { diff --git a/libs/ysig/sccp.cpp b/libs/ysig/sccp.cpp index 40147e64..f074dee2 100644 --- a/libs/ysig/sccp.cpp +++ b/libs/ysig/sccp.cpp @@ -4429,7 +4429,7 @@ void SS7SCCP::printStatus(bool extended) return; m_management->subsystemsStatus(dest); m_management->routeStatus(dest); - Output("SCCP '%s' [%p] Time: "FMT64" Status:%s",debugName(),this,Time::msecNow(),dest.c_str()); + Output("SCCP '%s' [%p] Time: " FMT64 " Status:%s",debugName(),this,Time::msecNow(),dest.c_str()); } void SS7SCCP::notify(SS7Layer3* link, int sls) diff --git a/libs/ysig/tcap.cpp b/libs/ysig/tcap.cpp index 2fb37008..dc38db35 100644 --- a/libs/ysig/tcap.cpp +++ b/libs/ysig/tcap.cpp @@ -3289,7 +3289,7 @@ SS7TCAPTransactionITU::SS7TCAPTransactionITU(SS7TCAP* tcap, SS7TCAP::TCAPUserTra const String& transactID, NamedList& params, u_int64_t timeout, bool initLocal) : SS7TCAPTransaction(tcap,type,transactID,params,timeout,initLocal) { - DDebug(m_tcap,DebugAll,"SS7TCAPTransactionITU(tcap = '%s' [%p], transactID = %s, timeout="FMT64" ) created [%p]", + DDebug(m_tcap,DebugAll,"SS7TCAPTransactionITU(tcap = '%s' [%p], transactID = %s, timeout=" FMT64 " ) created [%p]", m_tcap->toString().c_str(),tcap,transactID.c_str(),timeout,this); } diff --git a/modules/javascript.cpp b/modules/javascript.cpp index 734c12bc..f22325d0 100644 --- a/modules/javascript.cpp +++ b/modules/javascript.cpp @@ -1540,7 +1540,7 @@ void JsEngine::initialize(ScriptContext* context, const char* name) bool JsShared::runNative(ObjList& stack, const ExpOperation& oper, GenObject* context) { - XDebug(&__plugin,DebugAll,"JsShared::runNative '%s'("FMT64")",oper.name().c_str(),oper.number()); + XDebug(&__plugin,DebugAll,"JsShared::runNative '%s'(" FMT64 ")",oper.name().c_str(),oper.number()); if (oper.name() == YSTRING("inc")) { ObjList args; switch (extractArgs(stack,oper,context,args)) { @@ -1657,7 +1657,7 @@ bool JsMessage::runAssign(ObjList& stack, const ExpOperation& oper, GenObject* c bool JsMessage::runNative(ObjList& stack, const ExpOperation& oper, GenObject* context) { - XDebug(&__plugin,DebugAll,"JsMessage::runNative '%s'("FMT64")",oper.name().c_str(),oper.number()); + XDebug(&__plugin,DebugAll,"JsMessage::runNative '%s'(" FMT64 ")",oper.name().c_str(),oper.number()); if (oper.name() == YSTRING("broadcast")) { if (oper.number() != 0) return false; @@ -2158,7 +2158,7 @@ void JsMessage::getResult(ObjList& stack, const ExpOperation& row, const ExpOper JsObject* JsMessage::runConstructor(ObjList& stack, const ExpOperation& oper, GenObject* context) { - XDebug(&__plugin,DebugAll,"JsMessage::runConstructor '%s'("FMT64")",oper.name().c_str(),oper.number()); + XDebug(&__plugin,DebugAll,"JsMessage::runConstructor '%s'(" FMT64 ")",oper.name().c_str(),oper.number()); ObjList args; switch (extractArgs(stack,oper,context,args)) { case 1: @@ -2291,7 +2291,7 @@ bool JsMessageQueue::matchesFilters(const NamedList& filters) bool JsFile::runNative(ObjList& stack, const ExpOperation& oper, GenObject* context) { - XDebug(&__plugin,DebugAll,"JsFile::runNative '%s'("FMT64")",oper.name().c_str(),oper.number()); + XDebug(&__plugin,DebugAll,"JsFile::runNative '%s'(" FMT64 ")",oper.name().c_str(),oper.number()); if (oper.name() == YSTRING("exists")) { if (oper.number() != 1) return false; @@ -2409,7 +2409,7 @@ void* JsConfigFile::getObject(const String& name) const bool JsConfigFile::runNative(ObjList& stack, const ExpOperation& oper, GenObject* context) { - XDebug(&__plugin,DebugAll,"JsConfigFile::runNative '%s'("FMT64")",oper.name().c_str(),oper.number()); + XDebug(&__plugin,DebugAll,"JsConfigFile::runNative '%s'(" FMT64 ")",oper.name().c_str(),oper.number()); ObjList args; if (oper.name() == YSTRING("name")) { switch (extractArgs(stack,oper,context,args)) { @@ -2591,7 +2591,7 @@ bool JsConfigFile::runNative(ObjList& stack, const ExpOperation& oper, GenObject JsObject* JsConfigFile::runConstructor(ObjList& stack, const ExpOperation& oper, GenObject* context) { - XDebug(&__plugin,DebugAll,"JsConfigFile::runConstructor '%s'("FMT64") [%p]",oper.name().c_str(),oper.number(),this); + XDebug(&__plugin,DebugAll,"JsConfigFile::runConstructor '%s'(" FMT64 ") [%p]",oper.name().c_str(),oper.number(),this); bool warn = false; const char* name = 0; ObjList args; @@ -2623,7 +2623,7 @@ void JsConfigFile::initialize(ScriptContext* context) bool JsConfigSection::runNative(ObjList& stack, const ExpOperation& oper, GenObject* context) { - XDebug(&__plugin,DebugAll,"JsConfigSection::runNative '%s'("FMT64")",oper.name().c_str(),oper.number()); + XDebug(&__plugin,DebugAll,"JsConfigSection::runNative '%s'(" FMT64 ")",oper.name().c_str(),oper.number()); ObjList args; if (oper.name() == YSTRING("configFile")) { if (extractArgs(stack,oper,context,args) != 0) @@ -2748,7 +2748,7 @@ bool JsConfigSection::runNative(ObjList& stack, const ExpOperation& oper, GenObj JsObject* JsHasher::runConstructor(ObjList& stack, const ExpOperation& oper, GenObject* context) { - XDebug(&__plugin,DebugAll,"JsHasher::runConstructor '%s'("FMT64") [%p]", + XDebug(&__plugin,DebugAll,"JsHasher::runConstructor '%s'(" FMT64 ") [%p]", oper.name().c_str(),oper.number(),this); ObjList args; if (extractArgs(stack,oper,context,args) != 1) @@ -2779,7 +2779,7 @@ void JsHasher::initialize(ScriptContext* context) bool JsHasher::runNative(ObjList& stack, const ExpOperation& oper, GenObject* context) { - XDebug(&__plugin,DebugAll,"JsHasher::runNative '%s'("FMT64") [%p]", + XDebug(&__plugin,DebugAll,"JsHasher::runNative '%s'(" FMT64 ") [%p]", oper.name().c_str(),oper.number(),this); if (oper.name() == YSTRING("update")) { if (!m_hasher) @@ -2878,7 +2878,7 @@ void* JsXML::getObject(const String& name) const bool JsXML::runNative(ObjList& stack, const ExpOperation& oper, GenObject* context) { - XDebug(&__plugin,DebugAll,"JsXML::runNative '%s'("FMT64")",oper.name().c_str(),oper.number()); + XDebug(&__plugin,DebugAll,"JsXML::runNative '%s'(" FMT64 ")",oper.name().c_str(),oper.number()); ObjList args; if (oper.name() == YSTRING("put")) { int argc = extractArgs(stack,oper,context,args); @@ -3130,7 +3130,7 @@ bool JsXML::runNative(ObjList& stack, const ExpOperation& oper, GenObject* conte JsObject* JsXML::runConstructor(ObjList& stack, const ExpOperation& oper, GenObject* context) { - XDebug(&__plugin,DebugAll,"JsXML::runConstructor '%s'("FMT64") [%p]",oper.name().c_str(),oper.number(),this); + XDebug(&__plugin,DebugAll,"JsXML::runConstructor '%s'(" FMT64 ") [%p]",oper.name().c_str(),oper.number(),this); JsXML* obj = 0; ObjList args; int n = extractArgs(stack,oper,context,args); @@ -3762,7 +3762,7 @@ ScriptContext* JsEngineWorker::getContext() bool JsChannel::runNative(ObjList& stack, const ExpOperation& oper, GenObject* context) { - XDebug(&__plugin,DebugAll,"JsChannel::runNative '%s'("FMT64")",oper.name().c_str(),oper.number()); + XDebug(&__plugin,DebugAll,"JsChannel::runNative '%s'(" FMT64 ")",oper.name().c_str(),oper.number()); if (oper.name() == YSTRING("id")) { if (oper.number()) return false; diff --git a/modules/server/cpuload.cpp b/modules/server/cpuload.cpp index 9a6edd4d..b9bfcb84 100644 --- a/modules/server/cpuload.cpp +++ b/modules/server/cpuload.cpp @@ -374,9 +374,10 @@ void Cpu::updateYateLoad() u_int64_t time = SysUsage::msecRunTime(SysUsage::WallTime); bool updateLoad = true; if (user < m_yateUser || ker < m_yateSystem || time < m_lastYateCheck) { - Debug(&s_module,DebugInfo,"Negative values for yate CPU update " - "cu = "FMT64U" lu="FMT64U" ck="FMT64U" lk="FMT64U" ct="FMT64U" lt="FMT64U" ", - user,m_yateUser,ker,m_yateSystem,time,m_lastYateCheck); + Debug(&s_module,DebugInfo,"Negative values for yate CPU update" + " cu = " FMT64U " lu=" FMT64U " ck=" FMT64U + " lk=" FMT64U " ct=" FMT64U " lt=" FMT64U, + user,m_yateUser,ker,m_yateSystem,time,m_lastYateCheck); updateLoad = false; } if (updateLoad && (m_yateUser != 0 || m_yateSystem != 0)) { diff --git a/modules/server/ysnmpagent.cpp b/modules/server/ysnmpagent.cpp index 90a6203f..daba9fb0 100644 --- a/modules/server/ysnmpagent.cpp +++ b/modules/server/ysnmpagent.cpp @@ -835,7 +835,7 @@ public: static DataBlock toNetworkOrder(u_int64_t val, unsigned int size) { - XDebug(&__plugin,DebugAll,"toNetworkOrder("FMT64")",val); + XDebug(&__plugin,DebugAll,"toNetworkOrder(" FMT64 ")",val); DataBlock res; for (unsigned int i = 0; i < size; i++) { DataBlock aux; diff --git a/modules/sig/ss7_lnp_ansi.cpp b/modules/sig/ss7_lnp_ansi.cpp index aa1c649e..c25b64b3 100644 --- a/modules/sig/ss7_lnp_ansi.cpp +++ b/modules/sig/ss7_lnp_ansi.cpp @@ -1465,8 +1465,9 @@ void LNPQuery::extractAddress(NamedList& params) BlockedCode::BlockedCode(const char* code, u_int64_t duration, u_int64_t gap, LNPClient::ACGCause cause) : m_code(code) { - Debug(&__plugin,DebugAll,"BlockedCode created [%p] - code '%s' blocked for "FMT64U" seconds with gap="FMT64U" seconds, cause=%s", - this,m_code.c_str(),duration,gap,lookup(cause,s_acgCauses,"")); + Debug(&__plugin,DebugAll,"BlockedCode created [%p] - code '%s' blocked for " FMT64U + " seconds with gap=" FMT64U " seconds, cause=%s", + this,m_code.c_str(),duration,gap,lookup(cause,s_acgCauses,"")); update(duration,gap,cause); } @@ -1478,15 +1479,15 @@ BlockedCode::~BlockedCode() void BlockedCode::resetGapInterval() { u_int64_t interval = (u_int64_t) (90.0 + (110 - 90) * ((double)Random::random() / (double)RAND_MAX)) / 100.0 * m_gap; - DDebug(&__plugin,DebugAll,"BlockedCode created [%p] - code '%s' has gap interval="FMT64" seconds",this,m_code.c_str(), - interval); + DDebug(&__plugin,DebugAll,"BlockedCode created [%p] - code '%s' has gap interval=" FMT64 + " seconds",this,m_code.c_str(),interval); m_gapExpiry = Time::secNow() + interval; } void BlockedCode::update(u_int64_t duration, u_int64_t gap, LNPClient::ACGCause cause) { - DDebug(&__plugin,DebugAll,"BlockedCode created [%p] - code '%s' update duration="FMT64" seconds, gap="FMT64" seconds",this,m_code.c_str(), - duration,gap); + DDebug(&__plugin,DebugAll,"BlockedCode created [%p] - code '%s' update duration=" FMT64 + " seconds, gap=" FMT64 " seconds",this,m_code.c_str(),duration,gap); m_cause = cause; m_duration = (unsigned int)duration; m_durationExpiry = Time::secNow() + duration; diff --git a/modules/test/jsext.cpp b/modules/test/jsext.cpp index 2d95777a..dc107fda 100644 --- a/modules/test/jsext.cpp +++ b/modules/test/jsext.cpp @@ -74,7 +74,7 @@ private: JsObject* JsExtObj::runConstructor(ObjList& stack, const ExpOperation& oper, GenObject* context) { - Debug(DebugAll,"JsExtObj::runConstructor '%s'("FMT64") [%p]",oper.name().c_str(),oper.number(),this); + Debug(DebugAll,"JsExtObj::runConstructor '%s'(" FMT64 ") [%p]",oper.name().c_str(),oper.number(),this); const char* val = 0; ObjList args; switch (extractArgs(stack,oper,context,args)) {