summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2016-05-09 23:03:21 +0200
committerJose <jose@zeroc.com>2016-05-09 23:03:21 +0200
commit3e685a12bfd92a4ffd86c808ba0f34df907de5c8 (patch)
tree2ef8fb8e028d4f14d1516a98f2a18dbadb46a5d7 /cpp/src
parentUpdate to latest gradle builder (diff)
parentAIX port (diff)
downloadice-3e685a12bfd92a4ffd86c808ba0f34df907de5c8.tar.bz2
ice-3e685a12bfd92a4ffd86c808ba0f34df907de5c8.tar.xz
ice-3e685a12bfd92a4ffd86c808ba0f34df907de5c8.zip
Merge remote-tracking branch 'origin/3.6'
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/Glacier2CryptPermissionsVerifier/CryptPermissionsVerifierI.cpp40
-rw-r--r--cpp/src/Ice/ConnectionFactory.cpp98
-rw-r--r--cpp/src/Ice/ConnectionFactory.h2
-rw-r--r--cpp/src/Ice/Instance.cpp2
-rw-r--r--cpp/src/Ice/Network.cpp20
-rw-r--r--cpp/src/Ice/PluginManagerI.cpp6
-rw-r--r--cpp/src/Ice/RetryQueue.cpp2
-rw-r--r--cpp/src/Ice/StreamSocket.cpp22
-rw-r--r--cpp/src/Ice/WSConnector.h4
-rw-r--r--cpp/src/IceBox/ServiceManagerI.cpp5
-rw-r--r--cpp/src/IceGrid/Activator.cpp2
-rw-r--r--cpp/src/IceGridLib/PluginFacadeI.cpp12
-rw-r--r--cpp/src/Slice/Python.cpp4
-rw-r--r--cpp/src/Slice/PythonUtil.cpp10
-rw-r--r--cpp/src/Slice/RubyUtil.cpp10
-rw-r--r--cpp/src/slice2cpp/Gen.cpp18
-rw-r--r--cpp/src/slice2cs/Gen.cpp27
-rw-r--r--cpp/src/slice2js/Gen.cpp10
18 files changed, 148 insertions, 146 deletions
diff --git a/cpp/src/Glacier2CryptPermissionsVerifier/CryptPermissionsVerifierI.cpp b/cpp/src/Glacier2CryptPermissionsVerifier/CryptPermissionsVerifierI.cpp
index af9630db528..9bc1ea38a5c 100644
--- a/cpp/src/Glacier2CryptPermissionsVerifier/CryptPermissionsVerifierI.cpp
+++ b/cpp/src/Glacier2CryptPermissionsVerifier/CryptPermissionsVerifierI.cpp
@@ -14,8 +14,9 @@
#include <IceUtil/FileUtil.h>
#include <IceUtil/StringUtil.h>
#include <IceUtil/InputUtil.h>
+#include <IceUtil/Mutex.h>
-#if defined(__GLIBC__)
+#if defined(__GLIBC__) || defined(_AIX)
# include <crypt.h>
#elif defined(__APPLE__)
# include <CoreFoundation/CoreFoundation.h>
@@ -44,6 +45,7 @@ public:
private:
const map<string, string> _passwords;
+ IceUtil::Mutex _cryptMutex; // for old thread-unsafe crypt()
};
class CryptPermissionsVerifierPlugin : public Ice::Plugin
@@ -51,12 +53,12 @@ class CryptPermissionsVerifierPlugin : public Ice::Plugin
public:
CryptPermissionsVerifierPlugin(const CommunicatorPtr&);
-
+
virtual void initialize();
virtual void destroy();
private:
-
+
CommunicatorPtr _communicator;
};
@@ -165,7 +167,7 @@ CryptPermissionsVerifierI::checkPermissions(const string& userId, const string&
struct crypt_data data;
data.initialized = 0;
return p->second == crypt_r(password.c_str(), salt.c_str(), &data);
-#elif defined(__APPLE__) || defined(_WIN32)
+#elif defined(__APPLE__) || defined(_WIN32)
//
// Pbkdf2 string format:
//
@@ -174,7 +176,7 @@ CryptPermissionsVerifierI::checkPermissions(const string& userId, const string&
//
size_t beg = 0;
size_t end = 0;
-
+
//
// Determine the digest algorithm
//
@@ -373,7 +375,7 @@ CryptPermissionsVerifierI::checkPermissions(const string& userId, const string&
vector<BYTE> passwordBuffer(password.begin(), password.end());
- DWORD status = BCryptDeriveKeyPBKDF2(algorithmHandle, &passwordBuffer[0],
+ DWORD status = BCryptDeriveKeyPBKDF2(algorithmHandle, &passwordBuffer[0],
static_cast<DWORD>(passwordBuffer.size()),
&saltBuffer[0], saltLength, rounds,
&checksumBuffer1[0], static_cast<DWORD>(checksumLength), 0);
@@ -388,7 +390,7 @@ CryptPermissionsVerifierI::checkPermissions(const string& userId, const string&
DWORD checksumBuffer2Length = checksumLength;
vector<BYTE> checksumBuffer2(checksumLength);
- if(!CryptStringToBinary(checksum.c_str(), static_cast<DWORD>(checksum.size()),
+ if(!CryptStringToBinary(checksum.c_str(), static_cast<DWORD>(checksum.size()),
CRYPT_STRING_BASE64, &checksumBuffer2[0],
&checksumBuffer2Length, 0, 0))
{
@@ -397,7 +399,17 @@ CryptPermissionsVerifierI::checkPermissions(const string& userId, const string&
return checksumBuffer1 == checksumBuffer2;
# endif
#else
-# error Password hashing not implemented
+ // Fallback to plain crypt() - DES-style
+
+ if(p->second.size() != 13)
+ {
+ return false;
+ }
+ string salt = p->second.substr(0, 2);
+
+ IceUtil::Mutex::Lock lock(_cryptMutex);
+ return p->second == crypt(password.c_str(), salt.c_str());
+
#endif
}
@@ -412,13 +424,13 @@ CryptPermissionsVerifierPlugin::initialize()
{
const string prefix = "Glacier2CryptPermissionsVerifier.";
const PropertyDict props = _communicator->getProperties()->getPropertiesForPrefix(prefix);
-
+
if(!props.empty())
{
ObjectAdapterPtr adapter = _communicator->createObjectAdapter(""); // colloc-only adapter
-
+
// Each prop represents a property to set + the associated password file
-
+
for(PropertyDict::const_iterator p = props.begin(); p != props.end(); ++p)
{
string name = p->first.substr(prefix.size());
@@ -426,9 +438,9 @@ CryptPermissionsVerifierPlugin::initialize()
id.name = IceUtil::generateUUID();
id.category = "Glacier2CryptPermissionsVerifier";
ObjectPrx prx = adapter->add(new CryptPermissionsVerifierI(retrievePasswordMap(p->second)), id);
- _communicator->getProperties()->setProperty(name, _communicator->proxyToString(prx));
+ _communicator->getProperties()->setProperty(name, _communicator->proxyToString(prx));
}
-
+
adapter->activate();
}
}
@@ -463,7 +475,7 @@ createCryptPermissionsVerifier(const CommunicatorPtr& communicator, const string
out << "Plugin " << name << ": too many arguments";
return 0;
}
-
+
return new CryptPermissionsVerifierPlugin(communicator);
}
diff --git a/cpp/src/Ice/ConnectionFactory.cpp b/cpp/src/Ice/ConnectionFactory.cpp
index 78370ed4b50..43dc7f670ce 100644
--- a/cpp/src/Ice/ConnectionFactory.cpp
+++ b/cpp/src/Ice/ConnectionFactory.cpp
@@ -875,26 +875,10 @@ IceInternal::OutgoingConnectionFactory::ConnectCallback::connectionStartFailed(c
const LocalException& ex)
{
assert(_iter != _connectors.end());
-
- if(_observer)
- {
- _observer->failed(ex.ice_id());
- _observer->detach();
- }
-
- _factory->handleConnectionException(ex, _hasMore || _iter != _connectors.end() - 1);
- if(dynamic_cast<const Ice::CommunicatorDestroyedException*>(&ex)) // No need to continue.
- {
- _factory->finishGetConnection(_connectors, ex, shared_from_this());
- }
- else if(++_iter != _connectors.end()) // Try the next connector.
+ if(connectionStartFailedImpl(ex))
{
nextConnector();
}
- else
- {
- _factory->finishGetConnection(_connectors, ex, shared_from_this());
- }
}
//
@@ -1020,39 +1004,46 @@ IceInternal::OutgoingConnectionFactory::ConnectCallback::getConnection()
void
IceInternal::OutgoingConnectionFactory::ConnectCallback::nextConnector()
{
- Ice::ConnectionIPtr connection;
- try
+ while(true)
{
- const CommunicatorObserverPtr& obsv = _factory->_instance->initializationData().observer;
- if(obsv)
+ try
{
- _observer = obsv->getConnectionEstablishmentObserver(_iter->endpoint, _iter->connector->toString());
- if(_observer)
+ const CommunicatorObserverPtr& obsv = _factory->_instance->initializationData().observer;
+ if(obsv)
{
- _observer->attach();
+ _observer = obsv->getConnectionEstablishmentObserver(_iter->endpoint, _iter->connector->toString());
+ if(_observer)
+ {
+ _observer->attach();
+ }
}
- }
- assert(_iter != _connectors.end());
+ assert(_iter != _connectors.end());
- if(_instance->traceLevels()->network >= 2)
- {
- Trace out(_instance->initializationData().logger, _instance->traceLevels()->networkCat);
- out << "trying to establish " << _iter->endpoint->protocol() << " connection to "
- << _iter->connector->toString();
+ if(_instance->traceLevels()->network >= 2)
+ {
+ Trace out(_instance->initializationData().logger, _instance->traceLevels()->networkCat);
+ out << "trying to establish " << _iter->endpoint->protocol() << " connection to "
+ << _iter->connector->toString();
+ }
+ Ice::ConnectionIPtr connection = _factory->createConnection(_iter->connector->connect(), *_iter);
+ connection->start(ICE_SHARED_FROM_THIS);
}
- connection = _factory->createConnection(_iter->connector->connect(), *_iter);
- connection->start(ICE_SHARED_FROM_THIS);
- }
- catch(const Ice::LocalException& ex)
- {
- if(_instance->traceLevels()->network >= 2)
+ catch(const Ice::LocalException& ex)
{
- Trace out(_instance->initializationData().logger, _instance->traceLevels()->networkCat);
- out << "failed to establish " << _iter->endpoint->protocol() << " connection to "
- << _iter->connector->toString() << "\n" << ex;
+ if(_instance->traceLevels()->network >= 2)
+ {
+ Trace out(_instance->initializationData().logger, _instance->traceLevels()->networkCat);
+ out << "failed to establish " << _iter->endpoint->protocol() << " connection to "
+ << _iter->connector->toString() << "\n" << ex;
+ }
+
+ if(connectionStartFailedImpl(ex))
+ {
+ continue; // More connectors to try, continue.
+ }
}
- connectionStartFailed(connection, ex);
+ break;
}
}
@@ -1111,6 +1102,31 @@ IceInternal::OutgoingConnectionFactory::ConnectCallback::operator<(const Connect
return this < &rhs;
}
+bool
+IceInternal::OutgoingConnectionFactory::ConnectCallback::connectionStartFailedImpl(const Ice::LocalException& ex)
+{
+ if(_observer)
+ {
+ _observer->failed(ex.ice_id());
+ _observer->detach();
+ }
+
+ _factory->handleConnectionException(ex, _hasMore || _iter != _connectors.end() - 1);
+ if(dynamic_cast<const Ice::CommunicatorDestroyedException*>(&ex)) // No need to continue.
+ {
+ _factory->finishGetConnection(_connectors, ex, ICE_SHARED_FROM_THIS);
+ }
+ else if(++_iter != _connectors.end()) // Try the next connector.
+ {
+ return true;
+ }
+ else
+ {
+ _factory->finishGetConnection(_connectors, ex, ICE_SHARED_FROM_THIS);
+ }
+ return false;
+}
+
void
IceInternal::IncomingConnectionFactory::activate()
{
diff --git a/cpp/src/Ice/ConnectionFactory.h b/cpp/src/Ice/ConnectionFactory.h
index 1838d213d51..578c728559b 100644
--- a/cpp/src/Ice/ConnectionFactory.h
+++ b/cpp/src/Ice/ConnectionFactory.h
@@ -119,6 +119,8 @@ private:
private:
+ bool connectionStartFailedImpl(const Ice::LocalException&);
+
const InstancePtr _instance;
const OutgoingConnectionFactoryPtr _factory;
const std::vector<EndpointIPtr> _endpoints;
diff --git a/cpp/src/Ice/Instance.cpp b/cpp/src/Ice/Instance.cpp
index a5d3d74f206..089a8ee0871 100644
--- a/cpp/src/Ice/Instance.cpp
+++ b/cpp/src/Ice/Instance.cpp
@@ -63,7 +63,7 @@
# include <sys/types.h>
#endif
-#if defined(__linux) || defined(__sun)
+#if defined(__linux) || defined(__sun) || defined(_AIX)
# include <grp.h> // for initgroups
#endif
diff --git a/cpp/src/Ice/Network.cpp b/cpp/src/Ice/Network.cpp
index 402471be2ef..d1da40b9b51 100644
--- a/cpp/src/Ice/Network.cpp
+++ b/cpp/src/Ice/Network.cpp
@@ -1286,7 +1286,6 @@ IceInternal::fdToLocalAddress(SOCKET fd, Address& addr)
socklen_t len = static_cast<socklen_t>(sizeof(sockaddr_storage));
if(getsockname(fd, &addr.sa, &len) == SOCKET_ERROR)
{
- closeSocketNoThrow(fd);
SocketException ex(__FILE__, __LINE__);
ex.error = getSocketErrno();
throw ex;
@@ -1320,7 +1319,6 @@ IceInternal::fdToRemoteAddress(SOCKET fd, Address& addr)
}
else
{
- closeSocketNoThrow(fd);
SocketException ex(__FILE__, __LINE__);
ex.error = getSocketErrno();
throw ex;
@@ -2339,12 +2337,20 @@ repeatConnect:
// port as the server).
//
Address localAddr;
- fdToLocalAddress(fd, localAddr);
- if(compareAddress(addr, localAddr) == 0)
+ try
{
- ConnectionRefusedException ex(__FILE__, __LINE__);
- ex.error = 0; // No appropriate errno
- throw ex;
+ fdToLocalAddress(fd, localAddr);
+ if(compareAddress(addr, localAddr) == 0)
+ {
+ ConnectionRefusedException ex(__FILE__, __LINE__);
+ ex.error = 0; // No appropriate errno
+ throw ex;
+ }
+ }
+ catch(const LocalException&)
+ {
+ closeSocketNoThrow(fd);
+ throw;
}
#endif
return true;
diff --git a/cpp/src/Ice/PluginManagerI.cpp b/cpp/src/Ice/PluginManagerI.cpp
index e7b75bd4ade..e70012fd391 100644
--- a/cpp/src/Ice/PluginManagerI.cpp
+++ b/cpp/src/Ice/PluginManagerI.cpp
@@ -479,6 +479,12 @@ Ice::PluginManagerI::loadPlugin(const string& name, const string& pluginSpec, St
ex.reason = out.str();
throw ex;
}
+
+#ifdef __IBMCPP__
+ // xlC warns when casting a void* to function pointer
+# pragma report(disable, "1540-0216")
+#endif
+
factory = reinterpret_cast<PluginFactory>(sym);
}
diff --git a/cpp/src/Ice/RetryQueue.cpp b/cpp/src/Ice/RetryQueue.cpp
index 9c81aa1bead..f74988f65a9 100644
--- a/cpp/src/Ice/RetryQueue.cpp
+++ b/cpp/src/Ice/RetryQueue.cpp
@@ -116,7 +116,7 @@ IceInternal::RetryQueue::destroy()
Lock sync(*this);
assert(_instance);
- set<RetryTaskPtr>::const_iterator p = _requests.begin();
+ set<RetryTaskPtr>::iterator p = _requests.begin();
while(p != _requests.end())
{
if(_instance->timer()->cancel(*p))
diff --git a/cpp/src/Ice/StreamSocket.cpp b/cpp/src/Ice/StreamSocket.cpp
index e11d5709aa4..fa3761f5fa0 100644
--- a/cpp/src/Ice/StreamSocket.cpp
+++ b/cpp/src/Ice/StreamSocket.cpp
@@ -32,10 +32,18 @@ StreamSocket::StreamSocket(const ProtocolInstancePtr& instance,
#ifndef ICE_USE_IOCP
if(doConnect(_fd, _proxy ? _proxy->getAddress() : _addr, sourceAddr))
{
- _state = StateConnected;
+ _state = _proxy ? StateProxyWrite : StateConnected;
}
#endif
- _desc = fdToString(_fd, _proxy, _addr);
+ try
+ {
+ _desc = fdToString(_fd, _proxy, _addr);
+ }
+ catch(const Ice::Exception&)
+ {
+ closeSocketNoThrow(_fd);
+ throw;
+ }
}
StreamSocket::StreamSocket(const ProtocolInstancePtr& instance, SOCKET fd) :
@@ -48,7 +56,15 @@ StreamSocket::StreamSocket(const ProtocolInstancePtr& instance, SOCKET fd) :
#endif
{
init();
- _desc = fdToString(fd);
+ try
+ {
+ _desc = fdToString(fd);
+ }
+ catch(const Ice::Exception&)
+ {
+ closeSocketNoThrow(fd);
+ throw;
+ }
}
StreamSocket::~StreamSocket()
diff --git a/cpp/src/Ice/WSConnector.h b/cpp/src/Ice/WSConnector.h
index 17c002a8db0..3c26a06ab45 100644
--- a/cpp/src/Ice/WSConnector.h
+++ b/cpp/src/Ice/WSConnector.h
@@ -33,12 +33,12 @@ public:
virtual bool operator!=(const Connector&) const;
virtual bool operator<(const Connector&) const;
-private:
WSConnector(const ProtocolInstancePtr&, const ConnectorPtr&, const std::string&, int, const std::string&);
virtual ~WSConnector();
- friend class WSEndpoint;
+private:
+
const ProtocolInstancePtr _instance;
const ConnectorPtr _delegate;
const std::string _host;
diff --git a/cpp/src/IceBox/ServiceManagerI.cpp b/cpp/src/IceBox/ServiceManagerI.cpp
index 31f176bd46f..e7b4a7fac99 100644
--- a/cpp/src/IceBox/ServiceManagerI.cpp
+++ b/cpp/src/IceBox/ServiceManagerI.cpp
@@ -670,6 +670,11 @@ IceBox::ServiceManagerI::start(const string& service, const string& entryPoint,
//
// Invoke the factory function.
//
+#ifdef __IBMCPP__
+ // xlC warns when casting a void* to function pointer
+# pragma report(disable, "1540-0216")
+#endif
+
SERVICE_FACTORY factory = reinterpret_cast<SERVICE_FACTORY>(sym);
try
{
diff --git a/cpp/src/IceGrid/Activator.cpp b/cpp/src/IceGrid/Activator.cpp
index 3127ed47f83..b9aafc93d7b 100644
--- a/cpp/src/IceGrid/Activator.cpp
+++ b/cpp/src/IceGrid/Activator.cpp
@@ -37,7 +37,7 @@
#endif
#endif
-#if defined(__linux) || defined(__sun)
+#if defined(__linux) || defined(__sun) || defined(_AIX)
# include <grp.h> // for initgroups
#endif
diff --git a/cpp/src/IceGridLib/PluginFacadeI.cpp b/cpp/src/IceGridLib/PluginFacadeI.cpp
index 6bcd4f92358..0b1748a852b 100644
--- a/cpp/src/IceGridLib/PluginFacadeI.cpp
+++ b/cpp/src/IceGridLib/PluginFacadeI.cpp
@@ -18,7 +18,7 @@ using namespace IceGrid;
namespace
{
-RegistryPluginFacadePtr pluginFacade;
+RegistryPluginFacade* pluginFacade = 0;
};
@@ -38,5 +38,13 @@ IceGrid::getRegistryPluginFacade()
void
IceGrid::setRegistryPluginFacade(const RegistryPluginFacadePtr& facade)
{
- pluginFacade = facade;
+ if(pluginFacade)
+ {
+ pluginFacade->__decRef();
+ }
+ pluginFacade = facade.get();
+ if(pluginFacade)
+ {
+ pluginFacade->__incRef();
+ }
}
diff --git a/cpp/src/Slice/Python.cpp b/cpp/src/Slice/Python.cpp
index 09a17a93b4a..4343456efb2 100644
--- a/cpp/src/Slice/Python.cpp
+++ b/cpp/src/Slice/Python.cpp
@@ -665,6 +665,10 @@ Slice::Python::compile(int argc, char* argv[])
}
FileTracker::instance()->addFile(file);
+ //
+ // Python magic comment to set the file encoding, it must be first or second line
+ //
+ out << "# -*- coding: utf-8 -*-\n";
printHeader(out);
printGeneratedHeader(out, base + ".ice", "#");
//
diff --git a/cpp/src/Slice/PythonUtil.cpp b/cpp/src/Slice/PythonUtil.cpp
index 699bd08ef97..eb637229825 100644
--- a/cpp/src/Slice/PythonUtil.cpp
+++ b/cpp/src/Slice/PythonUtil.cpp
@@ -518,17 +518,7 @@ Slice::Python::CodeVisitor::visitClassDefStart(const ClassDefPtr& p)
//
ClassList allBases = p->allBases();
StringList ids;
-#if defined(__IBMCPP__) && defined(NDEBUG)
-//
-// VisualAge C++ 6.0 does not see that ClassDef is a Contained,
-// when inlining is on. The code below issues a warning: better
-// than an error!
-//
- transform(allBases.begin(), allBases.end(), back_inserter(ids),
- IceUtil::constMemFun<string,ClassDef>(&Contained::scoped));
-#else
transform(allBases.begin(), allBases.end(), back_inserter(ids), IceUtil::constMemFun(&Contained::scoped));
-#endif
StringList other;
other.push_back(scoped);
other.push_back("::Ice::Object");
diff --git a/cpp/src/Slice/RubyUtil.cpp b/cpp/src/Slice/RubyUtil.cpp
index 97f82811dcf..d262e416f05 100644
--- a/cpp/src/Slice/RubyUtil.cpp
+++ b/cpp/src/Slice/RubyUtil.cpp
@@ -245,17 +245,7 @@ Slice::Ruby::CodeVisitor::visitClassDefStart(const ClassDefPtr& p)
//
ClassList allBases = p->allBases();
StringList ids;
-#if defined(__IBMCPP__) && defined(NDEBUG)
-//
-// VisualAge C++ 6.0 does not see that ClassDef is a Contained,
-// when inlining is on. The code below issues a warning: better
-// than an error!
-//
- transform(allBases.begin(), allBases.end(), back_inserter(ids),
- IceUtil::constMemFun<string,ClassDef>(&Contained::scoped));
-#else
transform(allBases.begin(), allBases.end(), back_inserter(ids), IceUtil::constMemFun(&Contained::scoped));
-#endif
StringList other;
other.push_back(scoped);
other.push_back("::Ice::Object");
diff --git a/cpp/src/slice2cpp/Gen.cpp b/cpp/src/slice2cpp/Gen.cpp
index 0203ff1f965..ff29afac5d8 100644
--- a/cpp/src/slice2cpp/Gen.cpp
+++ b/cpp/src/slice2cpp/Gen.cpp
@@ -2726,16 +2726,7 @@ Slice::Gen::ObjectVisitor::visitClassDefStart(const ClassDefPtr& p)
ClassList allBases = p->allBases();
StringList ids;
-#if defined(__IBMCPP__) && defined(NDEBUG)
-//
-// VisualAge C++ 6.0 does not see that ClassDef is a Contained,
-// when inlining is on. The code below issues a warning: better
-// than an error!
-//
- transform(allBases.begin(), allBases.end(), back_inserter(ids), ::IceUtil::constMemFun<string,ClassDef>(&Contained::scoped));
-#else
transform(allBases.begin(), allBases.end(), back_inserter(ids), ::IceUtil::constMemFun(&Contained::scoped));
-#endif
StringList other;
other.push_back(p->scoped());
other.push_back("::Ice::Object");
@@ -2849,16 +2840,9 @@ Slice::Gen::ObjectVisitor::visitClassDefEnd(const ClassDefPtr& p)
if(!allOps.empty())
{
StringList allOpNames;
-#if defined(__IBMCPP__) && defined(NDEBUG)
-//
-// See comment for transform above
-//
- transform(allOps.begin(), allOps.end(), back_inserter(allOpNames),
- ::IceUtil::constMemFun<string,Operation>(&Contained::name));
-#else
transform(allOps.begin(), allOps.end(), back_inserter(allOpNames),
::IceUtil::constMemFun(&Contained::name));
-#endif
+
allOpNames.push_back("ice_id");
allOpNames.push_back("ice_ids");
allOpNames.push_back("ice_isA");
diff --git a/cpp/src/slice2cs/Gen.cpp b/cpp/src/slice2cs/Gen.cpp
index 98f7ccd3be6..29f89889873 100644
--- a/cpp/src/slice2cs/Gen.cpp
+++ b/cpp/src/slice2cs/Gen.cpp
@@ -415,18 +415,7 @@ Slice::CsVisitor::writeDispatchAndMarshalling(const ClassDefPtr& p)
StringList ids;
ClassList bases = p->bases();
bool hasBaseClass = !bases.empty() && !bases.front()->isInterface();
-
-#if defined(__IBMCPP__) && defined(NDEBUG)
- //
- // VisualAge C++ 6.0 does not see that ClassDef is a Contained,
- // when inlining is on. The code below issues a warning: better
- // than an error!
- //
- transform(allBases.begin(), allBases.end(), back_inserter(ids), constMemFun<string,ClassDef>(&Contained::scoped));
-#else
transform(allBases.begin(), allBases.end(), back_inserter(ids), constMemFun(&Contained::scoped));
-#endif
-
StringList other;
other.push_back(p->scoped());
other.push_back("::Ice::Object");
@@ -831,14 +820,7 @@ Slice::CsVisitor::writeDispatchAndMarshalling(const ClassDefPtr& p)
if(!allOps.empty() || (!p->isInterface() && !hasBaseClass))
{
StringList allOpNames;
-#if defined(__IBMCPP__) && defined(NDEBUG)
- //
- // See comment for transform above
- //
- transform(allOps.begin(), allOps.end(), back_inserter(allOpNames), constMemFun<string,Operation>(&Contained::name));
-#else
transform(allOps.begin(), allOps.end(), back_inserter(allOpNames), constMemFun(&Contained::name));
-#endif
allOpNames.push_back("ice_id");
allOpNames.push_back("ice_ids");
allOpNames.push_back("ice_isA");
@@ -5428,16 +5410,7 @@ Slice::Gen::HelperVisitor::visitClassDefStart(const ClassDefPtr& p)
string scoped = p->scoped();
ClassList allBases = p->allBases();
StringList ids;
-#if defined(__IBMCPP__) && defined(NDEBUG)
- //
- // VisualAge C++ 6.0 does not see that ClassDef is a Contained,
- // when inlining is on. The code below issues a warning: better
- // than an error!
- //
- transform(allBases.begin(), allBases.end(), back_inserter(ids), ::IceUtil::constMemFun<string,ClassDef>(&Contained::scoped));
-#else
transform(allBases.begin(), allBases.end(), back_inserter(ids), ::IceUtil::constMemFun(&Contained::scoped));
-#endif
StringList other;
other.push_back(p->scoped());
other.push_back("::Ice::Object");
diff --git a/cpp/src/slice2js/Gen.cpp b/cpp/src/slice2js/Gen.cpp
index 573d0180c67..9e55b8b65f2 100644
--- a/cpp/src/slice2js/Gen.cpp
+++ b/cpp/src/slice2js/Gen.cpp
@@ -1294,17 +1294,7 @@ Slice::Gen::TypesVisitor::visitClassDefStart(const ClassDefPtr& p)
_out << ", undefined";
}
-#if defined(__IBMCPP__) && defined(NDEBUG)
- //
- // VisualAge C++ 6.0 does not see that ClassDef is a Contained,
- // when inlining is on. The code below issues a warning: better
- // than an error!
- //
- transform(allBases.begin(), allBases.end(), back_inserter(ids),
- ::IceUtil::constMemFun<string,ClassDef>(&Contained::scoped));
-#else
transform(allBases.begin(), allBases.end(), back_inserter(ids), ::IceUtil::constMemFun(&Contained::scoped));
-#endif
StringList other;
other.push_back(scoped);
other.push_back("::Ice::Object");