From b68f3b78c73b30e0860781e43cd30cece778360a Mon Sep 17 00:00:00 2001 From: Bernard Normier Date: Fri, 2 Aug 2019 19:25:38 -0500 Subject: Better work-around for xlC visibility bug --- cpp/src/IceSSL/Util.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'cpp/src/IceSSL/Util.cpp') diff --git a/cpp/src/IceSSL/Util.cpp b/cpp/src/IceSSL/Util.cpp index b0216df5bc7..940c5e1449c 100755 --- a/cpp/src/IceSSL/Util.cpp +++ b/cpp/src/IceSSL/Util.cpp @@ -20,6 +20,12 @@ #include +#ifdef __IBMCPP__ +// Work-around for xlC visibility bug +// See "ifstream::tellg visibility error" thread on IBM xlC forum +extern template class std::fpos; +#endif + using namespace std; using namespace Ice; using namespace IceInternal; @@ -118,12 +124,7 @@ IceSSL::readFile(const string& file, vector& buffer) } is.seekg(0, is.end); -#ifdef __IBMCPP__ - // xlC bug. See src/Ice/LoggerI.cpp - buffer.resize(static_cast(is.rdbuf()->pubseekoff(0, is.cur, is.in))); -#else buffer.resize(static_cast(is.tellg())); -#endif is.seekg(0, is.beg); if(!buffer.empty()) -- cgit v1.2.3