summaryrefslogtreecommitdiff
path: root/cpp/src/Ice
diff options
context:
space:
mode:
authorBernard Normier <bernard@zeroc.com>2019-07-27 11:03:39 -0500
committerBernard Normier <bernard@zeroc.com>2019-07-27 11:03:39 -0500
commit2a805c98cd8c72a49bcdec2e9c8b7999a22ed475 (patch)
tree2e363946568c8094b7c94c6811ec5bdb33c45c5b /cpp/src/Ice
parentFix Ice version in package-lock.json (diff)
downloadice-2a805c98cd8c72a49bcdec2e9c8b7999a22ed475.tar.bz2
ice-2a805c98cd8c72a49bcdec2e9c8b7999a22ed475.tar.xz
ice-2a805c98cd8c72a49bcdec2e9c8b7999a22ed475.zip
Visibility fixes for xlC
Diffstat (limited to 'cpp/src/Ice')
-rw-r--r--cpp/src/Ice/LoggerI.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/cpp/src/Ice/LoggerI.cpp b/cpp/src/Ice/LoggerI.cpp
index 44842207a3d..9552f9b0041 100644
--- a/cpp/src/Ice/LoggerI.cpp
+++ b/cpp/src/Ice/LoggerI.cpp
@@ -152,7 +152,14 @@ Ice::LoggerI::write(const string& message, bool indent)
// If file size + message size exceeds max size we archive the log file,
// but we do not archive empty files or truncate messages.
//
+#ifdef __IBMCPP__
+ // xlC bug: without this work-around, we get a link error when compiling with
+ // optimization and -qvisibility=hidden
+ assert(_out.good());
+ size_t sz = static_cast<size_t>(_out.rdbuf()->pubseekoff(0, _out.cur, _out.out));
+#else
size_t sz = static_cast<size_t>(_out.tellp());
+#endif
if(sz > 0 && sz + message.size() >= _sizeMax && _nextRetry <= IceUtil::Time::now())
{
string basename = _file;