summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/Freeze/Makefile.mak4
-rw-r--r--cpp/src/FreezeScript/DumpDB.cpp3
-rw-r--r--cpp/src/FreezeScript/Makefile.mak4
-rw-r--r--cpp/src/FreezeScript/transformdb.cpp3
-rw-r--r--cpp/src/Glacier2/Glacier2Router.cpp30
-rw-r--r--cpp/src/Glacier2/Makefile.mak6
-rw-r--r--cpp/src/Ice/ConnectionFactory.cpp3
-rw-r--r--cpp/src/Ice/Direct.cpp64
-rw-r--r--cpp/src/Ice/Incoming.cpp181
-rw-r--r--cpp/src/Ice/IncomingAsync.cpp53
-rw-r--r--cpp/src/Ice/Makefile.mak6
-rw-r--r--cpp/src/Ice/Network.cpp8
-rw-r--r--cpp/src/Ice/OutgoingAsync.cpp7
-rw-r--r--cpp/src/Ice/Proxy.cpp24
-rw-r--r--cpp/src/Ice/RouterInfo.cpp3
-rw-r--r--cpp/src/Ice/Service.cpp3
-rw-r--r--cpp/src/Ice/TraceUtil.cpp2
-rw-r--r--cpp/src/IceBox/Admin.cpp3
-rw-r--r--cpp/src/IceBox/Makefile.mak4
-rw-r--r--cpp/src/IceBox/Service.cpp3
-rw-r--r--cpp/src/IceBox/ServiceManagerI.cpp3
-rw-r--r--cpp/src/IceGrid/AdapterCache.cpp3
-rw-r--r--cpp/src/IceGrid/Client.cpp3
-rw-r--r--cpp/src/IceGrid/Database.cpp3
-rw-r--r--cpp/src/IceGrid/IceGridRegistry.cpp3
-rw-r--r--cpp/src/IceGrid/LocatorI.cpp25
-rw-r--r--cpp/src/IceGrid/Makefile.mak8
-rw-r--r--cpp/src/IceGrid/NodeI.cpp3
-rw-r--r--cpp/src/IceGrid/RegistryI.cpp12
-rw-r--r--cpp/src/IceGrid/ServerCache.cpp2
-rw-r--r--cpp/src/IceGrid/ServerI.cpp2
-rw-r--r--cpp/src/IceGridLib/Makefile.mak4
-rw-r--r--cpp/src/IcePatch2/Calc.cpp3
-rw-r--r--cpp/src/IcePatch2/Client.cpp3
-rw-r--r--cpp/src/IcePatch2/Makefile.mak4
-rw-r--r--cpp/src/IcePatch2/Server.cpp3
-rw-r--r--cpp/src/IcePatch2/Util.cpp2
-rw-r--r--cpp/src/IceSSL/Makefile.mak6
-rw-r--r--cpp/src/IceStorm/Admin.cpp3
-rw-r--r--cpp/src/IceStorm/Makefile.mak4
-rw-r--r--cpp/src/IceStorm/Subscriber.cpp3
-rw-r--r--cpp/src/IceUtil/Cond.cpp4
-rw-r--r--cpp/src/IceUtil/Makefile.mak4
-rw-r--r--cpp/src/IceUtil/StringUtil.cpp5
-rw-r--r--cpp/src/IceUtil/Thread.cpp2
-rw-r--r--cpp/src/IceXML/Makefile.mak4
-rw-r--r--cpp/src/Slice/CPlusPlusUtil.cpp3
-rw-r--r--cpp/src/Slice/Makefile.mak4
-rw-r--r--cpp/src/iceserviceinstall/Install.cpp3
-rw-r--r--cpp/src/iceserviceinstall/Makefile.mak4
-rw-r--r--cpp/src/iceserviceinstall/ServiceInstaller.cpp6
-rw-r--r--cpp/src/slice2cpp/Gen.cpp9
-rw-r--r--cpp/src/slice2cpp/Main.cpp3
-rw-r--r--cpp/src/slice2cpp/Makefile.mak4
-rw-r--r--cpp/src/slice2cs/Main.cpp3
-rw-r--r--cpp/src/slice2cs/Makefile.mak4
-rw-r--r--cpp/src/slice2docbook/Main.cpp3
-rw-r--r--cpp/src/slice2docbook/Makefile.mak4
-rw-r--r--cpp/src/slice2freeze/Main.cpp3
-rw-r--r--cpp/src/slice2freeze/Makefile.mak4
-rw-r--r--cpp/src/slice2freezej/Main.cpp3
-rw-r--r--cpp/src/slice2freezej/Makefile.mak4
-rw-r--r--cpp/src/slice2html/Main.cpp3
-rw-r--r--cpp/src/slice2html/Makefile.mak4
-rw-r--r--cpp/src/slice2java/Main.cpp3
-rw-r--r--cpp/src/slice2java/Makefile.mak4
-rw-r--r--cpp/src/slice2py/Main.cpp3
-rw-r--r--cpp/src/slice2py/Makefile.mak4
-rw-r--r--cpp/src/slice2rb/Main.cpp3
-rw-r--r--cpp/src/slice2rb/Makefile.mak4
70 files changed, 377 insertions, 250 deletions
diff --git a/cpp/src/Freeze/Makefile.mak b/cpp/src/Freeze/Makefile.mak
index 237d0d21580..f138f75bcb4 100644
--- a/cpp/src/Freeze/Makefile.mak
+++ b/cpp/src/Freeze/Makefile.mak
@@ -57,7 +57,7 @@ LINKWITH = $(LIBS) $(DB_LIBS)
PDBFLAGS = /pdb:$(DLLNAME:.dll=.pdb)
!endif
-!if "$(CPP_COMPILER)" == "BCC2007"
+!if "$(BCPLUSPLUS)" == "yes"
RES_FILE = ,, Freeze.res
!else
RES_FILE = Freeze.res
@@ -106,7 +106,7 @@ install:: all
copy $(DLLNAME) $(install_bindir)
-!if "$(CPP_COMPILER)" == "BCC2007" && "$(OPTIMIZE)" != "yes"
+!if "$(BCPLUSPLUS)" == "yes" && "$(OPTIMIZE)" != "yes"
install:: all
copy $(DLLNAME:.dll=.tds) $(install_bindir)
diff --git a/cpp/src/FreezeScript/DumpDB.cpp b/cpp/src/FreezeScript/DumpDB.cpp
index e5958d57059..bf377926f8b 100644
--- a/cpp/src/FreezeScript/DumpDB.cpp
+++ b/cpp/src/FreezeScript/DumpDB.cpp
@@ -160,6 +160,9 @@ run(int argc, char** argv, const Ice::CommunicatorPtr& communicator)
vector<string> args;
try
{
+#if defined(__BCPLUSPLUS__) && (__BCPLUSPLUS__ >= 0x0600)
+ IceUtil::DummyBCC dummy;
+#endif
args = opts.parse(argc, (const char**)argv);
}
catch(const IceUtilInternal::BadOptException& e)
diff --git a/cpp/src/FreezeScript/Makefile.mak b/cpp/src/FreezeScript/Makefile.mak
index 8f72c15194b..fb4cdcbb46c 100644
--- a/cpp/src/FreezeScript/Makefile.mak
+++ b/cpp/src/FreezeScript/Makefile.mak
@@ -47,7 +47,7 @@ TPDBFLAGS = /pdb:$(TRANSFORMDB:.exe=.pdb)
DPDBFLAGS = /pdb:$(DUMPDB:.exe=.pdb)
!endif
-!if "$(CPP_COMPILER)" == "BCC2007"
+!if "$(BCPLUSPLUS)" == "yes"
TRES_FILE = ,, TransformDB.res
DRES_FILE = ,, DumpDB.res
!else
@@ -91,7 +91,7 @@ install:: all
copy $(DUMPDB) $(install_bindir)
-!if "$(CPP_COMPILER)" == "BCC2007" && "$(OPTIMIZE)" != "yes"
+!if "$(BCPLUSPLUS)" == "yes" && "$(OPTIMIZE)" != "yes"
install:: all
copy $(TRANSFORMDB:.exe=.tds) $(install_bindir)
diff --git a/cpp/src/FreezeScript/transformdb.cpp b/cpp/src/FreezeScript/transformdb.cpp
index 432cf673029..98ebebb0537 100644
--- a/cpp/src/FreezeScript/transformdb.cpp
+++ b/cpp/src/FreezeScript/transformdb.cpp
@@ -259,6 +259,9 @@ run(int argc, char** argv, const Ice::CommunicatorPtr& communicator)
vector<string> args;
try
{
+#if defined(__BCPLUSPLUS__) && (__BCPLUSPLUS__ >= 0x0600)
+ IceUtil::DummyBCC dummy;
+#endif
args = opts.parse(argc, (const char**)argv);
}
catch(const IceUtilInternal::BadOptException& e)
diff --git a/cpp/src/Glacier2/Glacier2Router.cpp b/cpp/src/Glacier2/Glacier2Router.cpp
index b86bc645cef..81f0e9d063e 100644
--- a/cpp/src/Glacier2/Glacier2Router.cpp
+++ b/cpp/src/Glacier2/Glacier2Router.cpp
@@ -105,6 +105,9 @@ Glacier2::RouterService::start(int argc, char* argv[])
vector<string> args;
try
{
+#if defined(__BCPLUSPLUS__) && (__BCPLUSPLUS__ >= 0x0600)
+ IceUtil::DummyBCC dummy;
+#endif
args = opts.parse(argc, (const char**)argv);
}
catch(const IceUtilInternal::BadOptException& e)
@@ -196,6 +199,9 @@ Glacier2::RouterService::start(int argc, char* argv[])
{
try
{
+#if defined(__BCPLUSPLUS__) && (__BCPLUSPLUS__ >= 0x0600)
+ IceUtil::DummyBCC dummy;
+#endif
obj = communicator()->propertyToProxy(verifierProperty);
}
catch(const Ice::ProxyParseException&)
@@ -234,6 +240,9 @@ Glacier2::RouterService::start(int argc, char* argv[])
{
try
{
+#if defined(__BCPLUSPLUS__) && (__BCPLUSPLUS__ >= 0x0600)
+ IceUtil::DummyBCC dummy;
+#endif
verifier = PermissionsVerifierPrx::checkedCast(obj);
if(!verifier)
{
@@ -302,6 +311,9 @@ Glacier2::RouterService::start(int argc, char* argv[])
ObjectPrx obj;
try
{
+#if defined(__BCPLUSPLUS__) && (__BCPLUSPLUS__ >= 0x0600)
+ IceUtil::DummyBCC dummy;
+#endif
obj = communicator()->propertyToProxy(sessionManagerProperty);
}
catch(const Ice::Exception& ex)
@@ -313,6 +325,9 @@ Glacier2::RouterService::start(int argc, char* argv[])
}
try
{
+#if defined(__BCPLUSPLUS__) && (__BCPLUSPLUS__ >= 0x0600)
+ IceUtil::DummyBCC dummy;
+#endif
sessionManager = SessionManagerPrx::checkedCast(obj);
if(!sessionManager)
{
@@ -352,6 +367,9 @@ Glacier2::RouterService::start(int argc, char* argv[])
{
try
{
+#if defined(__BCPLUSPLUS__) && (__BCPLUSPLUS__ >= 0x0600)
+ IceUtil::DummyBCC dummy;
+#endif
obj = communicator()->propertyToProxy(sslVerifierProperty);
}
catch(const Ice::ProxyParseException&)
@@ -392,6 +410,9 @@ Glacier2::RouterService::start(int argc, char* argv[])
{
try
{
+#if defined(__BCPLUSPLUS__) && (__BCPLUSPLUS__ >= 0x0600)
+ IceUtil::DummyBCC dummy;
+#endif
sslVerifier = SSLPermissionsVerifierPrx::checkedCast(obj);
if(!sslVerifier)
{
@@ -424,6 +445,9 @@ Glacier2::RouterService::start(int argc, char* argv[])
ObjectPrx obj;
try
{
+#if defined(__BCPLUSPLUS__) && (__BCPLUSPLUS__ >= 0x0600)
+ IceUtil::DummyBCC dummy;
+#endif
obj = communicator()->propertyToProxy(sslSessionManagerProperty);
}
catch(const Ice::Exception& ex)
@@ -435,6 +459,9 @@ Glacier2::RouterService::start(int argc, char* argv[])
}
try
{
+#if defined(__BCPLUSPLUS__) && (__BCPLUSPLUS__ >= 0x0600)
+ IceUtil::DummyBCC dummy;
+#endif
sslSessionManager = SSLSessionManagerPrx::checkedCast(obj);
if(!sslSessionManager)
{
@@ -469,6 +496,9 @@ Glacier2::RouterService::start(int argc, char* argv[])
//
try
{
+#if defined(__BCPLUSPLUS__) && (__BCPLUSPLUS__ >= 0x0600)
+ IceUtil::DummyBCC dummy;
+#endif
_instance = new Instance(communicator(), clientAdapter, serverAdapter);
}
catch(const Ice::InitializationException& ex)
diff --git a/cpp/src/Glacier2/Makefile.mak b/cpp/src/Glacier2/Makefile.mak
index e9d2253afb1..dbe652d05ae 100644
--- a/cpp/src/Glacier2/Makefile.mak
+++ b/cpp/src/Glacier2/Makefile.mak
@@ -45,7 +45,7 @@ SDIR = $(slicedir)\Glacier2
CPPFLAGS = -I.. $(CPPFLAGS) -DWIN32_LEAN_AND_MEAN
LINKWITH = $(LIBS) $(OPENSSL_LIBS) glacier2$(LIBSUFFIX).lib icessl$(LIBSUFFIX).lib
-!if "$(CPP_COMPILER)" != "BCC2007"
+!if "$(BCPLUSPLUS)" != "yes"
LINKWITH = $(LINKWITH) ws2_32.lib
!endif
@@ -54,7 +54,7 @@ PDBFLAGS = /pdb:$(DLLNAME:.dll=.pdb)
RPDBFLAGS = /pdb:$(ROUTER:.exe=.pdb)
!endif
-!if "$(CPP_COMPILER)" == "BCC2007"
+!if "$(BCPLUSPLUS)" == "yes"
RES_FILE = ,, Glacier2.res
RRES_FILE = ,, Glacier2Router.res
!else
@@ -95,7 +95,7 @@ install:: all
copy $(ROUTER) $(install_bindir)
-!if "$(CPP_COMPILER)" == "BCC2007" && "$(OPTIMIZE)" != "yes"
+!if "$(BCPLUSPLUS)" == "yes" && "$(OPTIMIZE)" != "yes"
install:: all
copy $(DLLNAME:.dll=.tds) $(install_bindir)
diff --git a/cpp/src/Ice/ConnectionFactory.cpp b/cpp/src/Ice/ConnectionFactory.cpp
index 31ce984e6ce..5c939b5926b 100644
--- a/cpp/src/Ice/ConnectionFactory.cpp
+++ b/cpp/src/Ice/ConnectionFactory.cpp
@@ -1055,6 +1055,9 @@ IceInternal::OutgoingConnectionFactory::ConnectCallback::nextConnector()
Ice::ConnectionIPtr connection;
try
{
+#if defined(__BCPLUSPLUS__) && (__BCPLUSPLUS__ >= 0x0600)
+ IceUtil::DummyBCC dummy;
+#endif
assert(_iter != _connectors.end());
connection = _factory->createConnection(_iter->connector->connect(), *_iter);
connection->start(this);
diff --git a/cpp/src/Ice/Direct.cpp b/cpp/src/Ice/Direct.cpp
index 3d655a145e2..b8163bbf1c9 100644
--- a/cpp/src/Ice/Direct.cpp
+++ b/cpp/src/Ice/Direct.cpp
@@ -37,48 +37,19 @@ IceInternal::Direct::Direct(const Current& current) :
ServantManagerPtr servantManager = adapter->getServantManager();
assert(servantManager);
- try
+ _servant = servantManager->findServant(_current.id, _current.facet);
+ if(!_servant)
{
- _servant = servantManager->findServant(_current.id, _current.facet);
- if(!_servant)
+ _locator = servantManager->findServantLocator(_current.id.category);
+ if(!_locator && !_current.id.category.empty())
{
- _locator = servantManager->findServantLocator(_current.id.category);
- if(!_locator && !_current.id.category.empty())
- {
- _locator = servantManager->findServantLocator("");
- }
- if(_locator)
- {
- _servant = _locator->locate(_current, _cookie);
- }
+ _locator = servantManager->findServantLocator("");
}
- if(!_servant)
- {
- if(servantManager && servantManager->hasServant(_current.id))
- {
- FacetNotExistException ex(__FILE__, __LINE__);
- ex.id = _current.id;
- ex.facet = _current.facet;
- ex.operation = _current.operation;
- throw ex;
- }
- else
- {
- ObjectNotExistException ex(__FILE__, __LINE__);
- ex.id = _current.id;
- ex.facet = _current.facet;
- ex.operation = _current.operation;
- throw ex;
- }
- }
- }
- catch(...)
- {
- if(_locator && _servant)
+ if(_locator)
{
try
{
- _locator->finished(_current, _servant, _cookie);
+ _servant = _locator->locate(_current, _cookie);
}
catch(...)
{
@@ -86,8 +57,27 @@ IceInternal::Direct::Direct(const Current& current) :
throw;
}
}
+ }
+
+ if(!_servant)
+ {
adapter->decDirectCount();
- throw;
+ if(servantManager && servantManager->hasServant(_current.id))
+ {
+ FacetNotExistException ex(__FILE__, __LINE__);
+ ex.id = _current.id;
+ ex.facet = _current.facet;
+ ex.operation = _current.operation;
+ throw ex;
+ }
+ else
+ {
+ ObjectNotExistException ex(__FILE__, __LINE__);
+ ex.id = _current.id;
+ ex.facet = _current.facet;
+ ex.operation = _current.operation;
+ throw ex;
+ }
}
}
diff --git a/cpp/src/Ice/Incoming.cpp b/cpp/src/Ice/Incoming.cpp
index 17d49550847..ee574377515 100644
--- a/cpp/src/Ice/Incoming.cpp
+++ b/cpp/src/Ice/Incoming.cpp
@@ -91,6 +91,46 @@ IceInternal::IncomingBase::__warning(const string& msg) const
out << "\noperation: " << _current.operation;
}
+bool
+IceInternal::IncomingBase::__servantLocatorFinished()
+{
+ assert(_locator && _servant);
+ try
+ {
+ _locator->finished(_current, _servant, _cookie);
+ return true;
+ }
+ catch(const UserException& ex)
+ {
+ //
+ // The operation may have already marshaled a reply; we must overwrite that reply.
+ //
+ if(_response)
+ {
+ _os.endWriteEncaps();
+ _os.b.resize(headerSize + 4); // Reply status position.
+ _os.write(replyUserException);
+ _os.startWriteEncaps();
+ _os.write(ex);
+ _os.endWriteEncaps();
+ _connection->sendResponse(&_os, _compress);
+ }
+ else
+ {
+ _connection->sendNoResponse();
+ }
+ }
+ catch(const std::exception& ex)
+ {
+ __handleException(ex);
+ }
+ catch(...)
+ {
+ __handleException();
+ }
+ return false;
+}
+
void
IceInternal::IncomingBase::__handleException(const std::exception& exc)
{
@@ -400,117 +440,90 @@ IceInternal::Incoming::invoke(const ServantManagerPtr& servantManager)
// the caller of this operation.
//
- try
+ if(servantManager)
{
- bool finishedException = false;
- try
+ _servant = servantManager->findServant(_current.id, _current.facet);
+ if(!_servant)
{
- if(servantManager)
- {
- _servant = servantManager->findServant(_current.id, _current.facet);
- if(!_servant)
- {
- _locator = servantManager->findServantLocator(_current.id.category);
- if(!_locator && !_current.id.category.empty())
- {
- _locator = servantManager->findServantLocator("");
- }
- if(_locator)
- {
- try
- {
- _servant = _locator->locate(_current, _cookie);
- }
- catch(const UserException& ex)
- {
- _os.write(ex);
- replyStatus = replyUserException;
- }
- }
- }
- }
- if(replyStatus == replyOK)
+ _locator = servantManager->findServantLocator(_current.id.category);
+ if(!_locator && !_current.id.category.empty())
{
- if(!_servant)
- {
- if(servantManager && servantManager->hasServant(_current.id))
- {
- replyStatus = replyFacetNotExist;
- }
- else
- {
- replyStatus = replyObjectNotExist;
- }
- }
- else
- {
- dispatchStatus = _servant->__dispatch(*this, _current);
- if(dispatchStatus == DispatchUserException)
- {
- replyStatus = replyUserException;
- }
- }
+ _locator = servantManager->findServantLocator("");
}
- }
- catch(...)
- {
- if(_locator && _servant && dispatchStatus != DispatchAsync)
+
+ if(_locator)
{
try
{
- _locator->finished(_current, _servant, _cookie);
+ _servant = _locator->locate(_current, _cookie);
}
catch(const UserException& ex)
{
- //
- // The operation may have already marshaled a reply; we must overwrite that reply.
- //
- _os.endWriteEncaps();
- _os.b.resize(headerSize + 5); // Byte following reply status.
- _os.startWriteEncaps();
_os.write(ex);
- replyStatus = replyUserException; // Code below inserts the reply status.
- finishedException = true;
+ replyStatus = replyUserException;
+ }
+ catch(const std::exception& ex)
+ {
+ __handleException(ex);
+ return;
}
catch(...)
{
- throw;
+ __handleException();
+ return;
}
}
- if(!finishedException)
+ }
+ }
+
+ if(_servant)
+ {
+ try
+ {
+ assert(replyStatus == replyOK);
+ dispatchStatus = _servant->__dispatch(*this, _current);
+ if(dispatchStatus == DispatchUserException)
+ {
+ replyStatus = replyUserException;
+ }
+
+ if(dispatchStatus != DispatchAsync)
{
- throw;
+ if(_locator && !__servantLocatorFinished())
+ {
+ return;
+ }
}
}
-
- if(!finishedException && _locator && _servant && dispatchStatus != DispatchAsync)
+ catch(const std::exception& ex)
{
- try
+ if(_locator && !__servantLocatorFinished())
{
- _locator->finished(_current, _servant, _cookie);
+ return;
}
- catch(const UserException& ex)
+ __handleException(ex);
+ return;
+ }
+ catch(...)
+ {
+ if(_locator && !__servantLocatorFinished())
{
- //
- // The operation may have already marshaled a reply; we must overwrite that reply.
- //
- _os.endWriteEncaps();
- _os.b.resize(headerSize + 5); // Byte following reply status.
- _os.startWriteEncaps();
- _os.write(ex);
- replyStatus = replyUserException; // Code below inserts the reply status.
+ return;
}
+ __handleException();
+ return;
}
}
- catch(const std::exception& ex)
+ else if(replyStatus == replyOK)
{
- __handleException(ex);
- return;
- }
- catch(...)
- {
- __handleException();
- return;
+ if(servantManager && servantManager->hasServant(_current.id))
+ {
+ replyStatus = replyFacetNotExist;
+ }
+ else
+ {
+ replyStatus = replyObjectNotExist;
+ }
}
//
diff --git a/cpp/src/Ice/IncomingAsync.cpp b/cpp/src/Ice/IncomingAsync.cpp
index edc9b64cf3b..5324af0508b 100644
--- a/cpp/src/Ice/IncomingAsync.cpp
+++ b/cpp/src/Ice/IncomingAsync.cpp
@@ -64,7 +64,7 @@ IceInternal::IncomingAsync::__response(bool ok)
{
try
{
- if(!__servantLocatorFinished())
+ if(_locator && !__servantLocatorFinished())
{
return;
}
@@ -100,7 +100,7 @@ IceInternal::IncomingAsync::__exception(const std::exception& exc)
{
try
{
- if(!__servantLocatorFinished())
+ if(_locator && !__servantLocatorFinished())
{
return;
}
@@ -118,7 +118,7 @@ IceInternal::IncomingAsync::__exception()
{
try
{
- if(!__servantLocatorFinished())
+ if(_locator && !__servantLocatorFinished())
{
return;
}
@@ -132,53 +132,6 @@ IceInternal::IncomingAsync::__exception()
}
bool
-IceInternal::IncomingAsync::__servantLocatorFinished()
-{
- try
- {
- if(_locator && _servant)
- {
- try
- {
- _locator->finished(_current, _servant, _cookie);
- }
- catch(const UserException& ex)
- {
- //
- // The operation may have already marshaled a reply; we must overwrite that reply.
- //
- if(_response)
- {
- _os.endWriteEncaps();
- _os.b.resize(headerSize + 4); // Reply status position.
- _os.write(replyUserException);
- _os.startWriteEncaps();
- _os.write(ex);
- _os.endWriteEncaps();
- _connection->sendResponse(&_os, _compress);
- }
- else
- {
- _connection->sendNoResponse();
- }
- return false;
- }
- }
- return true;
- }
- catch(const std::exception& ex)
- {
- __handleException(ex);
- return false;
- }
- catch(...)
- {
- __handleException();
- return false;
- }
-}
-
-bool
IceInternal::IncomingAsync::__validateResponse(bool ok)
{
if(!_retriable)
diff --git a/cpp/src/Ice/Makefile.mak b/cpp/src/Ice/Makefile.mak
index ee329ce9f7a..2220869d284 100644
--- a/cpp/src/Ice/Makefile.mak
+++ b/cpp/src/Ice/Makefile.mak
@@ -118,11 +118,11 @@ SDIR = $(slicedir)\Ice
CPPFLAGS = -I.. $(CPPFLAGS) -DICE_API_EXPORTS -DFD_SETSIZE=1024 -DWIN32_LEAN_AND_MEAN
SLICE2CPPFLAGS = --ice --include-dir Ice --dll-export ICE_API $(SLICE2CPPFLAGS)
LINKWITH = $(BASELIBS) $(BZIP2_LIBS) $(ICE_OS_LIBS) ws2_32.lib
-!if "$(CPP_COMPILER)" != "BCC2007"
+!if "$(BCPLUSPLUS)" != "yes"
LINKWITH = $(LINKWITH) Iphlpapi.lib
!endif
-!if "$(CPP_COMPILER)" == "BCC2007"
+!if "$(BCPLUSPLUS)" == "yes"
RES_FILE = ,, Ice.res
!else
!if "$(GENERATE_PDB)" == "yes"
@@ -195,7 +195,7 @@ install:: all
copy $(DLLNAME) $(install_bindir)
-!if "$(CPP_COMPILER)" == "BCC2007" && "$(OPTIMIZE)" != "yes"
+!if "$(BCPLUSPLUS)" == "yes" && "$(OPTIMIZE)" != "yes"
install:: all
copy $(DLLNAME:.dll=.tds) $(install_bindir)
diff --git a/cpp/src/Ice/Network.cpp b/cpp/src/Ice/Network.cpp
index 45b319ce246..7ed2a41e86a 100644
--- a/cpp/src/Ice/Network.cpp
+++ b/cpp/src/Ice/Network.cpp
@@ -77,7 +77,7 @@ getLocalAddresses(ProtocolSupport protocol)
vector<unsigned char> buffer;
buffer.resize(1024);
unsigned long len = 0;
- DWORD rs = WSAIoctl(fd, SIO_ADDRESS_LIST_QUERY, 0, 0,
+ int rs = WSAIoctl(fd, SIO_ADDRESS_LIST_QUERY, 0, 0,
&buffer[0], static_cast<DWORD>(buffer.size()),
&len, 0, 0);
if(rs == SOCKET_ERROR)
@@ -883,7 +883,8 @@ IceInternal::getSendBufferSize(SOCKET fd)
{
int sz;
socklen_t len = sizeof(sz);
- if(getsockopt(fd, SOL_SOCKET, SO_SNDBUF, (char*)&sz, &len) == SOCKET_ERROR || len != sizeof(sz))
+ if(getsockopt(fd, SOL_SOCKET, SO_SNDBUF, (char*)&sz, &len) == SOCKET_ERROR ||
+ static_cast<unsigned int>(len) != sizeof(sz))
{
closeSocketNoThrow(fd);
SocketException ex(__FILE__, __LINE__);
@@ -910,7 +911,8 @@ IceInternal::getRecvBufferSize(SOCKET fd)
{
int sz;
socklen_t len = sizeof(sz);
- if(getsockopt(fd, SOL_SOCKET, SO_RCVBUF, (char*)&sz, &len) == SOCKET_ERROR || len != sizeof(sz))
+ if(getsockopt(fd, SOL_SOCKET, SO_RCVBUF, (char*)&sz, &len) == SOCKET_ERROR ||
+ static_cast<unsigned int>(len) != sizeof(sz))
{
closeSocketNoThrow(fd);
SocketException ex(__FILE__, __LINE__);
diff --git a/cpp/src/Ice/OutgoingAsync.cpp b/cpp/src/Ice/OutgoingAsync.cpp
index db421bbffec..d1947092002 100644
--- a/cpp/src/Ice/OutgoingAsync.cpp
+++ b/cpp/src/Ice/OutgoingAsync.cpp
@@ -145,7 +145,12 @@ IceInternal::OutgoingAsyncMessageCallback::__releaseCallback(const Ice::LocalExc
try
{
- __os->instance()->clientThreadPool()->execute(new CallException(this, exc));
+ //
+ // COMPILERFIX: The following in done in two separate lines in order to work around
+ // bug in C++Builder 2009.
+ //
+ ThreadPoolPtr threadPool = __os->instance()->clientThreadPool();
+ threadPool->execute(new CallException(this, exc));
}
catch(const Ice::CommunicatorDestroyedException&)
{
diff --git a/cpp/src/Ice/Proxy.cpp b/cpp/src/Ice/Proxy.cpp
index a1121f353c4..bc8578a3420 100644
--- a/cpp/src/Ice/Proxy.cpp
+++ b/cpp/src/Ice/Proxy.cpp
@@ -117,6 +117,9 @@ IceProxy::Ice::Object::ice_isA(const string& typeId, const Context* context)
Handle< ::IceDelegate::Ice::Object> __del;
try
{
+#if defined(__BCPLUSPLUS__) && (__BCPLUSPLUS__ >= 0x0600)
+ IceUtil::DummyBCC dummy;
+#endif
__checkTwowayOnly(ice_isA_name);
__del = __getDelegate(false);
return __del->ice_isA(typeId, context);
@@ -141,6 +144,9 @@ IceProxy::Ice::Object::ice_ping(const Context* context)
Handle< ::IceDelegate::Ice::Object> __del;
try
{
+#if defined(__BCPLUSPLUS__) && (__BCPLUSPLUS__ >= 0x0600)
+ IceUtil::DummyBCC dummy;
+#endif
__del = __getDelegate(false);
__del->ice_ping(context);
return;
@@ -165,6 +171,9 @@ IceProxy::Ice::Object::ice_ids(const Context* context)
Handle< ::IceDelegate::Ice::Object> __del;
try
{
+#if defined(__BCPLUSPLUS__) && (__BCPLUSPLUS__ >= 0x0600)
+ IceUtil::DummyBCC dummy;
+#endif
__checkTwowayOnly(ice_ids_name);
__del = __getDelegate(false);
return __del->ice_ids(context);
@@ -189,6 +198,9 @@ IceProxy::Ice::Object::ice_id(const Context* context)
Handle< ::IceDelegate::Ice::Object> __del;
try
{
+#if defined(__BCPLUSPLUS__) && (__BCPLUSPLUS__ >= 0x0600)
+ IceUtil::DummyBCC dummy;
+#endif
__checkTwowayOnly(ice_id_name);
__del = __getDelegate(false);
return __del->ice_id(context);
@@ -239,6 +251,9 @@ IceProxy::Ice::Object::ice_invoke(const string& operation,
Handle< ::IceDelegate::Ice::Object> __del;
try
{
+#if defined(__BCPLUSPLUS__) && (__BCPLUSPLUS__ >= 0x0600)
+ IceUtil::DummyBCC dummy;
+#endif
__del = __getDelegate(false);
return __del->ice_invoke(operation, mode, inParams, outParams, context);
}
@@ -755,6 +770,9 @@ IceProxy::Ice::Object::ice_getConnection()
Handle< ::IceDelegate::Ice::Object> __del;
try
{
+#if defined(__BCPLUSPLUS__) && (__BCPLUSPLUS__ >= 0x0600)
+ IceUtil::DummyBCC dummy;
+#endif
__del = __getDelegate(false);
return __del->__getRequestHandler()->getConnection(true); // Wait for the connection to be established.
@@ -799,6 +817,9 @@ IceProxy::Ice::Object::ice_flushBatchRequests()
int __cnt = -1; // Don't retry.
try
{
+#if defined(__BCPLUSPLUS__) && (__BCPLUSPLUS__ >= 0x0600)
+ IceUtil::DummyBCC dummy;
+#endif
__del = __getDelegate(false);
__del->ice_flushBatchRequests();
}
@@ -892,6 +913,9 @@ IceProxy::Ice::Object::__handleException(const ::IceInternal::Handle< ::IceDeleg
try
{
+#if defined(__BCPLUSPLUS__) && (__BCPLUSPLUS__ >= 0x0600)
+ IceUtil::DummyBCC dummy;
+#endif
_reference->getInstance()->proxyFactory()->checkRetryAfterException(ex, _reference, out, cnt);
}
catch(const CommunicatorDestroyedException&)
diff --git a/cpp/src/Ice/RouterInfo.cpp b/cpp/src/Ice/RouterInfo.cpp
index a30a7079b45..789cd08d94a 100644
--- a/cpp/src/Ice/RouterInfo.cpp
+++ b/cpp/src/Ice/RouterInfo.cpp
@@ -362,6 +362,9 @@ IceInternal::RouterInfo::setClientEndpoints(const Ice::ObjectPrx& proxy)
//
try
{
+#if defined(__BCPLUSPLUS__) && (__BCPLUSPLUS__ >= 0x0600)
+ IceUtil::DummyBCC dummy;
+#endif
clientProxy = clientProxy->ice_timeout(_router->ice_getConnection()->timeout());
}
catch(const Ice::CollocationOptimizationException&)
diff --git a/cpp/src/Ice/Service.cpp b/cpp/src/Ice/Service.cpp
index 491b851c3d3..0acc8519e3c 100644
--- a/cpp/src/Ice/Service.cpp
+++ b/cpp/src/Ice/Service.cpp
@@ -391,6 +391,9 @@ Ice::Service::main(int& argc, char* argv[], const InitializationData& initializa
InitializationData initData = initializationData;
try
{
+#if defined(__BCPLUSPLUS__) && (__BCPLUSPLUS__ >= 0x0600)
+ IceUtil::DummyBCC dummy;
+#endif
initData.properties = createProperties(argc, argv, initData.properties, initData.stringConverter);
}
catch(const Ice::Exception& ex)
diff --git a/cpp/src/Ice/TraceUtil.cpp b/cpp/src/Ice/TraceUtil.cpp
index d255cf2a3ad..537053f9759 100644
--- a/cpp/src/Ice/TraceUtil.cpp
+++ b/cpp/src/Ice/TraceUtil.cpp
@@ -355,12 +355,12 @@ printMessage(ostream& s, BasicStream& stream)
}
static IceUtil::StaticMutex slicingMutex = ICE_STATIC_MUTEX_INITIALIZER;
+static set<string> slicingIds;
void
IceInternal::traceSlicing(const char* kind, const string& typeId, const char* slicingCat, const LoggerPtr& logger)
{
IceUtil::StaticMutex::Lock lock(slicingMutex);
- static set<string> slicingIds;
if(slicingIds.insert(typeId).second)
{
string s("unknown ");
diff --git a/cpp/src/IceBox/Admin.cpp b/cpp/src/IceBox/Admin.cpp
index 2a77a8629ba..6cd3076b995 100644
--- a/cpp/src/IceBox/Admin.cpp
+++ b/cpp/src/IceBox/Admin.cpp
@@ -58,6 +58,9 @@ Client::run(int argc, char* argv[])
vector<string> commands;
try
{
+#if defined(__BCPLUSPLUS__) && (__BCPLUSPLUS__ >= 0x0600)
+ IceUtil::DummyBCC dummy;
+#endif
commands = opts.parse(argc, (const char**)argv);
}
catch(const IceUtilInternal::BadOptException& e)
diff --git a/cpp/src/IceBox/Makefile.mak b/cpp/src/IceBox/Makefile.mak
index d5f8061dfeb..54251f3d445 100644
--- a/cpp/src/IceBox/Makefile.mak
+++ b/cpp/src/IceBox/Makefile.mak
@@ -48,7 +48,7 @@ SPDBFLAGS = /pdb:$(SERVER:.exe=.pdb)
APDBFLAGS = /pdb:$(ADMIN:.exe=.pdb)
!endif
-!if "$(CPP_COMPILER)" == "BCC2007"
+!if "$(BCPLUSPLUS)" == "yes"
RES_FILE = ,, IceBox.res
SRES_FILE = ,, IceBoxExe.res
ARES_FILE = ,, IceBoxAdmin.res
@@ -92,7 +92,7 @@ install:: all
copy $(ADMIN) $(install_bindir)
-!if "$(CPP_COMPILER)" == "BCC2007" && "$(OPTIMIZE)" != "yes"
+!if "$(BCPLUSPLUS)" == "yes" && "$(OPTIMIZE)" != "yes"
install:: all
copy $(DLLNAME:.dll=.tds) $(install_bindir)
diff --git a/cpp/src/IceBox/Service.cpp b/cpp/src/IceBox/Service.cpp
index 2cfb70ce1ea..c98d593636d 100644
--- a/cpp/src/IceBox/Service.cpp
+++ b/cpp/src/IceBox/Service.cpp
@@ -72,6 +72,9 @@ IceBox::IceBoxService::start(int argc, char* argv[])
try
{
+#if defined(__BCPLUSPLUS__) && (__BCPLUSPLUS__ >= 0x0600)
+ IceUtil::DummyBCC dummy;
+#endif
args = opts.parse(args);
}
catch(const IceUtilInternal::BadOptException& e)
diff --git a/cpp/src/IceBox/ServiceManagerI.cpp b/cpp/src/IceBox/ServiceManagerI.cpp
index 0c696d16f01..e80a49474e6 100644
--- a/cpp/src/IceBox/ServiceManagerI.cpp
+++ b/cpp/src/IceBox/ServiceManagerI.cpp
@@ -598,6 +598,9 @@ IceBox::ServiceManagerI::start(const string& service, const string& entryPoint,
SERVICE_FACTORY factory = (SERVICE_FACTORY)sym;
try
{
+#if defined(__BCPLUSPLUS__) && (__BCPLUSPLUS__ >= 0x0600)
+ IceUtil::DummyBCC dummy;
+#endif
info.service = factory(_communicator);
}
catch(const Exception& ex)
diff --git a/cpp/src/IceGrid/AdapterCache.cpp b/cpp/src/IceGrid/AdapterCache.cpp
index af24d9da061..cec27811315 100644
--- a/cpp/src/IceGrid/AdapterCache.cpp
+++ b/cpp/src/IceGrid/AdapterCache.cpp
@@ -276,6 +276,9 @@ ServerAdapterEntry::getAdapterInfo() const
info.replicaGroupId = _replicaGroupId;
try
{
+#if defined(__BCPLUSPLUS__) && (__BCPLUSPLUS__ >= 0x0600)
+ IceUtil::DummyBCC dummy;
+#endif
info.proxy = _server->getAdapter(_id, true)->getDirectProxy();
}
catch(const Ice::Exception&)
diff --git a/cpp/src/IceGrid/Client.cpp b/cpp/src/IceGrid/Client.cpp
index 37b25ddb932..cba7349ad0b 100644
--- a/cpp/src/IceGrid/Client.cpp
+++ b/cpp/src/IceGrid/Client.cpp
@@ -302,6 +302,9 @@ Client::run(int argc, char* argv[])
vector<string> args;
try
{
+#if defined(__BCPLUSPLUS__) && (__BCPLUSPLUS__ >= 0x0600)
+ IceUtil::DummyBCC dummy;
+#endif
args = opts.parse(argc, (const char**)argv);
}
catch(const IceUtilInternal::BadOptException& e)
diff --git a/cpp/src/IceGrid/Database.cpp b/cpp/src/IceGrid/Database.cpp
index 6841da14e33..52f79c8377b 100644
--- a/cpp/src/IceGrid/Database.cpp
+++ b/cpp/src/IceGrid/Database.cpp
@@ -826,6 +826,9 @@ Database::getAdapterInfo(const string& id)
//
try
{
+#if defined(__BCPLUSPLUS__) && (__BCPLUSPLUS__ >= 0x0600)
+ IceUtil::DummyBCC dummy;
+#endif
return _adapterCache.get(id)->getAdapterInfo();
}
catch(AdapterNotExistException&)
diff --git a/cpp/src/IceGrid/IceGridRegistry.cpp b/cpp/src/IceGrid/IceGridRegistry.cpp
index 1b6f104ae3a..f6b15394f00 100644
--- a/cpp/src/IceGrid/IceGridRegistry.cpp
+++ b/cpp/src/IceGrid/IceGridRegistry.cpp
@@ -77,6 +77,9 @@ RegistryService::start(int argc, char* argv[])
vector<string> args;
try
{
+#if defined(__BCPLUSPLUS__) && (__BCPLUSPLUS__ >= 0x0600)
+ IceUtil::DummyBCC dummy;
+#endif
args = opts.parse(argc, (const char**)argv);
}
catch(const IceUtilInternal::BadOptException& e)
diff --git a/cpp/src/IceGrid/LocatorI.cpp b/cpp/src/IceGrid/LocatorI.cpp
index d038ccae641..1f2291fe0e9 100644
--- a/cpp/src/IceGrid/LocatorI.cpp
+++ b/cpp/src/IceGrid/LocatorI.cpp
@@ -653,6 +653,9 @@ LocatorI::findObjectById_async(const Ice::AMD_Locator_findObjectByIdPtr& cb,
Ice::ObjectPrx proxy;
try
{
+#if defined(__BCPLUSPLUS__) && (__BCPLUSPLUS__ >= 0x0600)
+ IceUtil::DummyBCC dummy;
+#endif
proxy = _database->getObjectProxy(id);
}
catch(const ObjectNotRegisteredException&)
@@ -717,18 +720,10 @@ LocatorI::findAdapterById_async(const Ice::AMD_Locator_findAdapterByIdPtr& cb,
request = new AdapterRequest(cb, self, adapters[0]);
}
request->execute();
+ return;
}
catch(const AdapterNotExistException&)
{
- try
- {
- cb->ice_response(_database->getAdapterDirectProxy(id));
- }
- catch(const AdapterNotExistException&)
- {
- cb->ice_exception(Ice::AdapterNotFoundException());
- }
- return;
}
catch(const Ice::Exception& ex)
{
@@ -748,6 +743,18 @@ LocatorI::findAdapterById_async(const Ice::AMD_Locator_findAdapterByIdPtr& cb,
cb->ice_response(0);
return;
}
+
+ try
+ {
+#if defined(__BCPLUSPLUS__) && (__BCPLUSPLUS__ >= 0x0600)
+ IceUtil::DummyBCC dummy;
+#endif
+ cb->ice_response(_database->getAdapterDirectProxy(id));
+ }
+ catch(const AdapterNotExistException&)
+ {
+ cb->ice_exception(Ice::AdapterNotFoundException());
+ }
}
Ice::LocatorRegistryPrx
diff --git a/cpp/src/IceGrid/Makefile.mak b/cpp/src/IceGrid/Makefile.mak
index a8db26b4472..ec310cffff1 100644
--- a/cpp/src/IceGrid/Makefile.mak
+++ b/cpp/src/IceGrid/Makefile.mak
@@ -103,13 +103,13 @@ ALINKWITH = $(LINKWITH) icegrid$(LIBSUFFIX).lib icexml$(LIBSUFFIX).lib icepatch
icebox$(LIBSUFFIX).lib
NLINKWITH = $(ALINKWITH) icestorm$(LIBSUFFIX).lib freeze$(LIBSUFFIX).lib icebox$(LIBSUFFIX).lib \
icessl$(LIBSUFFIX).lib icestormservice$(LIBSUFFIX).lib $(OPENSSL_LIBS)
-!if "$(CPP_COMPILER)" != "BCC2007"
+!if "$(BCPLUSPLUS)" != "yes"
NLINKWITH = $(NLINKWITH) pdh.lib ws2_32.lib
!endif
SLICE2CPPFLAGS = --checksum --ice --include-dir IceGrid $(SLICE2CPPFLAGS)
CPPFLAGS = -I. -I.. -Idummyinclude $(CPPFLAGS) -DWIN32_LEAN_AND_MEAN
-!if "$(CPP_COMPILER)" != "BCC2007"
+!if "$(BCPLUSPLUS)" != "yes"
CPPFLAGS = $(CPPFLAGS) -Zm200
!endif
@@ -119,7 +119,7 @@ RPDBFLAGS = /pdb:$(REGISTRY_SERVER:.exe=.pdb)
NPDBFLAGS = /pdb:$(NODE_SERVER:.exe=.pdb)
!endif
-!if "$(CPP_COMPILER)" == "BCC2007"
+!if "$(BCPLUSPLUS)" == "yes"
ARES_FILE = ,, IceGridAdmin.res
RRES_FILE = ,, IceGridRegistry.res
NRES_FILE = ,, IceGridNode.res
@@ -191,7 +191,7 @@ install:: all
copy $(REGISTRY_SERVER) $(install_bindir)
-!if "$(CPP_COMPILER)" == "BCC2007" && "$(OPTIMIZE)" != "yes"
+!if "$(BCPLUSPLUS)" == "yes" && "$(OPTIMIZE)" != "yes"
install:: all
copy $(ADMIN:.exe=.tds) $(install_bindir)
diff --git a/cpp/src/IceGrid/NodeI.cpp b/cpp/src/IceGrid/NodeI.cpp
index 140e2e73d81..ce81bf6663b 100644
--- a/cpp/src/IceGrid/NodeI.cpp
+++ b/cpp/src/IceGrid/NodeI.cpp
@@ -548,6 +548,9 @@ NodeI::destroyServer_async(const AMD_Node_destroyServerPtr& amdCB,
//
try
{
+#if defined(__BCPLUSPLUS__) && (__BCPLUSPLUS__ >= 0x0600)
+ IceUtil::DummyBCC dummy;
+#endif
command = server->destroy(amdCB, uuid, revision, replicaName);
}
catch(const Ice::ObjectNotExistException&)
diff --git a/cpp/src/IceGrid/RegistryI.cpp b/cpp/src/IceGrid/RegistryI.cpp
index 088a1c6d8a3..73ff0e21a4f 100644
--- a/cpp/src/IceGrid/RegistryI.cpp
+++ b/cpp/src/IceGrid/RegistryI.cpp
@@ -1050,6 +1050,9 @@ RegistryI::getPermissionsVerifier(const ObjectAdapterPtr& adapter,
{
try
{
+#if defined(__BCPLUSPLUS__) && (__BCPLUSPLUS__ >= 0x0600)
+ IceUtil::DummyBCC dummy;
+#endif
verifier = _communicator->propertyToProxy(verifierProperty);
}
catch(const ProxyParseException&)
@@ -1132,6 +1135,9 @@ RegistryI::getPermissionsVerifier(const ObjectAdapterPtr& adapter,
Glacier2::PermissionsVerifierPrx verifierPrx;
try
{
+#if defined(__BCPLUSPLUS__) && (__BCPLUSPLUS__ >= 0x0600)
+ IceUtil::DummyBCC dummy;
+#endif
//
// Set the permission verifier proxy locator to the internal
// locator. We can't use the "public" locator, this could lead
@@ -1173,6 +1179,9 @@ RegistryI::getSSLPermissionsVerifier(const IceGrid::LocatorPrx& locator, const s
{
try
{
+#if defined(__BCPLUSPLUS__) && (__BCPLUSPLUS__ >= 0x0600)
+ IceUtil::DummyBCC dummy;
+#endif
verifier = _communicator->propertyToProxy(verifierProperty);
}
catch(const ProxyParseException&)
@@ -1216,6 +1225,9 @@ RegistryI::getSSLPermissionsVerifier(const IceGrid::LocatorPrx& locator, const s
Glacier2::SSLPermissionsVerifierPrx verifierPrx;
try
{
+#if defined(__BCPLUSPLUS__) && (__BCPLUSPLUS__ >= 0x0600)
+ IceUtil::DummyBCC dummy;
+#endif
//
// Set the permission verifier proxy locator to the internal
// locator. We can't use the "public" locator, this could lead
diff --git a/cpp/src/IceGrid/ServerCache.cpp b/cpp/src/IceGrid/ServerCache.cpp
index 7bbfef15c17..8cdc3494d95 100644
--- a/cpp/src/IceGrid/ServerCache.cpp
+++ b/cpp/src/IceGrid/ServerCache.cpp
@@ -291,7 +291,7 @@ ServerEntry::update(const ServerInfo& info)
if(info.descriptor->activation == "session")
{
_allocatable = true;
- _load->sessionId = _session ? _session->getId() : "";
+ _load->sessionId = _session ? _session->getId() : string("");
}
}
diff --git a/cpp/src/IceGrid/ServerI.cpp b/cpp/src/IceGrid/ServerI.cpp
index b01219c4e46..72493162cb1 100644
--- a/cpp/src/IceGrid/ServerI.cpp
+++ b/cpp/src/IceGrid/ServerI.cpp
@@ -299,7 +299,7 @@ struct EnvironmentEval : std::unary_function<string, string>
break;
}
string variable = v.substr(beg + 1, end - beg - 1);
- int ret = GetEnvironmentVariable(variable.c_str(), buf, sizeof(buf));
+ DWORD ret = GetEnvironmentVariable(variable.c_str(), buf, sizeof(buf));
string valstr = (ret > 0 && ret < sizeof(buf)) ? string(buf) : string("");
v.replace(beg, end - beg + 1, valstr);
beg += valstr.size();
diff --git a/cpp/src/IceGridLib/Makefile.mak b/cpp/src/IceGridLib/Makefile.mak
index eb0d57cb251..a34290d5205 100644
--- a/cpp/src/IceGridLib/Makefile.mak
+++ b/cpp/src/IceGridLib/Makefile.mak
@@ -41,7 +41,7 @@ CPPFLAGS = -I.. $(CPPFLAGS)
PDBFLAGS = /pdb:$(DLLNAME:.dll=.pdb)
!endif
-!if "$(CPP_COMPILER)" == "BCC2007"
+!if "$(BCPLUSPLUS)" == "yes"
RES_FILE = ,, IceGrid.res
!else
RES_FILE = IceGrid.res
@@ -74,7 +74,7 @@ install:: all
copy $(DLLNAME) $(install_bindir)
-!if "$(CPP_COMPILER)" == "BCC2007" && "$(OPTIMIZE)" != "yes"
+!if "$(BCPLUSPLUS)" == "yes" && "$(OPTIMIZE)" != "yes"
install:: all
copy $(DLLNAME:.dll=.tds) $(install_bindir)
diff --git a/cpp/src/IcePatch2/Calc.cpp b/cpp/src/IcePatch2/Calc.cpp
index 0adb2a2394a..5c67f7445ee 100644
--- a/cpp/src/IcePatch2/Calc.cpp
+++ b/cpp/src/IcePatch2/Calc.cpp
@@ -135,6 +135,9 @@ main(int argc, char* argv[])
vector<string> args;
try
{
+#if defined(__BCPLUSPLUS__) && (__BCPLUSPLUS__ >= 0x0600)
+ IceUtil::DummyBCC dummy;
+#endif
args = opts.parse(argc, (const char**)argv);
}
catch(const IceUtilInternal::BadOptException& e)
diff --git a/cpp/src/IcePatch2/Client.cpp b/cpp/src/IcePatch2/Client.cpp
index 76436d94eb8..29cd1516563 100644
--- a/cpp/src/IcePatch2/Client.cpp
+++ b/cpp/src/IcePatch2/Client.cpp
@@ -246,6 +246,9 @@ Client::run(int argc, char* argv[])
vector<string> args;
try
{
+#if defined(__BCPLUSPLUS__) && (__BCPLUSPLUS__ >= 0x0600)
+ IceUtil::DummyBCC dummy;
+#endif
args = opts.parse(argc, (const char**)argv);
}
catch(const IceUtilInternal::BadOptException& e)
diff --git a/cpp/src/IcePatch2/Makefile.mak b/cpp/src/IcePatch2/Makefile.mak
index 1ea9843bb5c..ccdad87b787 100644
--- a/cpp/src/IcePatch2/Makefile.mak
+++ b/cpp/src/IcePatch2/Makefile.mak
@@ -52,7 +52,7 @@ CPDBFLAGS = /pdb:$(CLIENT:.exe=.pdb)
CAPDBFLAGS = /pdb:$(CALC:.exe=.pdb)
!endif
-!if "$(CPP_COMPILER)" == "BCC2007"
+!if "$(BCPLUSPLUS)" == "yes"
RES_FILE = ,, IcePatch2.res
SRES_FILE = ,, IcePatch2Server.res
CRES_FILE = ,, IcePatch2Client.res
@@ -108,7 +108,7 @@ install:: all
copy $(CALC) $(install_bindir)
-!if "$(CPP_COMPILER)" == "BCC2007" && "$(OPTIMIZE)" != "yes"
+!if "$(BCPLUSPLUS)" == "yes" && "$(OPTIMIZE)" != "yes"
install:: all
copy $(DLLNAME:.dll=.tds) $(install_bindir)
diff --git a/cpp/src/IcePatch2/Server.cpp b/cpp/src/IcePatch2/Server.cpp
index 62b35de8004..91e71d708aa 100644
--- a/cpp/src/IcePatch2/Server.cpp
+++ b/cpp/src/IcePatch2/Server.cpp
@@ -76,6 +76,9 @@ IcePatch2::PatcherService::start(int argc, char* argv[])
vector<string> args;
try
{
+#if defined(__BCPLUSPLUS__) && (__BCPLUSPLUS__ >= 0x0600)
+ IceUtil::DummyBCC dummy;
+#endif
args = opts.parse(argc, (const char**)argv);
}
catch(const IceUtilInternal::BadOptException& e)
diff --git a/cpp/src/IcePatch2/Util.cpp b/cpp/src/IcePatch2/Util.cpp
index 07b5a355919..05d91aa9bec 100644
--- a/cpp/src/IcePatch2/Util.cpp
+++ b/cpp/src/IcePatch2/Util.cpp
@@ -736,7 +736,7 @@ IcePatch2::decompressFile(const string& pa)
}
ByteSeq compressedBytes(buf.st_size);
- if(fread(&compressedBytes[0], buf.st_size, 1, stdioFileBZ2) == -1)
+ if(fread(&compressedBytes[0], buf.st_size, 1, stdioFileBZ2) != 1)
{
throw "cannot read from `" + pathBZ2 + "':\n" + IceUtilInternal::lastErrorToString();
}
diff --git a/cpp/src/IceSSL/Makefile.mak b/cpp/src/IceSSL/Makefile.mak
index fa1b15a9def..38d85a5e356 100644
--- a/cpp/src/IceSSL/Makefile.mak
+++ b/cpp/src/IceSSL/Makefile.mak
@@ -34,7 +34,7 @@ HDIR = $(headerdir)\IceSSL
CPPFLAGS = -I.. $(CPPFLAGS) -DICE_SSL_API_EXPORTS -DFD_SETSIZE=1024 -DWIN32_LEAN_AND_MEAN
LINKWITH = $(OPENSSL_LIBS) $(LIBS)
-!if "$(CPP_COMPILER)" != "BCC2007"
+!if "$(BCPLUSPLUS)" != "yes"
LINKWITH = $(LINKWITH) ws2_32.lib
!endif
@@ -42,7 +42,7 @@ LINKWITH = $(LINKWITH) ws2_32.lib
PDBFLAGS = /pdb:$(DLLNAME:.dll=.pdb)
!endif
-!if "$(CPP_COMPILER)" == "BCC2007"
+!if "$(BCPLUSPLUS)" == "yes"
RES_FILE = ,, IceSSL.res
!else
RES_FILE = IceSSL.res
@@ -65,7 +65,7 @@ install:: all
copy $(DLLNAME) $(install_bindir)
-!if "$(CPP_COMPILER)" == "BCC2007" && "$(OPTIMIZE)" != "yes"
+!if "$(BCPLUSPLUS)" == "yes" && "$(OPTIMIZE)" != "yes"
install:: all
copy $(DLLNAME:.dll=.tds) $(install_bindir)
diff --git a/cpp/src/IceStorm/Admin.cpp b/cpp/src/IceStorm/Admin.cpp
index 71a483796c4..e9eb985191f 100644
--- a/cpp/src/IceStorm/Admin.cpp
+++ b/cpp/src/IceStorm/Admin.cpp
@@ -63,6 +63,9 @@ Client::run(int argc, char* argv[])
vector<string> args;
try
{
+#if defined(__BCPLUSPLUS__) && (__BCPLUSPLUS__ >= 0x0600)
+ IceUtil::DummyBCC dummy;
+#endif
args = opts.parse(argc, (const char**)argv);
}
catch(const IceUtilInternal::BadOptException& e)
diff --git a/cpp/src/IceStorm/Makefile.mak b/cpp/src/IceStorm/Makefile.mak
index abd7abe4ef8..6294fbc5e03 100644
--- a/cpp/src/IceStorm/Makefile.mak
+++ b/cpp/src/IceStorm/Makefile.mak
@@ -90,7 +90,7 @@ APDBFLAGS = /pdb:$(ADMIN:.exe=.pdb)
MPDBFLAGS = /pdb:$(MIGRATE:.exe=.pdb)
!endif
-!if "$(CPP_COMPILER)" == "BCC2007"
+!if "$(BCPLUSPLUS)" == "yes"
RES_FILE = ,, IceStorm.res
SRES_FILE = ,, IceStormService.res
ARES_FILE = ,, IceStormAdmin.res
@@ -203,7 +203,7 @@ install:: all
copy $(MIGRATE) $(install_bindir)
-!if "$(CPP_COMPILER)" == "BCC2007" && "$(OPTIMIZE)" != "yes"
+!if "$(BCPLUSPLUS)" == "yes" && "$(OPTIMIZE)" != "yes"
install:: all
copy $(DLLNAME:.dll=.tds) $(install_bindir)
diff --git a/cpp/src/IceStorm/Subscriber.cpp b/cpp/src/IceStorm/Subscriber.cpp
index dc76ca5629b..db596d76f99 100644
--- a/cpp/src/IceStorm/Subscriber.cpp
+++ b/cpp/src/IceStorm/Subscriber.cpp
@@ -581,6 +581,9 @@ Subscriber::create(
Ice::ObjectPrx newObj;
try
{
+#if defined(__BCPLUSPLUS__) && (__BCPLUSPLUS__ >= 0x0600)
+ IceUtil::DummyBCC dummy;
+#endif
newObj = rec.obj->ice_timeout(instance->sendTimeout());
}
catch(const Ice::FixedProxyException&)
diff --git a/cpp/src/IceUtil/Cond.cpp b/cpp/src/IceUtil/Cond.cpp
index 0b623a01507..34be360ef57 100644
--- a/cpp/src/IceUtil/Cond.cpp
+++ b/cpp/src/IceUtil/Cond.cpp
@@ -32,7 +32,7 @@ IceUtilInternal::Semaphore::~Semaphore()
void
IceUtilInternal::Semaphore::wait() const
{
- int rc = WaitForSingleObject(_sem, INFINITE);
+ DWORD rc = WaitForSingleObject(_sem, INFINITE);
if(rc != WAIT_OBJECT_0)
{
throw IceUtil::ThreadSyscallException(__FILE__, __LINE__, GetLastError());
@@ -48,7 +48,7 @@ IceUtilInternal::Semaphore::timedWait(const IceUtil::Time& timeout) const
throw IceUtil::InvalidTimeoutException(__FILE__, __LINE__, timeout);
}
- int rc = WaitForSingleObject(_sem, static_cast<DWORD>(msTimeout));
+ DWORD rc = WaitForSingleObject(_sem, static_cast<DWORD>(msTimeout));
if(rc != WAIT_TIMEOUT && rc != WAIT_OBJECT_0)
{
throw IceUtil::ThreadSyscallException(__FILE__, __LINE__, GetLastError());
diff --git a/cpp/src/IceUtil/Makefile.mak b/cpp/src/IceUtil/Makefile.mak
index 3a8cb2dffae..48982171f16 100644
--- a/cpp/src/IceUtil/Makefile.mak
+++ b/cpp/src/IceUtil/Makefile.mak
@@ -47,7 +47,7 @@ CPPFLAGS = $(CPPFLAGS) -DICE_UTIL_API_EXPORTS -I.. -DWIN32_LEAN_AND_MEAN
PDBFLAGS = /pdb:$(DLLNAME:.dll=.pdb)
!endif
-!if "$(CPP_COMPILER)" == "BCC2007"
+!if "$(BCPLUSPLUS)" == "yes"
RES_FILE = ,, IceUtil.res
!else
RES_FILE = IceUtil.res
@@ -81,7 +81,7 @@ install:: all
copy $(DLLNAME) $(install_bindir)
-!if "$(CPP_COMPILER)" == "BCC2007" && "$(OPTIMIZE)" != "yes"
+!if "$(BCPLUSPLUS)" == "yes" && "$(OPTIMIZE)" != "yes"
install:: all
copy $(DLLNAME:.dll=.tds) $(install_bindir)
diff --git a/cpp/src/IceUtil/StringUtil.cpp b/cpp/src/IceUtil/StringUtil.cpp
index 11bcf108a96..a8499af2355 100644
--- a/cpp/src/IceUtil/StringUtil.cpp
+++ b/cpp/src/IceUtil/StringUtil.cpp
@@ -171,7 +171,6 @@ checkChar(char c)
static char
decodeChar(const string& s, string::size_type start, string::size_type end, string::size_type& nextStart)
{
- assert(start >= 0);
assert(start < end);
assert(end <= s.size());
@@ -282,10 +281,6 @@ static void decodeString(const string& s, string::size_type start, string::size_
bool
IceUtilInternal::unescapeString(const string& s, string::size_type start, string::size_type end, string& result)
{
- if(start < 0)
- {
- throw IllegalArgumentException(__FILE__, __LINE__, "start offset must be >= 0");
- }
if(end > s.size())
{
throw IllegalArgumentException(__FILE__, __LINE__, "end offset must be <= s.size()");
diff --git a/cpp/src/IceUtil/Thread.cpp b/cpp/src/IceUtil/Thread.cpp
index d39014ae653..c04f6c07c33 100644
--- a/cpp/src/IceUtil/Thread.cpp
+++ b/cpp/src/IceUtil/Thread.cpp
@@ -58,7 +58,7 @@ IceUtil::ThreadControl::join()
throw BadThreadControlException(__FILE__, __LINE__);
}
- int rc = WaitForSingleObject(_handle, INFINITE);
+ DWORD rc = WaitForSingleObject(_handle, INFINITE);
if(rc != WAIT_OBJECT_0)
{
throw ThreadSyscallException(__FILE__, __LINE__, GetLastError());
diff --git a/cpp/src/IceXML/Makefile.mak b/cpp/src/IceXML/Makefile.mak
index 42499e663a8..f895b22440c 100644
--- a/cpp/src/IceXML/Makefile.mak
+++ b/cpp/src/IceXML/Makefile.mak
@@ -28,7 +28,7 @@ LINKWITH = $(EXPAT_LIBS) $(BASELIBS)
PDBFLAGS = /pdb:$(DLLNAME:.dll=.pdb)
!endif
-!if "$(CPP_COMPILER)" == "BCC2007"
+!if "$(BCPLUSPLUS)" == "yes"
RES_FILE = ,, IceXML.res
!else
RES_FILE = IceXML.res
@@ -51,7 +51,7 @@ install:: all
copy $(DLLNAME) $(install_bindir)
-!if "$(CPP_COMPILER)" == "BCC2007" && "$(OPTIMIZE)" != "yes"
+!if "$(BCPLUSPLUS)" == "yes" && "$(OPTIMIZE)" != "yes"
install:: all
copy $(DLLNAME:.dll=.tds) $(install_bindir)
diff --git a/cpp/src/Slice/CPlusPlusUtil.cpp b/cpp/src/Slice/CPlusPlusUtil.cpp
index e09e622ea41..507faac36dc 100644
--- a/cpp/src/Slice/CPlusPlusUtil.cpp
+++ b/cpp/src/Slice/CPlusPlusUtil.cpp
@@ -59,7 +59,8 @@ Slice::printVersionCheck(Output& out)
{
out << "\n";
out << "\n#ifndef ICE_IGNORE_VERSION";
- if(ICE_INT_VERSION % 100 > 50)
+ int iceVersion = ICE_INT_VERSION; // Use this to prevent warning with C++Builder
+ if(iceVersion % 100 > 50)
{
//
// Beta version: exact match required
diff --git a/cpp/src/Slice/Makefile.mak b/cpp/src/Slice/Makefile.mak
index ad3e5a89611..dd76c272482 100644
--- a/cpp/src/Slice/Makefile.mak
+++ b/cpp/src/Slice/Makefile.mak
@@ -40,7 +40,7 @@ CPPFLAGS = -I.. -Idummyinclude $(CPPFLAGS) -DSLICE_API_EXPORTS -DWIN32_LEAN_AND
PDBFLAGS = /pdb:$(DLLNAME:.dll=.pdb)
!endif
-!if "$(CPP_COMPILER)" == "BCC2007"
+!if "$(BCPLUSPLUS)" == "yes"
RES_FILE = ,, Slice.res
!else
RES_FILE = Slice.res
@@ -88,7 +88,7 @@ install:: all
copy $(DLLNAME) $(install_bindir)
-!if "$(CPP_COMPILER)" == "BCC2007" && "$(OPTIMIZE)" != "yes"
+!if "$(BCPLUSPLUS)" == "yes" && "$(OPTIMIZE)" != "yes"
install:: all
copy $(DLLNAME:.dll=.tds) $(install_bindir)
diff --git a/cpp/src/iceserviceinstall/Install.cpp b/cpp/src/iceserviceinstall/Install.cpp
index 209f994b87f..78e0614cedc 100644
--- a/cpp/src/iceserviceinstall/Install.cpp
+++ b/cpp/src/iceserviceinstall/Install.cpp
@@ -67,6 +67,9 @@ Install::run(int argc, char* argv[])
vector<string> commands;
try
{
+#if defined(__BCPLUSPLUS__) && (__BCPLUSPLUS__ >= 0x0600)
+ IceUtil::DummyBCC dummy;
+#endif
commands = opts.parse(argc, (const char**)argv);
}
catch(const IceUtilInternal::BadOptException& e)
diff --git a/cpp/src/iceserviceinstall/Makefile.mak b/cpp/src/iceserviceinstall/Makefile.mak
index bf2dd53b875..d519dac0e7b 100644
--- a/cpp/src/iceserviceinstall/Makefile.mak
+++ b/cpp/src/iceserviceinstall/Makefile.mak
@@ -33,7 +33,7 @@ EXTRA_MANIFEST = security.manifest
PDBFLAGS = /pdb:$(TOOL:.exe=.pdb)
!endif
-!if "$(CPP_COMPILER)" == "BCC2007"
+!if "$(BCPLUSPLUS)" == "yes"
RES_FILE = ,, IceServiceInstall.res
!else
RES_FILE = IceServiceInstall.res
@@ -52,7 +52,7 @@ install:: all
copy $(TOOL) $(install_bindir)
-!if "$(CPP_COMPILER)" == "BCC2007" && "$(OPTIMIZE)" != "yes"
+!if "$(BCPLUSPLUS)" == "yes" && "$(OPTIMIZE)" != "yes"
install:: all
copy $(TOOL:.exe=.tds) $(install_bindir)
diff --git a/cpp/src/iceserviceinstall/ServiceInstaller.cpp b/cpp/src/iceserviceinstall/ServiceInstaller.cpp
index 70669764cd0..af489da477b 100644
--- a/cpp/src/iceserviceinstall/ServiceInstaller.cpp
+++ b/cpp/src/iceserviceinstall/ServiceInstaller.cpp
@@ -35,7 +35,7 @@ namespace
{
//
-// Replace / by \
+// Replace "/" by "\"
//
inline string
fixDirSeparator(const string& path)
@@ -807,7 +807,7 @@ IceServiceInstaller::removeSource(const string& source) const
{
throw "Could not close registry key handle: " + IceUtilInternal::errorToString(res);
}
- return subkey;
+ return string(subkey);
}
++index;
@@ -831,6 +831,8 @@ IceServiceInstaller::removeSource(const string& source) const
{
throw "Could not close registry key handle: " + IceUtilInternal::errorToString(res);
}
+
+ return ""; // To keep compilers happy.
}
string
diff --git a/cpp/src/slice2cpp/Gen.cpp b/cpp/src/slice2cpp/Gen.cpp
index 4c06ec03a98..b2a5b5384af 100644
--- a/cpp/src/slice2cpp/Gen.cpp
+++ b/cpp/src/slice2cpp/Gen.cpp
@@ -2367,6 +2367,15 @@ Slice::Gen::ProxyVisitor::visitOperation(const OperationPtr& p)
C << nl << "::IceInternal::Handle< ::IceDelegate::Ice::Object> __delBase;";
C << nl << "try";
C << sb;
+
+ C.zeroIndent();
+ C << nl << "#if defined(__BCPLUSPLUS__) && (__BCPLUSPLUS__ >= 0x0600) // C++Builder 2009 compiler bug";
+ C.restoreIndent();
+ C << nl << "IceUtil::DummyBCC dummy;";
+ C.zeroIndent();
+ C << nl << "#endif";
+ C.restoreIndent();
+
if(p->returnsData())
{
C << nl << "__checkTwowayOnly(" << p->flattenedScope() + p->name() + "_name);";
diff --git a/cpp/src/slice2cpp/Main.cpp b/cpp/src/slice2cpp/Main.cpp
index 7e42a5ab96a..cdbefe44792 100644
--- a/cpp/src/slice2cpp/Main.cpp
+++ b/cpp/src/slice2cpp/Main.cpp
@@ -85,6 +85,9 @@ main(int argc, char* argv[])
vector<string> args;
try
{
+#if defined(__BCPLUSPLUS__) && (__BCPLUSPLUS__ >= 0x0600)
+ IceUtil::DummyBCC dummy;
+#endif
args = opts.parse(argc, (const char**)argv);
}
catch(const IceUtilInternal::BadOptException& e)
diff --git a/cpp/src/slice2cpp/Makefile.mak b/cpp/src/slice2cpp/Makefile.mak
index 847211d4f52..e039744dea8 100644
--- a/cpp/src/slice2cpp/Makefile.mak
+++ b/cpp/src/slice2cpp/Makefile.mak
@@ -26,7 +26,7 @@ CPPFLAGS = -I. $(CPPFLAGS) -DWIN32_LEAN_AND_MEAN
PDBFLAGS = /pdb:$(NAME:.exe=.pdb)
!endif
-!if "$(CPP_COMPILER)" == "BCC2007"
+!if "$(BCPLUSPLUS)" == "yes"
RES_FILE = ,, Slice2Cpp.res
!else
RES_FILE = Slice2Cpp.res
@@ -46,7 +46,7 @@ install:: all
copy $(NAME) $(install_bindir)
-!if "$(CPP_COMPILER)" == "BCC2007" && "$(OPTIMIZE)" != "yes"
+!if "$(BCPLUSPLUS)" == "yes" && "$(OPTIMIZE)" != "yes"
install:: all
copy $(NAME:.exe=.tds) $(install_bindir)
diff --git a/cpp/src/slice2cs/Main.cpp b/cpp/src/slice2cs/Main.cpp
index 9e8edb4c963..6b9e1a87d15 100644
--- a/cpp/src/slice2cs/Main.cpp
+++ b/cpp/src/slice2cs/Main.cpp
@@ -79,6 +79,9 @@ main(int argc, char* argv[])
vector<string> args;
try
{
+#if defined(__BCPLUSPLUS__) && (__BCPLUSPLUS__ >= 0x0600)
+ IceUtil::DummyBCC dummy;
+#endif
args = opts.parse(argc, (const char**)argv);
}
catch(const IceUtilInternal::BadOptException& e)
diff --git a/cpp/src/slice2cs/Makefile.mak b/cpp/src/slice2cs/Makefile.mak
index 263fc9a09d4..3b86acc9f9b 100644
--- a/cpp/src/slice2cs/Makefile.mak
+++ b/cpp/src/slice2cs/Makefile.mak
@@ -26,7 +26,7 @@ CPPFLAGS = -I. $(CPPFLAGS) -DWIN32_LEAN_AND_MEAN
PDBFLAGS = /pdb:$(NAME:.exe=.pdb)
!endif
-!if "$(CPP_COMPILER)" == "BCC2007"
+!if "$(BCPLUSPLUS)" == "yes"
RES_FILE = ,, Slice2Cs.res
!else
RES_FILE = Slice2Cs.res
@@ -46,7 +46,7 @@ install:: all
copy $(NAME) $(install_bindir)
-!if "$(CPP_COMPILER)" == "BCC2007" && "$(OPTIMIZE)" != "yes"
+!if "$(BCPLUSPLUS)" == "yes" && "$(OPTIMIZE)" != "yes"
install:: all
copy $(NAME:.exe=.tds) $(install_bindir)
diff --git a/cpp/src/slice2docbook/Main.cpp b/cpp/src/slice2docbook/Main.cpp
index 566238a9db4..e7cca665ef7 100644
--- a/cpp/src/slice2docbook/Main.cpp
+++ b/cpp/src/slice2docbook/Main.cpp
@@ -76,6 +76,9 @@ main(int argc, char* argv[])
vector<string> args;
try
{
+#if defined(__BCPLUSPLUS__) && (__BCPLUSPLUS__ >= 0x0600)
+ IceUtil::DummyBCC dummy;
+#endif
args = opts.parse(argc, (const char**)argv);
}
catch(const IceUtilInternal::BadOptException& e)
diff --git a/cpp/src/slice2docbook/Makefile.mak b/cpp/src/slice2docbook/Makefile.mak
index 57fe865a385..6868dcdd40e 100644
--- a/cpp/src/slice2docbook/Makefile.mak
+++ b/cpp/src/slice2docbook/Makefile.mak
@@ -26,7 +26,7 @@ CPPFLAGS = -I. $(CPPFLAGS) -DWIN32_LEAN_AND_MEAN
PDBFLAGS = /pdb:$(NAME:.exe=.pdb)
!endif
-!if "$(CPP_COMPILER)" == "BCC2007"
+!if "$(BCPLUSPLUS)" == "yes"
RES_FILE = ,, Slice2Docbook.res
!else
RES_FILE = Slice2Docbook.res
@@ -46,7 +46,7 @@ install:: all
copy $(NAME) $(install_bindir)
-!if "$(CPP_COMPILER)" == "BCC2007" && "$(OPTIMIZE)" != "yes"
+!if "$(BCPLUSPLUS)" == "yes" && "$(OPTIMIZE)" != "yes"
install:: all
copy $(NAME:.exe=.tds) $(install_bindir)
diff --git a/cpp/src/slice2freeze/Main.cpp b/cpp/src/slice2freeze/Main.cpp
index 3243dd7ee1f..4978f0a699a 100644
--- a/cpp/src/slice2freeze/Main.cpp
+++ b/cpp/src/slice2freeze/Main.cpp
@@ -1503,6 +1503,9 @@ main(int argc, char* argv[])
vector<string> args;
try
{
+#if defined(__BCPLUSPLUS__) && (__BCPLUSPLUS__ >= 0x0600)
+ IceUtil::DummyBCC dummy;
+#endif
args = opts.parse(argc, (const char**)argv);
}
catch(const IceUtilInternal::BadOptException& e)
diff --git a/cpp/src/slice2freeze/Makefile.mak b/cpp/src/slice2freeze/Makefile.mak
index b810adcc1a9..cc68446c825 100644
--- a/cpp/src/slice2freeze/Makefile.mak
+++ b/cpp/src/slice2freeze/Makefile.mak
@@ -25,7 +25,7 @@ CPPFLAGS = -I. $(CPPFLAGS) -DWIN32_LEAN_AND_MEAN
PDBFLAGS = /pdb:$(NAME:.exe=.pdb)
!endif
-!if "$(CPP_COMPILER)" == "BCC2007"
+!if "$(BCPLUSPLUS)" == "yes"
RES_FILE = ,, Slice2Freeze.res
!else
RES_FILE = Slice2Freeze.res
@@ -45,7 +45,7 @@ install:: all
copy $(NAME) $(install_bindir)
-!if "$(CPP_COMPILER)" == "BCC2007" && "$(OPTIMIZE)" != "yes"
+!if "$(BCPLUSPLUS)" == "yes" && "$(OPTIMIZE)" != "yes"
install:: all
copy $(NAME:.exe=.tds) $(install_bindir)
diff --git a/cpp/src/slice2freezej/Main.cpp b/cpp/src/slice2freezej/Main.cpp
index 30ebf5a0147..336722f5f0f 100644
--- a/cpp/src/slice2freezej/Main.cpp
+++ b/cpp/src/slice2freezej/Main.cpp
@@ -1169,6 +1169,9 @@ main(int argc, char* argv[])
vector<string> args;
try
{
+#if defined(__BCPLUSPLUS__) && (__BCPLUSPLUS__ >= 0x0600)
+ IceUtil::DummyBCC dummy;
+#endif
args = opts.parse(argc, (const char**)argv);
}
catch(const IceUtilInternal::BadOptException& e)
diff --git a/cpp/src/slice2freezej/Makefile.mak b/cpp/src/slice2freezej/Makefile.mak
index d908bfacaa8..36738705a21 100644
--- a/cpp/src/slice2freezej/Makefile.mak
+++ b/cpp/src/slice2freezej/Makefile.mak
@@ -25,7 +25,7 @@ CPPFLAGS = -I. $(CPPFLAGS) -DWIN32_LEAN_AND_MEAN
PDBFLAGS = /pdb:$(NAME:.exe=.pdb)
!endif
-!if "$(CPP_COMPILER)" == "BCC2007"
+!if "$(BCPLUSPLUS)" == "yes"
RES_FILE = ,, Slice2FreezeJ.res
!else
RES_FILE = Slice2FreezeJ.res
@@ -45,7 +45,7 @@ install:: all
copy $(NAME) $(install_bindir)
-!if "$(CPP_COMPILER)" == "BCC2007" && "$(OPTIMIZE)" != "yes"
+!if "$(BCPLUSPLUS)" == "yes" && "$(OPTIMIZE)" != "yes"
install:: all
copy $(NAME:.exe=.tds) $(install_bindir)
diff --git a/cpp/src/slice2html/Main.cpp b/cpp/src/slice2html/Main.cpp
index 0b7557506fd..a939d6c8b67 100644
--- a/cpp/src/slice2html/Main.cpp
+++ b/cpp/src/slice2html/Main.cpp
@@ -85,6 +85,9 @@ main(int argc, char* argv[])
vector<string> args;
try
{
+#if defined(__BCPLUSPLUS__) && (__BCPLUSPLUS__ >= 0x0600)
+ IceUtil::DummyBCC dummy;
+#endif
args = opts.parse(argc, (const char**)argv);
}
catch(const IceUtilInternal::BadOptException& e)
diff --git a/cpp/src/slice2html/Makefile.mak b/cpp/src/slice2html/Makefile.mak
index 4b5e9383392..15272b3edd9 100644
--- a/cpp/src/slice2html/Makefile.mak
+++ b/cpp/src/slice2html/Makefile.mak
@@ -26,7 +26,7 @@ CPPFLAGS = -I. $(CPPFLAGS) -DWIN32_LEAN_AND_MEAN
PDBFLAGS = /pdb:$(NAME:.exe=.pdb)
!endif
-!if "$(CPP_COMPILER)" == "BCC2007"
+!if "$(BCPLUSPLUS)" == "yes"
RES_FILE = ,, Slice2Html.res
!else
RES_FILE = Slice2Html.res
@@ -46,7 +46,7 @@ install:: all
copy $(NAME) $(install_bindir)
-!if "$(CPP_COMPILER)" == "BCC2007" && "$(OPTIMIZE)" != "yes"
+!if "$(BCPLUSPLUS)" == "yes" && "$(OPTIMIZE)" != "yes"
install:: all
copy $(NAME:.exe=.tds) $(install_bindir)
diff --git a/cpp/src/slice2java/Main.cpp b/cpp/src/slice2java/Main.cpp
index 24d4a7c9263..7791dd0d72f 100644
--- a/cpp/src/slice2java/Main.cpp
+++ b/cpp/src/slice2java/Main.cpp
@@ -89,6 +89,9 @@ main(int argc, char* argv[])
vector<string>args;
try
{
+#if defined(__BCPLUSPLUS__) && (__BCPLUSPLUS__ >= 0x0600)
+ IceUtil::DummyBCC dummy;
+#endif
args = opts.parse(argc, (const char**)argv);
}
catch(const IceUtilInternal::BadOptException& e)
diff --git a/cpp/src/slice2java/Makefile.mak b/cpp/src/slice2java/Makefile.mak
index 4a16bbb3b56..1382446458e 100644
--- a/cpp/src/slice2java/Makefile.mak
+++ b/cpp/src/slice2java/Makefile.mak
@@ -26,7 +26,7 @@ CPPFLAGS = -I. $(CPPFLAGS) -DWIN32_LEAN_AND_MEAN
PDBFLAGS = /pdb:$(NAME:.exe=.pdb)
!endif
-!if "$(CPP_COMPILER)" == "BCC2007"
+!if "$(BCPLUSPLUS)" == "yes"
RES_FILE = ,, Slice2Java.res
!else
RES_FILE = Slice2Java.res
@@ -46,7 +46,7 @@ install:: all
copy $(NAME) $(install_bindir)
-!if "$(CPP_COMPILER)" == "BCC2007" && "$(OPTIMIZE)" != "yes"
+!if "$(BCPLUSPLUS)" == "yes" && "$(OPTIMIZE)" != "yes"
install:: all
copy $(NAME:.exe=.tds) $(install_bindir)
diff --git a/cpp/src/slice2py/Main.cpp b/cpp/src/slice2py/Main.cpp
index db84449cb2b..31eaf5fc784 100644
--- a/cpp/src/slice2py/Main.cpp
+++ b/cpp/src/slice2py/Main.cpp
@@ -404,6 +404,9 @@ main(int argc, char* argv[])
vector<string> args;
try
{
+#if defined(__BCPLUSPLUS__) && (__BCPLUSPLUS__ >= 0x0600)
+ IceUtil::DummyBCC dummy;
+#endif
args = opts.parse(argc, (const char**)argv);
}
catch(const IceUtilInternal::BadOptException& e)
diff --git a/cpp/src/slice2py/Makefile.mak b/cpp/src/slice2py/Makefile.mak
index 96b024beb14..2511c5316a8 100644
--- a/cpp/src/slice2py/Makefile.mak
+++ b/cpp/src/slice2py/Makefile.mak
@@ -25,7 +25,7 @@ CPPFLAGS = -I. $(CPPFLAGS) -DWIN32_LEAN_AND_MEAN
PDBFLAGS = /pdb:$(NAME:.exe=.pdb)
!endif
-!if "$(CPP_COMPILER)" == "BCC2007"
+!if "$(BCPLUSPLUS)" == "yes"
RES_FILE = ,, Slice2Py.res
!else
RES_FILE = Slice2Py.res
@@ -45,7 +45,7 @@ install:: all
copy $(NAME) $(install_bindir)
-!if "$(CPP_COMPILER)" == "BCC2007" && "$(OPTIMIZE)" != "yes"
+!if "$(BCPLUSPLUS)" == "yes" && "$(OPTIMIZE)" != "yes"
install:: all
copy $(NAME:.exe=.tds) $(install_bindir)
diff --git a/cpp/src/slice2rb/Main.cpp b/cpp/src/slice2rb/Main.cpp
index 85f6d37bd3c..fdaf0466da0 100644
--- a/cpp/src/slice2rb/Main.cpp
+++ b/cpp/src/slice2rb/Main.cpp
@@ -88,6 +88,9 @@ main(int argc, char* argv[])
vector<string> args;
try
{
+#if defined(__BCPLUSPLUS__) && (__BCPLUSPLUS__ >= 0x0600)
+ IceUtil::DummyBCC dummy;
+#endif
args = opts.parse(argc, (const char**)argv);
}
catch(const IceUtilInternal::BadOptException& e)
diff --git a/cpp/src/slice2rb/Makefile.mak b/cpp/src/slice2rb/Makefile.mak
index 723f75de9bd..4ece13489a3 100644
--- a/cpp/src/slice2rb/Makefile.mak
+++ b/cpp/src/slice2rb/Makefile.mak
@@ -25,7 +25,7 @@ CPPFLAGS = -I. $(CPPFLAGS) -DWIN32_LEAN_AND_MEAN
PDBFLAGS = /pdb:$(NAME:.exe=.pdb)
!endif
-!if "$(CPP_COMPILER)" == "BCC2007"
+!if "$(BCPLUSPLUS)" == "yes"
RES_FILE = ,, Slice2Rb.res
!else
RES_FILE = Slice2Rb.res
@@ -45,7 +45,7 @@ install:: all
copy $(NAME) $(install_bindir)
-!if "$(CPP_COMPILER)" == "BCC2007" && "$(OPTIMIZE)" != "yes"
+!if "$(BCPLUSPLUS)" == "yes" && "$(OPTIMIZE)" != "yes"
install:: all
copy $(NAME:.exe=.tds) $(install_bindir)