summaryrefslogtreecommitdiff
path: root/cpp
diff options
context:
space:
mode:
authorMichi Henning <michi@zeroc.com>2008-04-03 12:36:57 +1000
committerMichi Henning <michi@zeroc.com>2008-04-03 12:36:57 +1000
commit27a24cf07fa7646c5a27cbbfb60d6e4a86184ebc (patch)
tree4d825c1cb800b154ea4b33b238027f1ff9a13531 /cpp
parentFixed comment for GCShared (wrong namespace). (diff)
parentMerge branch 'master' of cvs:/home/git/ice (diff)
downloadice-27a24cf07fa7646c5a27cbbfb60d6e4a86184ebc.tar.bz2
ice-27a24cf07fa7646c5a27cbbfb60d6e4a86184ebc.tar.xz
ice-27a24cf07fa7646c5a27cbbfb60d6e4a86184ebc.zip
Merge branch 'master' of ssh://cvs.zeroc.com/home/git/ice
Diffstat (limited to 'cpp')
-rw-r--r--cpp/config/Make.demo.rules139
-rwxr-xr-xcpp/config/Make.rules.mak6
-rwxr-xr-xcpp/config/Make.rules.msvc15
-rw-r--r--cpp/demo/book/freeze_filesystem/PersistentFilesystemI.cpp3
-rw-r--r--cpp/src/Freeze/Makefile.mak2
-rw-r--r--cpp/src/FreezeScript/Makefile.mak2
-rw-r--r--cpp/src/Glacier2/Makefile.mak2
-rw-r--r--cpp/src/Ice/DLLMain.cpp24
-rw-r--r--cpp/src/Ice/EndpointI.h4
-rw-r--r--cpp/src/Ice/Ice.rc1
-rw-r--r--cpp/src/Ice/Makefile.mak14
-rw-r--r--cpp/src/Ice/UnknownEndpointI.h3
-rw-r--r--cpp/src/IceBox/Makefile.mak2
-rw-r--r--cpp/src/IceGrid/Database.h6
-rw-r--r--cpp/src/IceGrid/DescriptorHelper.h6
-rw-r--r--cpp/src/IceGrid/Makefile.mak2
-rw-r--r--cpp/src/IceGrid/ReplicaCache.h4
-rw-r--r--cpp/src/IceGrid/ServerCache.h4
-rw-r--r--cpp/src/IceGridLib/Makefile.mak2
-rw-r--r--cpp/src/IcePatch2/Makefile.mak2
-rw-r--r--cpp/src/IceSSL/Makefile.mak2
-rw-r--r--cpp/src/IceStorm/Makefile.mak2
-rw-r--r--cpp/src/IceUtil/Makefile.mak2
-rw-r--r--cpp/src/IceXML/Makefile.mak2
-rw-r--r--cpp/src/Slice/Makefile.mak2
-rwxr-xr-xcpp/src/iceserviceinstall/Install.cpp19
-rwxr-xr-xcpp/src/iceserviceinstall/Makefile.mak2
-rwxr-xr-xcpp/src/iceserviceinstall/ServiceInstaller.cpp28
-rwxr-xr-xcpp/src/slice2cpp/Gen.cpp7
-rw-r--r--cpp/src/slice2cpp/Makefile.mak2
-rw-r--r--cpp/src/slice2cppe/Makefile.mak2
-rw-r--r--cpp/src/slice2cs/Makefile.mak2
-rw-r--r--cpp/src/slice2docbook/Makefile.mak2
-rw-r--r--cpp/src/slice2freeze/Makefile.mak4
-rw-r--r--cpp/src/slice2freezej/Makefile.mak2
-rw-r--r--cpp/src/slice2html/Gen.h1
-rw-r--r--cpp/src/slice2html/Makefile.mak2
-rw-r--r--cpp/src/slice2java/Makefile.mak2
-rw-r--r--cpp/src/slice2javae/Makefile.mak2
-rw-r--r--cpp/src/slice2py/Makefile.mak2
-rwxr-xr-xcpp/src/slice2rb/Makefile.mak2
-rw-r--r--cpp/src/slice2sl/Makefile.mak2
-rw-r--r--cpp/test/Ice/background/EndpointI.h3
-rw-r--r--cpp/test/Ice/interceptor/MyObjectI.cpp3
44 files changed, 160 insertions, 182 deletions
diff --git a/cpp/config/Make.demo.rules b/cpp/config/Make.demo.rules
deleted file mode 100644
index a8b3000e86b..00000000000
--- a/cpp/config/Make.demo.rules
+++ /dev/null
@@ -1,139 +0,0 @@
-# **********************************************************************
-#
-# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved.
-#
-# This copy of Ice is licensed to you under the terms described in the
-# ICE_LICENSE file included in this distribution.
-#
-# **********************************************************************
-
-#
-# The "root directory" for runpath embedded in executables. Can be unset
-# to avoid adding a runpath to Ice executables.
-#
-embedded_runpath_prefix ?= /opt/Ice-$(VERSION_MAJOR).$(VERSION_MINOR)
-
-#
-# Define OPTIMIZE as yes if you want to build with
-# optimization. Otherwise Ice is build with debug information.
-#
-#OPTIMIZE = yes
-
-#
-# Define LP64 as yes or no if you want force a 32 or 64 bit. The
-# default is platform-dependent
-#
-#LP64 ?= yes
-
-#
-# If libbzip2 is not installed in a location where the compiler can
-# find it, set BZIP2_HOME to the bzip2 installation directory.
-#
-#BZIP2_HOME ?= /opt/bzip2
-
-#
-# If Berkeley DB is not installed in a location where the compiler can
-# find it, set DB_HOME to the Berkeley DB installation directory.
-#
-#DB_HOME ?= /opt/db
-
-# ----------------------------------------------------------------------
-# Don't change anything below this line!
-# ----------------------------------------------------------------------
-
-#
-# Common definitions
-#
-ice_language = cpp
-slice_translator = slice2cpp
-ice_require_cpp = 1
-
-include $(top_srcdir)/config/Make.common.rules
-
-includedir = $(ice_dir)/include
-
-#
-# Platform specific definitions
-#
-include $(top_srcdir)/config/Make.rules.$(UNAME)
-
-ifneq ($(embedded_runpath_prefix),)
- runpath_libdir := $(embedded_runpath_prefix)/$(libsubdir)
-endif
-
-ICECPPFLAGS = -I$(slicedir)
-SLICE2CPPFLAGS = $(ICECPPFLAGS)
-
-ifeq ($(ice_dir), /usr)
- CPPFLAGS =
- LDFLAGS = $(LDPLATFORMFLAGS) $(CXXFLAGS)
-else
- CPPFLAGS = -I$(includedir)
- LDFLAGS = $(LDPLATFORMFLAGS) $(CXXFLAGS) -L$(ice_dir)/$(libsubdir)
-endif
-
-ifeq ($(FLEX_NOLINE),yes)
- FLEXFLAGS := -L
-else
- FLEXFLAGS :=
-endif
-
-ifeq ($(BISON_NOLINE),yes)
- BISONFLAGS := -dvtl
-else
- BISONFLAGS := -dvt
-endif
-
-ifeq ($(mkshlib),)
- $(error You need to define mkshlib in Make.rules.$(UNAME))
-endif
-
-SLICEPARSERLIB = $(ice_dir)/$(libsubdir)/$(call mklibfilename,Slice,$(VERSION))
-SLICE2CPP = $(ice_dir)/$(binsubdir)/slice2cpp
-SLICE2FREEZE = $(ice_dir)/$(binsubdir)/slice2freeze
-
-EVERYTHING = all clean
-
-.SUFFIXES:
-.SUFFIXES: .cpp .c .o
-
-.cpp.o:
- $(CXX) -c $(CPPFLAGS) $(CXXFLAGS) $<
-
-.c.o:
- $(CC) -c $(CPPFLAGS) $(CFLAGS) $<
-
-%.h %.cpp: %.ice $(SLICE2CPP) $(SLICEPARSERLIB)
- rm -f $(*F).h $(*F).cpp
- $(SLICE2CPP) $(SLICE2CPPFLAGS) $(*F).ice
-
-%.h %.cpp: %.y
- rm -f $(*F).h $(*F).cpp
- bison $(BISONFLAGS) $<
- mv $(*F).tab.c $(*F).cpp
- mv $(*F).tab.h $(*F).h
- rm -f $(*F).output
-
-%.cpp: %.l
- flex $(FLEXFLAGS) $<
- rm -f $@
- echo '#include <IceUtil/Config.h>' > $@
- cat lex.yy.c >> $@
- rm -f lex.yy.c
-
-all:: $(SRCS) $(TARGETS)
-
-clean::
- -rm -f $(TARGETS)
- -rm -f core *.o *.bak
-
-ifneq ($(SLICE_SRCS),)
-clean::
- rm -f $(addsuffix .cpp, $(basename $(notdir $(SLICE_SRCS))))
- rm -f $(addsuffix .h, $(basename $(notdir $(SLICE_SRCS))))
-endif
-
-ifneq ($(TEMPLATE_REPOSITORY),)
-clean::
- rm -fr $(TEMPLATE_REPOSITORY)
-endif
diff --git a/cpp/config/Make.rules.mak b/cpp/config/Make.rules.mak
index 5e594a541df..7fda30abf38 100755
--- a/cpp/config/Make.rules.mak
+++ b/cpp/config/Make.rules.mak
@@ -26,6 +26,12 @@ prefix = C:\Ice-$(VERSION)
#STATICLIBS = yes
#
+# Define if you want pdb files to be generated for optimized/release
+# builds
+#
+#RELEASEPDBS = yes
+
+#
# Specify your C++ compiler. Supported values are:
# VC60, VC80, VC80_EXPRESS, VC90, VC90_EXPRESS
#
diff --git a/cpp/config/Make.rules.msvc b/cpp/config/Make.rules.msvc
index 0fbd0a1636e..917504709d1 100755
--- a/cpp/config/Make.rules.msvc
+++ b/cpp/config/Make.rules.msvc
@@ -21,6 +21,10 @@ RC = rc.exe
PREOUT = /out:
PRELIBS =
+!if "$(OPTIMIZE)" != "yes" || "$(RELEASEPDBS)" == "yes"
+GENERATE_PDB = yes
+!endif
+
!if "$(ice_src_dist)" != ""
# If building a source distribution, use THIRDPARTY_HOME for the 3rd party libraries
@@ -84,9 +88,18 @@ LDFLAGS = $(LDFLAGS) /LIBPATH:"$(ice_dir)\lib$(x64suffix)" /nologo /FIXED:no
LDFLAGS = $(LDFLAGS) /nologo /FIXED:no
!if "$(OPTIMIZE)" != "yes"
+
LDFLAGS = $(LDFLAGS) /debug /incremental:yes
+
!else
-LDFLAGS = $(LDFLAGS) /pdb:none /OPT:REF
+
+LDFLAGS = $(LDFLAGS) /OPT:REF
+!if "$(GENERATE_PDB)" != "yes"
+LDFLAGS = $(LDFLAGS) /pdb:none
+!else
+LDFLAGS = $(LDFLAGS) /debug
+!endif
+
!endif
LD_DLLFLAGS = $(LDFLAGS) /dll
diff --git a/cpp/demo/book/freeze_filesystem/PersistentFilesystemI.cpp b/cpp/demo/book/freeze_filesystem/PersistentFilesystemI.cpp
index 6604569ac15..7bfe9e9f3e5 100644
--- a/cpp/demo/book/freeze_filesystem/PersistentFilesystemI.cpp
+++ b/cpp/demo/book/freeze_filesystem/PersistentFilesystemI.cpp
@@ -18,6 +18,9 @@ Ice::ObjectAdapterPtr Filesystem::NodeI::_adapter;
Freeze::EvictorPtr Filesystem::NodeI::_evictor;
Filesystem::NodeI::NodeI()
+#ifdef __SUNPRO_CC
+ : _ID(Ice::Identity())
+#endif
{
}
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
diff --git a/cpp/test/Ice/background/EndpointI.h b/cpp/test/Ice/background/EndpointI.h
index d9c7a82cff6..0ed8e9e7c2b 100644
--- a/cpp/test/Ice/background/EndpointI.h
+++ b/cpp/test/Ice/background/EndpointI.h
@@ -42,6 +42,9 @@ public:
virtual bool operator!=(const IceInternal::EndpointI&) const;
virtual bool operator<(const IceInternal::EndpointI&) const;
+protected:
+
+ using IceInternal::EndpointI::connectors;
private:
EndpointI(const IceInternal::EndpointIPtr&);
diff --git a/cpp/test/Ice/interceptor/MyObjectI.cpp b/cpp/test/Ice/interceptor/MyObjectI.cpp
index af464761ef3..08a3b3b2975 100644
--- a/cpp/test/Ice/interceptor/MyObjectI.cpp
+++ b/cpp/test/Ice/interceptor/MyObjectI.cpp
@@ -49,6 +49,9 @@ int
MyObjectI::badSystemAdd(int, int, const Ice::Current&)
{
throw Ice::InitializationException(__FILE__, __LINE__, "testing");
+#ifdef __SUNPRO_CC
+ return 0;
+#endif
}