diff options
Diffstat (limited to 'cpp/src')
38 files changed, 131 insertions, 42 deletions
diff --git a/cpp/src/Freeze/Makefile.mak b/cpp/src/Freeze/Makefile.mak index b77ffc77bdb..014163eccf6 100644 --- a/cpp/src/Freeze/Makefile.mak +++ b/cpp/src/Freeze/Makefile.mak @@ -55,7 +55,7 @@ CPPFLAGS = -I.. $(CPPFLAGS) -DFREEZE_API_EXPORTS -DWIN32_LEAN_AND_MEAN SLICE2CPPFLAGS = --ice --include-dir Freeze --dll-export FREEZE_API $(SLICE2CPPFLAGS)
LINKWITH = $(LIBS) $(DB_LIBS)
-!if "$(CPP_COMPILER)" != "BCC2006" && "$(OPTIMIZE)" != "yes"
+!if "$(GENERATE_PDB)" == "yes"
PDBFLAGS = /pdb:$(DLLNAME:.dll=.pdb)
!endif
diff --git a/cpp/src/FreezeScript/Makefile.mak b/cpp/src/FreezeScript/Makefile.mak index 61fd4574e54..a3ead3e7fa4 100644 --- a/cpp/src/FreezeScript/Makefile.mak +++ b/cpp/src/FreezeScript/Makefile.mak @@ -42,7 +42,7 @@ HDIR = $(includedir)\FreezeScript CPPFLAGS = -I.. -Idummyinclude $(CPPFLAGS) -DWIN32_LEAN_AND_MEAN
LINKWITH = slice$(LIBSUFFIX).lib icexml$(LIBSUFFIX).lib freeze$(LIBSUFFIX).lib $(LIBS) $(DB_LIBS)
-!if "$(CPP_COMPILER)" != "BCC2006" && "$(OPTIMIZE)" != "yes"
+!if "$(GENERATE_PDB)" == "yes"
TPDBFLAGS = /pdb:$(TRANSFORMDB:.exe=.pdb)
DPDBFLAGS = /pdb:$(DUMPDB:.exe=.pdb)
!endif
diff --git a/cpp/src/Glacier2/Makefile.mak b/cpp/src/Glacier2/Makefile.mak index 9e8c87fa454..ef41b9387ef 100644 --- a/cpp/src/Glacier2/Makefile.mak +++ b/cpp/src/Glacier2/Makefile.mak @@ -65,7 +65,7 @@ CPPFLAGS = -I.. $(CPPFLAGS) -DGLACIER2_API_EXPORTS !endif
-!if "$(CPP_COMPILER)" != "BCC2006" && "$(OPTIMIZE)" != "yes"
+!if "$(GENERATE_PDB)" == "yes"
PDBFLAGS = /pdb:$(DLLNAME:.dll=.pdb)
RPDBFLAGS = /pdb:$(ROUTER:.exe=.pdb)
!endif
diff --git a/cpp/src/Ice/DLLMain.cpp b/cpp/src/Ice/DLLMain.cpp index 125e5f799dd..7c07fef0b9a 100644 --- a/cpp/src/Ice/DLLMain.cpp +++ b/cpp/src/Ice/DLLMain.cpp @@ -23,11 +23,18 @@ DllMain(HINSTANCE hDLL, DWORD reason, LPVOID reserved) #else ice_DLL_Main(HINSTANCE hDLL, DWORD reason, LPVOID reserved) { - if(!_CRT_INIT(hDLL, reason, reserved)) + // + // During ATTACH, we must call _CRT_INIT first. + // + if(reason == DLL_PROCESS_ATTACH || reason == DLL_THREAD_ATTACH) { - return FALSE; + if(!_CRT_INIT(hDLL, reason, reserved)) + { + return FALSE; + } } #endif + if(reason == DLL_PROCESS_ATTACH) { Ice::EventLoggerI::setModuleHandle(hDLL); @@ -38,6 +45,19 @@ ice_DLL_Main(HINSTANCE hDLL, DWORD reason, LPVOID reserved) Ice::ImplicitContextI::cleanupThread(); } +#ifndef __BCPLUSPLUS__ + // + // During DETACH, we must call _CRT_INIT last. + // + if(reason == DLL_PROCESS_DETACH || reason == DLL_THREAD_DETACH) + { + if(!_CRT_INIT(hDLL, reason, reserved)) + { + return FALSE; + } + } +#endif + return TRUE; } diff --git a/cpp/src/Ice/EndpointI.h b/cpp/src/Ice/EndpointI.h index b9ae321550c..b3a1e603394 100644 --- a/cpp/src/Ice/EndpointI.h +++ b/cpp/src/Ice/EndpointI.h @@ -148,11 +148,13 @@ public: virtual bool operator!=(const EndpointI&) const = 0; virtual bool operator<(const EndpointI&) const = 0; -private: +protected: virtual std::vector<ConnectorPtr> connectors(const std::vector<struct sockaddr_storage>&) const; friend class EndpointHostResolver; +private: + #if defined(__SUNPRO_CC) || defined(__HP_aCC) // // COMPILERFIX: prevent the compiler from emitting a warning about diff --git a/cpp/src/Ice/Ice.rc b/cpp/src/Ice/Ice.rc index 1f140d966e5..ab5cdb03feb 100644 --- a/cpp/src/Ice/Ice.rc +++ b/cpp/src/Ice/Ice.rc @@ -1,4 +1,5 @@ #include "winver.h"
+#include "EventLoggerMsg.rc"
VS_VERSION_INFO VERSIONINFO
FILEVERSION 3,3,51,0
diff --git a/cpp/src/Ice/Makefile.mak b/cpp/src/Ice/Makefile.mak index 3d638b323cb..5906305ad26 100644 --- a/cpp/src/Ice/Makefile.mak +++ b/cpp/src/Ice/Makefile.mak @@ -119,19 +119,19 @@ SLICE2CPPFLAGS = --ice --include-dir Ice --dll-export ICE_API $(SLICE2CPPFLAGS) LINKWITH = $(BASELIBS) $(BZIP2_LIBS) $(ICE_OS_LIBS) ws2_32.lib Iphlpapi.lib
!if "$(CPP_COMPILER)" == "BCC2006"
-RES_FILE = ,, EventLoggerMsg.res
+RES_FILE = ,, Ice.res
!else
-!if "$(OPTIMIZE)" != "yes"
+!if "$(GENERATE_PDB)" == "yes"
PDBFLAGS = /pdb:$(DLLNAME:.dll=.pdb)
!endif
LD_DLLFLAGS = $(LD_DLLFLAGS) /entry:"ice_DLL_Main"
-RES_FILE = EventLoggerMsg.res
+RES_FILE = Ice.res
!endif
$(LIBNAME): $(DLLNAME)
$(DLLNAME): $(OBJS) Ice.res
- $(LINK) $(LD_DLLFLAGS) $(PDBFLAGS) $(OBJS) Ice.res $(PREOUT)$@ $(PRELIBS)$(LINKWITH) $(RES_FILE)
+ $(LINK) $(LD_DLLFLAGS) $(PDBFLAGS) $(OBJS) $(PREOUT)$@ $(PRELIBS)$(LINKWITH) $(RES_FILE)
move $(DLLNAME:.dll=.lib) $(LIBNAME)
@if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \
$(MT) -nologo -manifest $@.manifest -outputresource:$@;#2 && del /q $@.manifest
@@ -144,11 +144,10 @@ $(HDIR)\BuiltinSequences.h BuiltinSequences.cpp: $(SDIR)\BuiltinSequences.ice $( EventLoggerI.obj: EventLoggerMsg.h
-EventLoggerMsg.h EventLoggerMsg.res: EventLoggerMsg.mc
+EventLoggerMsg.h EventLoggerMsg.rc: EventLoggerMsg.mc
mc EventLoggerMsg.mc
- $(RC) -r -fo EventLoggerMsg.res EventLoggerMsg.rc
-Ice.res: Ice.rc
+Ice.res: Ice.rc EventLoggerMsg.rc
rc.exe $(RCFLAGS) Ice.rc
clean::
@@ -186,6 +185,7 @@ clean:: del /q StatsF.cpp $(HDIR)\StatsF.h
del /q Stats.cpp $(HDIR)\Stats.h
del /q $(DLLNAME:.dll=.*)
+ del /q EventLoggerMsg.h EventLoggerMsg.rc
del /q Ice.res
install:: all
diff --git a/cpp/src/Ice/UnknownEndpointI.h b/cpp/src/Ice/UnknownEndpointI.h index 8010cc54d67..4c383ebdedf 100644 --- a/cpp/src/Ice/UnknownEndpointI.h +++ b/cpp/src/Ice/UnknownEndpointI.h @@ -45,6 +45,9 @@ public: virtual bool operator!=(const EndpointI&) const; virtual bool operator<(const EndpointI&) const; +protected: + using EndpointI::connectors; + private: #if defined(__SUNPRO_CC) diff --git a/cpp/src/IceBox/Makefile.mak b/cpp/src/IceBox/Makefile.mak index d9a59c8193a..082d5a5a042 100644 --- a/cpp/src/IceBox/Makefile.mak +++ b/cpp/src/IceBox/Makefile.mak @@ -54,7 +54,7 @@ CPPFLAGS = -I.. $(CPPFLAGS) -DICE_BOX_API_EXPORTS SLICE2CPPFLAGS = --checksum --ice --dll-export ICE_BOX_API --include-dir IceBox $(SLICE2CPPFLAGS)
-!if "$(CPP_COMPILER)" != "BCC2006" && "$(OPTIMIZE)" != "yes"
+!if "$(GENERATE_PDB)" == "yes"
PDBFLAGS = /pdb:$(DLLNAME:.dll=.pdb)
SPDBFLAGS = /pdb:$(SERVER:.exe=.pdb)
APDBFLAGS = /pdb:$(ADMIN:.exe=.pdb)
diff --git a/cpp/src/IceGrid/Database.h b/cpp/src/IceGrid/Database.h index dd49f5c4431..e9f1f962a4f 100644 --- a/cpp/src/IceGrid/Database.h +++ b/cpp/src/IceGrid/Database.h @@ -50,6 +50,12 @@ class Database : public IceUtil::Shared, public IceUtil::Monitor<IceUtil::Mutex> { public: +#ifdef __SUNPRO_CC + using IceUtil::Monitor<IceUtil::Mutex>::lock; + using IceUtil::Monitor<IceUtil::Mutex>::unlock; +#endif + + Database(const Ice::ObjectAdapterPtr&, const IceStorm::TopicManagerPrx&, const std::string&, const TraceLevelsPtr&, const RegistryInfo&, bool); virtual ~Database(); diff --git a/cpp/src/IceGrid/DescriptorHelper.h b/cpp/src/IceGrid/DescriptorHelper.h index fc019bbca57..4f69318239f 100644 --- a/cpp/src/IceGrid/DescriptorHelper.h +++ b/cpp/src/IceGrid/DescriptorHelper.h @@ -130,6 +130,8 @@ public: protected: + using CommunicatorHelper::instantiateImpl; + void instantiateImpl(const ServiceDescriptorPtr&, const Resolver&, const PropertyDescriptorSeq&, const PropertySetDescriptorDict&) const; @@ -157,6 +159,8 @@ public: protected: + using CommunicatorHelper::instantiateImpl; + void printImpl(const Ice::CommunicatorPtr&, IceUtilInternal::Output&, const ServerInfo&) const; void instantiateImpl(const ServerDescriptorPtr&, const Resolver&, const PropertyDescriptorSeq&) const; @@ -221,6 +225,8 @@ public: protected: + using ServerHelper::instantiateImpl; + void instantiateImpl(const IceBoxDescriptorPtr&, const Resolver&, const PropertyDescriptorSeq&, const PropertySetDescriptorDict&) const; diff --git a/cpp/src/IceGrid/Makefile.mak b/cpp/src/IceGrid/Makefile.mak index 7362990109f..81c8f3b7ecd 100644 --- a/cpp/src/IceGrid/Makefile.mak +++ b/cpp/src/IceGrid/Makefile.mak @@ -111,7 +111,7 @@ CPPFLAGS = -I. -I.. -Idummyinclude $(CPPFLAGS) -DWIN32_LEAN_AND_MEAN CPPFLAGS = $(CPPFLAGS) -Zm200
!endif
-!if "$(CPP_COMPILER)" != "BCC2006" && "$(OPTIMIZE)" != "yes"
+!if "$(GENERATE_PDB)" == "yes"
APDBFLAGS = /pdb:$(ADMIN:.exe=.pdb)
RPDBFLAGS = /pdb:$(REGISTRY_SERVER:.exe=.pdb)
NPDBFLAGS = /pdb:$(NODE_SERVER:.exe=.pdb)
diff --git a/cpp/src/IceGrid/ReplicaCache.h b/cpp/src/IceGrid/ReplicaCache.h index da84f6738d0..6f2ca39dd83 100644 --- a/cpp/src/IceGrid/ReplicaCache.h +++ b/cpp/src/IceGrid/ReplicaCache.h @@ -47,6 +47,10 @@ class ReplicaCache : public CacheByString<ReplicaEntry> { public: +#ifdef __SUNPRO_CC + using CacheByString<ReplicaEntry>::remove; +#endif + ReplicaCache(const Ice::CommunicatorPtr&, const IceStorm::TopicManagerPrx&); ReplicaEntryPtr add(const std::string&, const ReplicaSessionIPtr&); diff --git a/cpp/src/IceGrid/ServerCache.h b/cpp/src/IceGrid/ServerCache.h index 2a4b5359414..5e70790592c 100644 --- a/cpp/src/IceGrid/ServerCache.h +++ b/cpp/src/IceGrid/ServerCache.h @@ -96,6 +96,10 @@ class ServerCache : public CacheByString<ServerEntry> { public: +#ifdef __SUNPRO_CC + using CacheByString<ServerEntry>::remove; +#endif + ServerCache(const Ice::CommunicatorPtr&, const std::string&, NodeCache&, AdapterCache&, ObjectCache&, AllocatableObjectCache&); ServerEntryPtr add(const ServerInfo&); diff --git a/cpp/src/IceGridLib/Makefile.mak b/cpp/src/IceGridLib/Makefile.mak index fb3febe4255..4f147f79784 100644 --- a/cpp/src/IceGridLib/Makefile.mak +++ b/cpp/src/IceGridLib/Makefile.mak @@ -37,7 +37,7 @@ LINKWITH = $(LIBS) glacier2$(LIBSUFFIX).lib SLICE2CPPFLAGS = --checksum --ice --include-dir IceGrid --dll-export ICE_GRID_API $(SLICE2CPPFLAGS)
CPPFLAGS = -I.. -DICE_GRID_API_EXPORTS $(CPPFLAGS)
-!if "$(CPP_COMPILER)" != "BCC2006" && "$(OPTIMIZE)" != "yes"
+!if "$(GENERATE_PDB)" == "yes"
PDBFLAGS = /pdb:$(DLLNAME:.dll=.pdb)
!endif
diff --git a/cpp/src/IcePatch2/Makefile.mak b/cpp/src/IcePatch2/Makefile.mak index ed139aee154..58b9773179b 100644 --- a/cpp/src/IcePatch2/Makefile.mak +++ b/cpp/src/IcePatch2/Makefile.mak @@ -61,7 +61,7 @@ CPPFLAGS = -I. -I.. $(CPPFLAGS) -DICE_PATCH2_API_EXPORTS -DWIN32_LEAN_AND_MEAN SLICE2CPPFLAGS = --ice --include-dir IcePatch2 --dll-export ICE_PATCH2_API $(SLICE2CPPFLAGS)
-!if "$(CPP_COMPILER)" != "BCC2006" && "$(OPTIMIZE)" != "yes"
+!if "$(GENERATE_PDB)" == "yes"
PDBFLAGS = /pdb:$(DLLNAME:.dll=.pdb)
SPDBFLAGS = /pdb:$(SERVER:.exe=.pdb)
CPDBFLAGS = /pdb:$(CLIENT:.exe=.pdb)
diff --git a/cpp/src/IceSSL/Makefile.mak b/cpp/src/IceSSL/Makefile.mak index ab915c88e3e..9bf80c9ef01 100644 --- a/cpp/src/IceSSL/Makefile.mak +++ b/cpp/src/IceSSL/Makefile.mak @@ -38,7 +38,7 @@ LINKWITH = $(OPENSSL_LIBS) $(LIBS) LINKWITH = $(LINKWITH) ws2_32.lib
!endif
-!if "$(CPP_COMPILER)" != "BCC2006" && "$(OPTIMIZE)" != "yes"
+!if "$(GENERATE_PDB)" == "yes"
PDBFLAGS = /pdb:$(DLLNAME:.dll=.pdb)
!endif
diff --git a/cpp/src/IceStorm/Makefile.mak b/cpp/src/IceStorm/Makefile.mak index 61fa5ec1efc..1aef50b17ad 100644 --- a/cpp/src/IceStorm/Makefile.mak +++ b/cpp/src/IceStorm/Makefile.mak @@ -94,7 +94,7 @@ CPPFLAGS = $(CPPFLAGS) -DICE_STORM_LIB_API_EXPORTS !endif
-!if "$(CPP_COMPILER)" != "BCC2006" && "$(OPTIMIZE)" != "yes"
+!if "$(GENERATE_PDB)" == "yes"
PDBFLAGS = /pdb:$(DLLNAME:.dll=.pdb)
SPDBFLAGS = /pdb:$(SVCDLLNAME:.dll=.pdb)
APDBFLAGS = /pdb:$(ADMIN:.exe=.pdb)
diff --git a/cpp/src/IceUtil/Makefile.mak b/cpp/src/IceUtil/Makefile.mak index 4df4397d710..d3dabd7269d 100644 --- a/cpp/src/IceUtil/Makefile.mak +++ b/cpp/src/IceUtil/Makefile.mak @@ -42,7 +42,7 @@ SRCS = $(OBJS:.obj=.cpp) CPPFLAGS = $(CPPFLAGS) -DICE_UTIL_API_EXPORTS -I.. -DWIN32_LEAN_AND_MEAN
-!if "$(CPP_COMPILER)" != "BCC2006" && "$(OPTIMIZE)" != "yes"
+!if "$(GENERATE_PDB)" == "yes"
PDBFLAGS = /pdb:$(DLLNAME:.dll=.pdb)
!endif
diff --git a/cpp/src/IceXML/Makefile.mak b/cpp/src/IceXML/Makefile.mak index ea81ddd4a9d..ab41e476cfb 100644 --- a/cpp/src/IceXML/Makefile.mak +++ b/cpp/src/IceXML/Makefile.mak @@ -24,7 +24,7 @@ CPPFLAGS = $(CPPFLAGS) -DICE_XML_API_EXPORTS -DWIN32_LEAN_AND_MEAN LINKWITH = $(EXPAT_LIBS) $(BASELIBS)
-!if "$(CPP_COMPILER)" != "BCC2006" && "$(OPTIMIZE)" != "yes"
+!if "$(GENERATE_PDB)" == "yes"
PDBFLAGS = /pdb:$(DLLNAME:.dll=.pdb)
!endif
diff --git a/cpp/src/Slice/Makefile.mak b/cpp/src/Slice/Makefile.mak index 169f97b3a52..0b361d34eae 100644 --- a/cpp/src/Slice/Makefile.mak +++ b/cpp/src/Slice/Makefile.mak @@ -36,7 +36,7 @@ SRCS = $(OBJS:.obj=.cpp) CPPFLAGS = -I.. -Idummyinclude $(CPPFLAGS) -DSLICE_API_EXPORTS -DWIN32_LEAN_AND_MEAN
-!if "$(CPP_COMPILER)" != "BCC2006" && "$(OPTIMIZE)" != "yes"
+!if "$(GENERATE_PDB)" == "yes"
PDBFLAGS = /pdb:$(DLLNAME:.dll=.pdb)
!endif
diff --git a/cpp/src/iceserviceinstall/Install.cpp b/cpp/src/iceserviceinstall/Install.cpp index 124961b9e83..c1e11015280 100755 --- a/cpp/src/iceserviceinstall/Install.cpp +++ b/cpp/src/iceserviceinstall/Install.cpp @@ -23,6 +23,7 @@ public: bool pauseEnabled() const; bool debug() const; + bool pause() const; private: @@ -30,6 +31,7 @@ private: bool _debug; bool _pauseEnabled; + bool _pause; }; int @@ -38,7 +40,7 @@ main(int argc, char* argv[]) Install app; int status = app.main(argc, argv); - if(app.pauseEnabled() && (app.debug() || status != 0)) + if(app.pauseEnabled() && (app.pause() || app.debug() || status != 0)) { system("pause"); } @@ -74,19 +76,21 @@ Install::run(int argc, char* argv[]) return EXIT_FAILURE; } + _pauseEnabled = !opts.isSet("nopause"); + if(opts.isSet("help")) { usage(); + _pause = true; return EXIT_SUCCESS; } if(opts.isSet("version")) { cout << ICE_STRING_VERSION << endl; + _pause = true; return EXIT_SUCCESS; } - _pauseEnabled = !opts.isSet("nopause"); - if(commands.size() != 2) { usage(); @@ -151,7 +155,8 @@ Install::run(int argc, char* argv[]) Install::Install() : _pauseEnabled(true), - _debug(false) + _debug(false), + _pause(false) { } @@ -167,6 +172,12 @@ Install::debug() const return _debug; } +bool +Install::pause() const +{ + return _pause; +} + void Install::usage() const { diff --git a/cpp/src/iceserviceinstall/Makefile.mak b/cpp/src/iceserviceinstall/Makefile.mak index e8e9b3250ff..b54ab80710a 100755 --- a/cpp/src/iceserviceinstall/Makefile.mak +++ b/cpp/src/iceserviceinstall/Makefile.mak @@ -29,7 +29,7 @@ LINKWITH = /MANIFESTUAC:"level='requireAdministrator' uiAccess='false'" $(LINKWI EXTRA_MANIFEST = security.manifest
!endif
-!if "$(CPP_COMPILER)" != "BCC2006" && "$(OPTIMIZE)" != "yes"
+!if "$(GENERATE_PDB)" == "yes"
PDBFLAGS = /pdb:$(TOOL:.exe=.pdb)
!endif
diff --git a/cpp/src/iceserviceinstall/ServiceInstaller.cpp b/cpp/src/iceserviceinstall/ServiceInstaller.cpp index 66c770998b5..fc055fe1efc 100755 --- a/cpp/src/iceserviceinstall/ServiceInstaller.cpp +++ b/cpp/src/iceserviceinstall/ServiceInstaller.cpp @@ -30,10 +30,28 @@ using namespace std; using namespace Ice; +// +// Replace / by \ +// +inline string +fixDirSeparator(const string& path) +{ + string result = path; + size_t pos = 0; + while((pos = result.find('/', pos)) != string::npos) + { + result[pos] = '\\'; + pos++; + } + + return result; +} + + IceServiceInstaller::IceServiceInstaller(int serviceType, const string& configFile, const CommunicatorPtr& communicator) : _serviceType(serviceType), - _configFile(configFile), + _configFile(fixDirSeparator(configFile)), _communicator(communicator), _serviceProperties(createProperties()), _sid(0), @@ -137,6 +155,10 @@ IceServiceInstaller::install(const PropertiesPtr& properties) imagePath.replace(imagePath.rfind('\\'), string::npos, "\\" + serviceTypeToLowerString(_serviceType) + ".exe"); } + else + { + imagePath = fixDirSeparator(imagePath); + } if(!fileExists(imagePath)) { throw imagePath + ": not found"; @@ -151,7 +173,7 @@ IceServiceInstaller::install(const PropertiesPtr& properties) throw "The IceGrid registry service can't depend on itself"; } - string registryDataDir = _serviceProperties->getProperty("IceGrid.Registry.Data"); + string registryDataDir = fixDirSeparator(_serviceProperties->getProperty("IceGrid.Registry.Data")); if(registryDataDir == "") { throw "IceGrid.Registry.Data must be set in " + _configFile; @@ -163,7 +185,7 @@ IceServiceInstaller::install(const PropertiesPtr& properties) } else if(_serviceType == icegridnode) { - string nodeDataDir = _serviceProperties->getProperty("IceGrid.Node.Data"); + string nodeDataDir = fixDirSeparator(_serviceProperties->getProperty("IceGrid.Node.Data")); if(nodeDataDir == "") { throw "IceGrid.Node.Data must be set in " + _configFile; diff --git a/cpp/src/slice2cpp/Gen.cpp b/cpp/src/slice2cpp/Gen.cpp index ddf90893d2b..85662dff609 100755 --- a/cpp/src/slice2cpp/Gen.cpp +++ b/cpp/src/slice2cpp/Gen.cpp @@ -2694,7 +2694,12 @@ Slice::Gen::DelegateMVisitor::visitOperation(const OperationPtr& p) } C << nl << "catch(const ::Ice::UserException& __ex)"; C << sb; - C << nl << "throw ::Ice::UnknownUserException(__FILE__, __LINE__, __ex.ice_name());"; + // + // COMPILERFIX: Don't throw UnknownUserException directly. This is causing access + // violation errors with Visual C++ 64bits optimized builds. See bug #2962. + // + C << nl << "::Ice::UnknownUserException __uue(__FILE__, __LINE__, __ex.ice_name());"; + C << nl << "throw __uue;"; C << eb; C << eb; diff --git a/cpp/src/slice2cpp/Makefile.mak b/cpp/src/slice2cpp/Makefile.mak index 16b28dacd30..433bcac6e89 100644 --- a/cpp/src/slice2cpp/Makefile.mak +++ b/cpp/src/slice2cpp/Makefile.mak @@ -22,7 +22,7 @@ SRCS = $(OBJS:.obj=.cpp) CPPFLAGS = -I. $(CPPFLAGS) -DWIN32_LEAN_AND_MEAN
-!if "$(CPP_COMPILER)" != "BCC2006" && "$(OPTIMIZE)" != "yes"
+!if "$(GENERATE_PDB)" == "yes"
PDBFLAGS = /pdb:$(NAME:.exe=.pdb)
!endif
diff --git a/cpp/src/slice2cppe/Makefile.mak b/cpp/src/slice2cppe/Makefile.mak index d9d5a35f7ea..956d83bd492 100644 --- a/cpp/src/slice2cppe/Makefile.mak +++ b/cpp/src/slice2cppe/Makefile.mak @@ -22,7 +22,7 @@ SRCS = $(OBJS:.obj=.cpp) CPPFLAGS = -I. $(CPPFLAGS) -DWIN32_LEAN_AND_MEAN
-!if "$(CPP_COMPILER)" != "BCC2006" && "$(OPTIMIZE)" != "yes"
+!if "$(GENERATE_PDB)" == "yes"
PDBFLAGS = /pdb:$(NAME:.exe=.pdb)
!endif
diff --git a/cpp/src/slice2cs/Makefile.mak b/cpp/src/slice2cs/Makefile.mak index 358b81b5a90..02d60d3f5a7 100644 --- a/cpp/src/slice2cs/Makefile.mak +++ b/cpp/src/slice2cs/Makefile.mak @@ -22,7 +22,7 @@ SRCS = $(OBJS:.obj=.cpp) CPPFLAGS = -I. $(CPPFLAGS) -DWIN32_LEAN_AND_MEAN
-!if "$(CPP_COMPILER)" != "BCC2006" && "$(OPTIMIZE)" != "yes"
+!if "$(GENERATE_PDB)" == "yes"
PDBFLAGS = /pdb:$(NAME:.exe=.pdb)
!endif
diff --git a/cpp/src/slice2docbook/Makefile.mak b/cpp/src/slice2docbook/Makefile.mak index 108ed0f1521..b810365c1cf 100644 --- a/cpp/src/slice2docbook/Makefile.mak +++ b/cpp/src/slice2docbook/Makefile.mak @@ -22,7 +22,7 @@ SRCS = $(OBJS:.obj=.cpp) CPPFLAGS = -I. $(CPPFLAGS) -DWIN32_LEAN_AND_MEAN
-!if "$(CPP_COMPILER)" != "BCC2006" && "$(OPTIMIZE)" != "yes"
+!if "$(GENERATE_PDB)" == "yes"
PDBFLAGS = /pdb:$(NAME:.exe=.pdb)
!endif
diff --git a/cpp/src/slice2freeze/Makefile.mak b/cpp/src/slice2freeze/Makefile.mak index 3646472a8b3..642e5eb78c1 100644 --- a/cpp/src/slice2freeze/Makefile.mak +++ b/cpp/src/slice2freeze/Makefile.mak @@ -21,6 +21,10 @@ SRCS = $(OBJS:.obj=.cpp) CPPFLAGS = -I. $(CPPFLAGS) -DWIN32_LEAN_AND_MEAN
+!if "$(GENERATE_PDB)" == "yes"
+PDBFLAGS = /pdb:$(NAME:.exe=.pdb)
+!endif
+
$(NAME): $(OBJS) Slice2Freeze.res
$(LINK) $(LD_EXEFLAGS) $(PDBFLAGS) $(OBJS) Slice2Freeze.res $(SETARGV) $(PREOUT)$@ \
$(PRELIBS)slice$(LIBSUFFIX).lib $(BASELIBS)
diff --git a/cpp/src/slice2freezej/Makefile.mak b/cpp/src/slice2freezej/Makefile.mak index d0864681d3f..30539e60fb5 100644 --- a/cpp/src/slice2freezej/Makefile.mak +++ b/cpp/src/slice2freezej/Makefile.mak @@ -21,7 +21,7 @@ SRCS = $(OBJS:.obj=.cpp) CPPFLAGS = -I. $(CPPFLAGS) -DWIN32_LEAN_AND_MEAN
-!if "$(CPP_COMPILER)" != "BCC2006" && "$(OPTIMIZE)" != "yes"
+!if "$(GENERATE_PDB)" == "yes"
PDBFLAGS = /pdb:$(NAME:.exe=.pdb)
!endif
diff --git a/cpp/src/slice2html/Gen.h b/cpp/src/slice2html/Gen.h index 362c612d335..3709c515495 100644 --- a/cpp/src/slice2html/Gen.h +++ b/cpp/src/slice2html/Gen.h @@ -114,6 +114,7 @@ public: private: + using GeneratorBase::printHeaderFooter; void printHeaderFooter(); typedef ::std::pair< ::std::string, ::std::string> StringPair; diff --git a/cpp/src/slice2html/Makefile.mak b/cpp/src/slice2html/Makefile.mak index 7b35976070e..a3110b9790f 100644 --- a/cpp/src/slice2html/Makefile.mak +++ b/cpp/src/slice2html/Makefile.mak @@ -22,7 +22,7 @@ SRCS = $(OBJS:.obj=.cpp) CPPFLAGS = -I. $(CPPFLAGS) -DWIN32_LEAN_AND_MEAN
-!if "$(CPP_COMPILER)" != "BCC2006" && "$(OPTIMIZE)" != "yes"
+!if "$(GENERATE_PDB)" == "yes"
PDBFLAGS = /pdb:$(NAME:.exe=.pdb)
!endif
diff --git a/cpp/src/slice2java/Makefile.mak b/cpp/src/slice2java/Makefile.mak index 5123296d2c5..cee1a3e638f 100644 --- a/cpp/src/slice2java/Makefile.mak +++ b/cpp/src/slice2java/Makefile.mak @@ -22,7 +22,7 @@ SRCS = $(OBJS:.obj=.cpp) CPPFLAGS = -I. $(CPPFLAGS) -DWIN32_LEAN_AND_MEAN
-!if "$(CPP_COMPILER)" != "BCC2006" && "$(OPTIMIZE)" != "yes"
+!if "$(GENERATE_PDB)" == "yes"
PDBFLAGS = /pdb:$(NAME:.exe=.pdb)
!endif
diff --git a/cpp/src/slice2javae/Makefile.mak b/cpp/src/slice2javae/Makefile.mak index 24f4d8c184d..c74e55bb3e2 100644 --- a/cpp/src/slice2javae/Makefile.mak +++ b/cpp/src/slice2javae/Makefile.mak @@ -22,7 +22,7 @@ SRCS = $(OBJS:.obj=.cpp) CPPFLAGS = -I. $(CPPFLAGS) -DWIN32_LEAN_AND_MEAN
-!if "$(CPP_COMPILER)" != "BCC2006" && "$(OPTIMIZE)" != "yes"
+!if "$(GENERATE_PDB)" == "yes"
PDBFLAGS = /pdb:$(NAME:.exe=.pdb)
!endif
diff --git a/cpp/src/slice2py/Makefile.mak b/cpp/src/slice2py/Makefile.mak index b630110b1d7..9acdec7cd7e 100644 --- a/cpp/src/slice2py/Makefile.mak +++ b/cpp/src/slice2py/Makefile.mak @@ -21,7 +21,7 @@ SRCS = $(OBJS:.obj=.cpp) CPPFLAGS = -I. $(CPPFLAGS) -DWIN32_LEAN_AND_MEAN
-!if "$(CPP_COMPILER)" != "BCC2006" && "$(OPTIMIZE)" != "yes"
+!if "$(GENERATE_PDB)" == "yes"
PDBFLAGS = /pdb:$(NAME:.exe=.pdb)
!endif
diff --git a/cpp/src/slice2rb/Makefile.mak b/cpp/src/slice2rb/Makefile.mak index 02a6daf9f51..854f3d66d01 100755 --- a/cpp/src/slice2rb/Makefile.mak +++ b/cpp/src/slice2rb/Makefile.mak @@ -21,7 +21,7 @@ SRCS = $(OBJS:.obj=.cpp) CPPFLAGS = -I. $(CPPFLAGS) -DWIN32_LEAN_AND_MEAN
-!if "$(CPP_COMPILER)" != "BCC2006" && "$(OPTIMIZE)" != "yes"
+!if "$(GENERATE_PDB)" == "yes"
PDBFLAGS = /pdb:$(NAME:.exe=.pdb)
!endif
diff --git a/cpp/src/slice2sl/Makefile.mak b/cpp/src/slice2sl/Makefile.mak index 3b6b04b72e0..0d016eba517 100644 --- a/cpp/src/slice2sl/Makefile.mak +++ b/cpp/src/slice2sl/Makefile.mak @@ -22,7 +22,7 @@ SRCS = $(OBJS:.obj=.cpp) CPPFLAGS = -I. $(CPPFLAGS) -DWIN32_LEAN_AND_MEAN
-!if "$(CPP_COMPILER)" != "BCC2006" && "$(OPTIMIZE)" != "yes"
+!if "$(GENERATE_PDB)" == "yes"
PDBFLAGS = /pdb:$(NAME:.exe=.pdb)
!endif
|