summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Newhook <matthew@zeroc.com>2006-09-12 09:05:46 +0000
committerMatthew Newhook <matthew@zeroc.com>2006-09-12 09:05:46 +0000
commit2d7c098a79cc3701ce7ed00b314f68d2bc2ba41a (patch)
treeaa3ae8612129fc819c1b8144be6dd189dc822b34
parentFixes (diff)
downloadice-2d7c098a79cc3701ce7ed00b314f68d2bc2ba41a.tar.bz2
ice-2d7c098a79cc3701ce7ed00b314f68d2bc2ba41a.tar.xz
ice-2d7c098a79cc3701ce7ed00b314f68d2bc2ba41a.zip
Fixes for windows for IceStormPerSubscriberPublisher
-rw-r--r--cpp/demo/IceStorm/Makefile.mak2
-rw-r--r--cpp/demo/IceStorm/counter/Makefile.mak33
-rw-r--r--cpp/demo/IceStorm/counter/Server.cpp4
-rwxr-xr-xcpp/demo/IceStorm/counter/counterC.dsp163
-rwxr-xr-xcpp/demo/IceStorm/counter/counterS.dsp163
-rwxr-xr-xcpp/demo/demo.dsw24
-rw-r--r--cpp/src/IceStorm/Subscriber.h1
7 files changed, 371 insertions, 19 deletions
diff --git a/cpp/demo/IceStorm/Makefile.mak b/cpp/demo/IceStorm/Makefile.mak
index 01e797d4bec..18d73645a45 100644
--- a/cpp/demo/IceStorm/Makefile.mak
+++ b/cpp/demo/IceStorm/Makefile.mak
@@ -11,7 +11,7 @@ top_srcdir = ..\..
!include $(top_srcdir)\config\Make.rules.mak
-SUBDIRS = clock
+SUBDIRS = clock counter
$(EVERYTHING)::
@for %i in ( $(SUBDIRS) ) do \
diff --git a/cpp/demo/IceStorm/counter/Makefile.mak b/cpp/demo/IceStorm/counter/Makefile.mak
index a29cd663cb3..b9352de7282 100644
--- a/cpp/demo/IceStorm/counter/Makefile.mak
+++ b/cpp/demo/IceStorm/counter/Makefile.mak
@@ -9,42 +9,43 @@
top_srcdir = ..\..\..
-PUBLISHER = publisher.exe
-SUBSCRIBER = subscriber.exe
+CLIENT = client.exe
+SERVER = server.exe
-TARGETS = $(PUBLISHER) $(SUBSCRIBER)
+TARGETS = $(CLIENT) $(SERVER)
-OBJS = Clock.obj
+OBJS = Counter.obj
-POBJS = Publisher.obj
+COBJS = Client.obj \
+ CounterObserverI.obj
-SOBJS = Subscriber.obj \
- ClockI.obj
+SOBJS = Server.obj \
+ CounterI.obj
SRCS = $(OBJS:.obj=.cpp) \
- $(POBJS:.obj=.cpp) \
+ $(COBJS:.obj=.cpp) \
$(SOBJS:.obj=.cpp)
!include $(top_srcdir)/config/Make.rules.mak
CPPFLAGS = -I. $(CPPFLAGS)
-LIBS = $(top_srcdir)\lib\icestorm$(LIBSUFFIX).lib $(LIBS)
+IS_LIBS = $(top_srcdir)\lib\icestorm$(LIBSUFFIX).lib $(LIBS)
!if "$(BORLAND_HOME)" == "" & "$(OPTIMIZE)" != "yes"
-PPDBFLAGS = /pdb:$(PUBLISHER:.exe=.pdb)
-SPDBFLAGS = /pdb:$(SUBSCRIBER:.exe=.pdb)
+PPDBFLAGS = /pdb:$(CLIENT:.exe=.pdb)
+SPDBFLAGS = /pdb:$(SERVER:.exe=.pdb)
!endif
-$(PUBLISHER): $(OBJS) $(POBJS)
+$(CLIENT): $(OBJS) $(COBJS)
del /q $@
- $(LINK) $(LD_EXEFLAGS) $(PPDBFLAGS) $(OBJS) $(POBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS)
+ $(LINK) $(LD_EXEFLAGS) $(PPDBFLAGS) $(OBJS) $(COBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS)
-$(SUBSCRIBER): $(OBJS) $(SOBJS)
+$(SERVER): $(OBJS) $(SOBJS)
del /q $@
- $(LINK) $(LD_EXEFLAGS) $(SPDBFLAGS) $(OBJS) $(SOBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS)
+ $(LINK) $(LD_EXEFLAGS) $(SPDBFLAGS) $(OBJS) $(SOBJS) $(PREOUT)$@ $(PRELIBS)$(IS_LIBS)
clean::
- del /q Clock.cpp Clock.h
+ del /q Counter.cpp Counter.h
!include .depend
diff --git a/cpp/demo/IceStorm/counter/Server.cpp b/cpp/demo/IceStorm/counter/Server.cpp
index 687e826bbf1..bd48f0f7a54 100644
--- a/cpp/demo/IceStorm/counter/Server.cpp
+++ b/cpp/demo/IceStorm/counter/Server.cpp
@@ -56,13 +56,13 @@ Server::run(int argc, char* argv[])
{
topic = manager->retrieve("counter");
}
- catch(const IceStorm::NoSuchTopic& ex)
+ catch(const IceStorm::NoSuchTopic&)
{
try
{
topic = manager->create("counter");
}
- catch(const IceStorm::TopicExists& ex)
+ catch(const IceStorm::TopicExists&)
{
cerr << appName() << ": topic exists, please try again." << endl;
return EXIT_FAILURE;
diff --git a/cpp/demo/IceStorm/counter/counterC.dsp b/cpp/demo/IceStorm/counter/counterC.dsp
new file mode 100755
index 00000000000..09e6b2bb240
--- /dev/null
+++ b/cpp/demo/IceStorm/counter/counterC.dsp
@@ -0,0 +1,163 @@
+# Microsoft Developer Studio Project File - Name="counterC" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=counterC - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "counterC.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "counterC.mak" CFG="counterC - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "counterC - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "counterC - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "counterC - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /MD /W3 /WX /GR /GX /O2 /I "." /I "../../../include" /I "../../../include/stlport" /D "_CONSOLE" /D "NDEBUG" /D "WIN32_LEAN_AND_MEAN" /FD /c
+# SUBTRACT CPP /Fr /YX
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 Ice.lib IceUtil.lib /nologo /subsystem:console /pdb:none /machine:I386 /out:"client.exe" /libpath:"../../../lib" /FIXED:no
+# SUBTRACT LINK32 /debug
+
+!ELSEIF "$(CFG)" == "counterC - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
+# ADD CPP /nologo /MDd /W3 /WX /Gm /GR /GX /Zi /Od /I "." /I "../../../include" /I "../../../include/stlport" /D "_CONSOLE" /D "_DEBUG" /D "WIN32_LEAN_AND_MEAN" /FD /GZ /c
+# SUBTRACT CPP /Fr /YX
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 Iced.lib IceUtild.lib /nologo /subsystem:console /debug /machine:I386 /out:"client.exe" /pdbtype:sept /libpath:"../../../lib" /FIXED:no
+# SUBTRACT LINK32 /pdb:none
+
+!ENDIF
+
+# Begin Target
+
+# Name "counterC - Win32 Release"
+# Name "counterC - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=.\Client.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\Counter.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\CounterObserverI.cpp
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# Begin Source File
+
+SOURCE=.\Counter.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\CounterObserverI.h
+# End Source File
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+# Begin Source File
+
+SOURCE=.\Counter.ice
+
+!IF "$(CFG)" == "counterC - Win32 Release"
+
+# Begin Custom Build
+InputPath=.\Counter.ice
+
+BuildCmds= \
+ ..\..\..\bin\slice2cpp.exe Counter.ice
+
+"Counter.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"Counter.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+# End Custom Build
+
+!ELSEIF "$(CFG)" == "counterC - Win32 Debug"
+
+# Begin Custom Build
+InputPath=.\Counter.ice
+
+BuildCmds= \
+ ..\..\..\bin\slice2cpp.exe Counter.ice
+
+"Counter.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"Counter.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+# End Custom Build
+
+!ENDIF
+
+# End Source File
+# End Group
+# Begin Source File
+
+SOURCE=.\README
+# End Source File
+# End Target
+# End Project
diff --git a/cpp/demo/IceStorm/counter/counterS.dsp b/cpp/demo/IceStorm/counter/counterS.dsp
new file mode 100755
index 00000000000..08f32028e9d
--- /dev/null
+++ b/cpp/demo/IceStorm/counter/counterS.dsp
@@ -0,0 +1,163 @@
+# Microsoft Developer Studio Project File - Name="counterS" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=counterS - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "counterS.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "counterS.mak" CFG="counterS - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "counterS - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "counterS - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "counterS - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /MD /W3 /WX /GR /GX /O2 /I "." /I "../../../include" /I "../../../include/stlport" /D "_CONSOLE" /D "NDEBUG" /D "WIN32_LEAN_AND_MEAN" /FD /c
+# SUBTRACT CPP /Fr /YX
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 IceStorm.lib Ice.lib IceUtil.lib /nologo /subsystem:console /pdb:none /machine:I386 /out:"server.exe" /libpath:"../../../lib" /FIXED:no
+# SUBTRACT LINK32 /debug
+
+!ELSEIF "$(CFG)" == "counterS - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
+# ADD CPP /nologo /MDd /W3 /WX /Gm /GR /GX /Zi /Od /I "." /I "../../../include" /I "../../../include/stlport" /D "_CONSOLE" /D "_DEBUG" /D "WIN32_LEAN_AND_MEAN" /FD /GZ /c
+# SUBTRACT CPP /Fr /YX
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 IceStormd.lib Iced.lib IceUtild.lib /nologo /subsystem:console /debug /machine:I386 /out:"server.exe" /pdbtype:sept /libpath:"../../../lib" /FIXED:no
+# SUBTRACT LINK32 /pdb:none
+
+!ENDIF
+
+# Begin Target
+
+# Name "counterS - Win32 Release"
+# Name "counterS - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=.\Counter.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\CounterI.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\Server.cpp
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# Begin Source File
+
+SOURCE=.\Counter.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\CounterI.h
+# End Source File
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+# Begin Source File
+
+SOURCE=.\Counter.ice
+
+!IF "$(CFG)" == "counterS - Win32 Release"
+
+# Begin Custom Build
+InputPath=.\Counter.ice
+
+BuildCmds= \
+ ..\..\..\bin\slice2cpp.exe Counter.ice
+
+"Counter.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"Counter.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+# End Custom Build
+
+!ELSEIF "$(CFG)" == "counterS - Win32 Debug"
+
+# Begin Custom Build
+InputPath=.\Counter.ice
+
+BuildCmds= \
+ ..\..\..\bin\slice2cpp.exe Counter.ice
+
+"Counter.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"Counter.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+# End Custom Build
+
+!ENDIF
+
+# End Source File
+# End Group
+# Begin Source File
+
+SOURCE=.\README
+# End Source File
+# End Target
+# End Project
diff --git a/cpp/demo/demo.dsw b/cpp/demo/demo.dsw
index d566b6d8756..a0f58d6c5f5 100755
--- a/cpp/demo/demo.dsw
+++ b/cpp/demo/demo.dsw
@@ -327,6 +327,30 @@ Package=<4>
###############################################################################
+Project: "counterC"=.\IceStorm\counter\counterC.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "counterS"=.\IceStorm\counter\counterS.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
Project: "glacier2callbackC"=.\glacier2\callback\glacier2callbackC.dsp - Package Owner=<4>
Package=<5>
diff --git a/cpp/src/IceStorm/Subscriber.h b/cpp/src/IceStorm/Subscriber.h
index da4c78bfcf1..510a43752dd 100644
--- a/cpp/src/IceStorm/Subscriber.h
+++ b/cpp/src/IceStorm/Subscriber.h
@@ -12,6 +12,7 @@
#include <IceUtil/Handle.h>
#include <IceUtil/Shared.h>
+#include <IceUtil/Mutex.h>
#include <Ice/CommunicatorF.h>
#include <Ice/Identity.h>