From: Roger Meier Date: Tue, 4 Jun 2013 20:09:37 +0000 (+0200) Subject: THRIFT-1983 %z printf format is not available in Visual X-Git-Url: https://source.supwisdom.com/gerrit/gitweb?a=commitdiff_plain;h=f2b094f1f1a331c9bd92c6106683fbaa7191dc66;p=common%2Fthrift.git THRIFT-1983 %z printf format is not available in Visual Patch: Konrad Grochowski --- diff --git a/lib/cpp/src/thrift/server/TNonblockingServer.cpp b/lib/cpp/src/thrift/server/TNonblockingServer.cpp index 641f7145..69f0e555 100644 --- a/lib/cpp/src/thrift/server/TNonblockingServer.cpp +++ b/lib/cpp/src/thrift/server/TNonblockingServer.cpp @@ -64,6 +64,7 @@ #ifdef _MSC_VER #define PRIu32 "I32u" +#define PRIu64 "I64u" #endif namespace apache { namespace thrift { namespace server { @@ -478,9 +479,10 @@ void TNonblockingServer::TConnection::workSocket() { // Don't allow giant frame sizes. This prevents bad clients from // causing us to try and allocate a giant buffer. GlobalOutput.printf("TNonblockingServer: frame size too large " - "(%"PRIu32" > %zu) from client %s. remote side not " - "using TFramedTransport?", - readWant_, server_->getMaxFrameSize(), + "(%"PRIu32" > %"PRIu64") from client %s. " + "Remote side not using TFramedTransport?", + readWant_, + (uint64_t)server_->getMaxFrameSize(), tSocket_->getSocketInfo().c_str()); close(); return;