diff options
Diffstat (limited to 'cpp')
258 files changed, 7573 insertions, 668 deletions
diff --git a/cpp/INSTALL.WINDOWS b/cpp/INSTALL.VISUAL_C++ index 1e25ae73520..1e25ae73520 100644 --- a/cpp/INSTALL.WINDOWS +++ b/cpp/INSTALL.VISUAL_C++ diff --git a/cpp/Makefile.mak b/cpp/Makefile.mak new file mode 100644 index 00000000000..0750733a7db --- /dev/null +++ b/cpp/Makefile.mak @@ -0,0 +1,40 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = . + +!include $(top_srcdir)/config/Make.rules.mak + +SUBDIRS = config src include test demo slice + +INSTALL_SUBDIRS = $(install_bindir) $(install_libdir) $(install_includedir) $(install_slicedir) $(install_docdir) + +install:: createdir + +createdir:: + @if not exist $(prefix) \ + @echo "Creating $(prefix)..." & \ + mkdir $(prefix) + + @for %i in ( $(INSTALL_SUBDIRS) ) do \ + @if not exist %i \ + @echo "Creating %i..." & \ + mkdir %i + +$(EVERYTHING):: + @for %i in ( $(SUBDIRS) ) do \ + @echo "making $@ in %i" & \ + cmd /c "cd %i & $(MAKE) -f Makefile.mak $@" + +install:: + copy ICE_LICENSE $(prefix) + copy LICENSE $(prefix) + +test:: + @python $(top_srcdir)/allTests.py diff --git a/cpp/config/IceGridAdmin.py b/cpp/config/IceGridAdmin.py index c207f6bad47..f445999de3a 100644 --- a/cpp/config/IceGridAdmin.py +++ b/cpp/config/IceGridAdmin.py @@ -11,6 +11,9 @@ import sys, os, TestUtil from threading import Thread +debug = 0 +#debug = 1 + for toplevel in [".", "..", "../..", "../../..", "../../../.."]: toplevel = os.path.normpath(toplevel) if os.path.exists(os.path.join(toplevel, "config", "TestUtil.py")): @@ -70,6 +73,9 @@ def startIceGridRegistry(testdir, dynamicRegistration = False): if dynamicRegistration: command += ' --IceGrid.Registry.DynamicRegistration' + if debug: + print command + (stdin, iceGridPipe) = os.popen4(command) TestUtil.getServerPid(iceGridPipe) @@ -97,6 +103,9 @@ def startIceGridNode(testdir): r' --IceGrid.Node.Data=' + dataDir + \ r' --IceGrid.Node.Name=localnode' + \ r' --IceGrid.Node.PropertiesOverride=' + overrideOptions + if debug: + print command + (stdin, iceGridPipe) = os.popen4(command) TestUtil.getServerPid(iceGridPipe) @@ -115,6 +124,9 @@ def iceGridAdmin(cmd, ignoreFailure = False): command = iceGridAdmin + TestUtil.clientOptions + \ r' --Ice.Default.Locator="IceGrid/Locator:default -p ' + iceGridPort + '" ' + \ r' -e "' + cmd + '" 2>&1' + if debug: + print command + iceGridAdminPipe = os.popen(command) @@ -156,7 +168,12 @@ def iceGridTest(name, application, additionalOptions = "", applicationOptions = print "ok" print "starting client...", - clientPipe = os.popen(client + TestUtil.clientOptions + " " + clientOptions + " 2>&1") + + command = client + TestUtil.clientOptions + " " + clientOptions + " 2>&1" + if debug: + print command + + clientPipe = os.popen(command) print "ok" TestUtil.printOutputFromPipe(clientPipe) @@ -209,7 +226,11 @@ def iceGridClientServerTest(name, additionalClientOptions, additionalServerOptio print "ok" print "starting client...", - clientPipe = os.popen(client + TestUtil.clientOptions + " " + clientOptions + " 2>&1") + command = client + TestUtil.clientOptions + " " + clientOptions + " 2>&1" + if debug: + print command + + clientPipe = os.popen(command) print "ok" TestUtil.printOutputFromPipe(clientPipe) diff --git a/cpp/config/Make.rules.bcc b/cpp/config/Make.rules.bcc new file mode 100644 index 00000000000..fde78d8e50d --- /dev/null +++ b/cpp/config/Make.rules.bcc @@ -0,0 +1,46 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +# +# This file is included by Make.rules.mak when using Borland C++Builder. +# + +BORLAND_HOME = "C:\Program Files\Borland" + +CXX = bcc32.exe +CC = bcc32.exe +LINK = ilink32.exe +AR = tlib.exe + +# +# icecpp is built with a C compiler +# +#CFLAGS = -O2 + +CPPFLAGS = -I$(THIRDPARTY_HOME)\include -q -w-par -b- -y -vi- -tWC -tWM -tW- -c -DNO_STRICT;_NO_VCL;_RTLDLL + +!if "$(OPTIMIZE)" == "yes" +CPPFLAGS = $(CPPFLAGS) -O2 -k- -DNDEBUG +!else +CPPFLAGS = $(CPPFLAGS) -Od -v -k -D_DEBUG +!endif + +# +# C++ run-time libraries, necessary for linking some shared libraries. +# +CXXLIBS = cw32mti.lib + +LDFLAGS = -L$(top_srcdir)\lib -L$(THIRDPARTY_HOME)\lib -L"$(BCB)\lib" -q -Gn -v -x +LD_DLLFLAGS = $(LDFLAGS) -Gi -Tpd c0d32.obj +LD_EXEFLAGS = $(LDFLAGS) -Tpe c0x32.obj + +ICEUTIL_OS_LIBS = cw32mti.lib import32.lib + +BASELIBS = iceutil$(LIBSUFFIX).lib $(ICEUTIL_OS_LIBS) +LIBS = ice$(LIBSUFFIX).lib $(BASELIBS) diff --git a/cpp/config/Make.rules.mak b/cpp/config/Make.rules.mak new file mode 100644 index 00000000000..c2312206d31 --- /dev/null +++ b/cpp/config/Make.rules.mak @@ -0,0 +1,142 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +# +# Select an installation base directory. The directory will be created +# if it does not exist. +# +prefix = C:\Ice-$(VERSION) + +# +# Define OPTIMIZE as yes if you want to build with +# optimization. Otherwise Ice is build with debug information. +# +#OPTIMIZE = yes + + +# +# Borland C++Builder 2006 home directory. Change if different from default. +# +BCB = C:\Program Files\Borland\BDS\4.0 + +# +# If third party libraries are not installed in the default location +# change the following setting to reflect the installation location. +# +#THIRDPARTY_HOME = C:\Ice-$(VERSION)-ThirdParty +THIRDPARTY_HOME = C:\src\packages_win32 + +# ---------------------------------------------------------------------- +# Don't change anything below this line! +# ---------------------------------------------------------------------- + +SHELL = /bin/sh +VERSION = 3.1.0 +SOVERSION = 31 +bindir = $(top_srcdir)\bin +libdir = $(top_srcdir)\lib +includedir = $(top_srcdir)\include +slicedir = $(top_srcdir)\slice + +install_bindir = $(prefix)\bin + +install_includedir = $(prefix)\include +install_slicedir = $(prefix)\slice +install_schemadir = $(prefix)\schema +install_docdir = $(prefix)\doc + +INSTALL = copy +INSTALL_PROGRAM = $(INSTALL) +INSTALL_LIBRARY = $(INSTALL) +INSTALL_DATA = $(INSTALL) + +# TODO - Should be setting above for BCB vs MSVC +UNAME = bcc + +# +# Compiler specific definitions +# +!include $(top_srcdir)/config/Make.rules.$(UNAME) + +!if "$(LP64)" == "yes" +install_libdir = $(prefix)\lib$(lp64suffix) +libsubdir = lib$(lp64suffix) +!else +install_libdir = $(prefix)\lib +libsubdir = lib +!endif + +!if "$(OPTIMIZE)" != "yes" +LIBSUFFIX = $(LIBSUFFIX)d +!endif + +OPENSSL_LIBS = ssleay32.lib libeay32.lib +BZIP2_LIBS = libbz2$(LIBSUFFIX).lib +DB_LIBS = libdb44.lib +EXPAT_LIBS = libexpat.lib + +CPPFLAGS = $(CPPFLAGS) -I$(includedir) $(STLPORT_FLAGS) +ICECPPFLAGS = -I$(slicedir) +SLICE2CPPFLAGS = $(ICECPPFLAGS) + +LDFLAGS = $(LDFLAGS) $(LDPLATFORMFLAGS) $(CXXFLAGS) + +!if "$(FLEX_NOLINE)" == "yes" +FLEXFLAGS = -L +!else +FLEXFLAGS = +!endif + +!if "$(BISON_NOLINE)" == "yes" +BISONFLAGS = -dvtl +!else +BISONFLAGS = -dvt +!endif + +SLICEPARSERLIB = $(top_srcdir)\lib\slice$(LIBSUFFIX).lib +SLICE2CPP = $(bindir)\slice2cpp.exe +SLICE2XSD = $(bindir)\slice2xsd.exe +SLICE2FREEZE = $(bindir)\slice2freeze.exe +SLICE2DOCBOOK = $(bindir)\slice2docbook.exe + +EVERYTHING = all depend clean install + +.SUFFIXES: +.SUFFIXES: .cpp .c .o + +.cpp.o: + $(CXX) /c $(CPPFLAGS) $(CXXFLAGS) -o $@ $< + +.c.o: + $(CC) /c $(CPPFLAGS) $(CFLAGS) -o $@ $< + +all:: $(SRCS) $(TARGETS) + +depend:: $(SRCS) $(SLICE_SRCS) + -del /q .depend + if test -n "$(SRCS)" ; then \ + $(CXX) -DMAKEDEPEND -M $(CXXFLAGS) $(CPPFLAGS) $(SRCS) | \ + $(top_srcdir)/config/makedepend.py >> .depend; \ + fi + if test -n "$(SLICE_SRCS)" ; then \ + $(SLICE2CPP) --depend $(SLICE2CPPFLAGS) $(SLICE_SRCS) | \ + $(top_srcdir)/config/makedepend.py >> .depend; \ + fi + +!if "$(TARGETS)" != "" + +clean:: + -del /q $(TARGETS) + +!endif + +clean:: + -del /q core *.o *.bak + +install:: diff --git a/cpp/config/Makefile.mak b/cpp/config/Makefile.mak new file mode 100644 index 00000000000..1321875fc37 --- /dev/null +++ b/cpp/config/Makefile.mak @@ -0,0 +1,22 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = .. + +!include $(top_srcdir)/config/Make.rules.mak + +install:: + @if not exist $(prefix)\config \ + @echo "Creating $(prefix)\config..." & \ + mkdir $(prefix)\config + copy Make.rules.mak $(prefix)\config + copy Make.rules.bcc $(prefix)\config + copy templates.xml $(prefix)\config + copy convertssl.py $(prefix)\config + copy upgradeicegrid.py $(prefix)\config diff --git a/cpp/demo/Freeze/Makefile.mak b/cpp/demo/Freeze/Makefile.mak new file mode 100644 index 00000000000..d2800756fd3 --- /dev/null +++ b/cpp/demo/Freeze/Makefile.mak @@ -0,0 +1,21 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = ..\.. + +!include $(top_srcdir)\config\Make.rules.mak + +SUBDIRS = bench \ + library \ + phonebook + +$(EVERYTHING):: + @for %i in ( $(SUBDIRS) ) do \ + @echo "making $@ in %i" & \ + cmd /c "cd %i & $(MAKE) -f Makefile.mak $@" diff --git a/cpp/demo/Freeze/bench/Client.cpp b/cpp/demo/Freeze/bench/Client.cpp index 2ecc590af79..e0e70dac728 100644 --- a/cpp/demo/Freeze/bench/Client.cpp +++ b/cpp/demo/Freeze/bench/Client.cpp @@ -166,7 +166,7 @@ private: Freeze::TransactionHolder txHolder(_connection); for(i = 0; i < _repetitions; ++i) { -#if defined(_MSC_VER) && (_MSC_VER < 1310) +#if defined(__BCPLUSPLUS__) || (defined(_MSC_VER) && (_MSC_VER < 1310)) m.put(T::value_type(i, i)); #else m.put(typename T::value_type(i, i)); @@ -269,7 +269,7 @@ private: s2.s = os.str(); s2.s1 = s1; -#if defined(_MSC_VER) && (_MSC_VER < 1310) +#if defined(__BCPLUSPLUS__) || (defined(_MSC_VER) && (_MSC_VER < 1310)) m.put(T::value_type(s1, s2)); #else m.put(typename T::value_type(s1, s2)); @@ -350,7 +350,7 @@ private: ostringstream os; os << i; c1->s = os.str(); -#if defined(_MSC_VER) && (_MSC_VER < 1310) +#if defined(__BCPLUSPLUS__) || (defined(_MSC_VER) && (_MSC_VER < 1310)) m.put(T::value_type(s1, c1)); #else m.put(typename T::value_type(s1, c1)); @@ -425,7 +425,7 @@ private: Freeze::TransactionHolder txHolder(_connection); for(i = 0; i < _repetitions; ++i) { -#if defined(_MSC_VER) && (_MSC_VER < 1310) +#if defined(__BCPLUSPLUS__) || (defined(_MSC_VER) && (_MSC_VER < 1310)) m.put(T::value_type(i, i)); #else m.put(typename T::value_type(i, i)); diff --git a/cpp/demo/Freeze/bench/Makefile.mak b/cpp/demo/Freeze/bench/Makefile.mak new file mode 100644 index 00000000000..b0279dfd723 --- /dev/null +++ b/cpp/demo/Freeze/bench/Makefile.mak @@ -0,0 +1,50 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = ..\..\.. + +CLIENT = client.exe + +TARGETS = $(CLIENT) + +OBJS = Client.o BenchTypes.o Test.o + +SRCS = $(OBJS:.o=.cpp) + +!include $(top_srcdir)/config/Make.rules.mak + +CPPFLAGS = -I. $(CPPFLAGS) + +$(CLIENT): $(OBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(OBJS), $@,, $(LIBS) freeze$(LIBSUFFIX).lib + +BenchTypes.h BenchTypes.cpp: Test.ice $(SLICE2FREEZE) + del /q BenchTypes.h BenchTypes.cpp + $(SLICE2FREEZE) -I$(slicedir) --dict Demo::IntIntMap,int,int --dict Demo::Struct1Struct2Map,Demo::Struct1,Demo::Struct2 \ + --dict Demo::Struct1Class1Map,Demo::Struct1,Demo::Class1 \ + --dict Demo::Struct1ObjectMap,Demo::Struct1,Object \ + --dict Demo::IndexedIntIntMap,int,int --dict-index Demo::IndexedIntIntMap \ + --dict Demo::IndexedStruct1Struct2Map,Demo::Struct1,Demo::Struct2 \ + --dict-index Demo::IndexedStruct1Struct2Map,s,case-insensitive \ + --dict-index Demo::IndexedStruct1Struct2Map,s1 \ + --dict Demo::IndexedStruct1Class1Map,Demo::Struct1,Demo::Class1 \ + --dict-index Demo::IndexedStruct1Class1Map,s,case-sensitive \ + BenchTypes Test.ice + +Test.cpp Test.h: Test.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) $(SLICE2CPPFLAGS) Test.ice + +clean:: + del /q BenchTypes.h BenchTypes.cpp + +clean:: + del /q Test.cpp Test.h + +!include .depend diff --git a/cpp/demo/Freeze/library/LibraryI.cpp b/cpp/demo/Freeze/library/LibraryI.cpp index b9912a4789c..41798b53513 100644 --- a/cpp/demo/Freeze/library/LibraryI.cpp +++ b/cpp/demo/Freeze/library/LibraryI.cpp @@ -21,7 +21,7 @@ BookI::BookI(const LibraryIPtr& library) : void BookI::destroy(const Ice::Current&) { - Lock lock(*this); + IceUtil::Mutex::Lock lock(*this); if(_destroyed) { throw Ice::ObjectNotExistException(__FILE__, __LINE__); @@ -43,7 +43,7 @@ BookI::destroy(const Ice::Current&) Demo::BookDescription BookI::getBookDescription(const Ice::Current&) const { - Lock lock(*this); + IceUtil::Mutex::Lock lock(*this); if(_destroyed) { @@ -59,7 +59,7 @@ BookI::getBookDescription(const Ice::Current&) const string BookI::getRenterName(const Ice::Current&) const { - Lock lock(*this); + IceUtil::Mutex::Lock lock(*this); if(_destroyed) { @@ -76,7 +76,7 @@ BookI::getRenterName(const Ice::Current&) const void BookI::rentBook(const string& name, const Ice::Current&) { - Lock lock(*this); + IceUtil::Mutex::Lock lock(*this); if(_destroyed) { @@ -93,7 +93,7 @@ BookI::rentBook(const string& name, const Ice::Current&) void BookI::returnBook(const Ice::Current&) { - Lock lock(*this); + IceUtil::Mutex::Lock lock(*this); if(_destroyed) { @@ -155,7 +155,7 @@ LibraryI::LibraryI(const Ice::CommunicatorPtr& communicator, Demo::BookPrx LibraryI::createBook(const Demo::BookDescription& description, const Ice::Current& c) { - Lock lock(*this); + IceUtil::Mutex::Lock lock(*this); #if defined(__SUNPRO_CC) // @@ -240,7 +240,7 @@ LibraryI::findByIsbn(const string& isbn, const Ice::Current& c) const Demo::BookPrxSeq LibraryI::findByAuthors(const string& authors, const Ice::Current& c) const { - Lock lock(*this); + IceUtil::Mutex::Lock lock(*this); // // Lookup all books that match the given authors, and return them @@ -277,7 +277,7 @@ LibraryI::shutdown(const Ice::Current& current) void LibraryI::remove(const BookDescription& description) { - Lock lock(*this); + IceUtil::Mutex::Lock lock(*this); // // Note: no need to catch and retry on deadlock since all access to diff --git a/cpp/demo/Freeze/library/Makefile.mak b/cpp/demo/Freeze/library/Makefile.mak new file mode 100644 index 00000000000..89d693bf64c --- /dev/null +++ b/cpp/demo/Freeze/library/Makefile.mak @@ -0,0 +1,93 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = ..\..\.. + +CLIENT = client.exe +SERVER = server.exe +COLLOCATED = collocated.exe + +TARGETS = $(CLIENT) $(SERVER) $(COLLOCATED) + +OBJS = Library.o + +COBJS = Grammar.o \ + Scanner.o \ + Parser.o \ + RunParser.o \ + Client.o \ + +SOBJS = LibraryI.o \ + LibraryTypes.o \ + BookFactory.o \ + Server.o + +COLOBJS = Grammar.o \ + Scanner.o \ + Parser.o \ + RunParser.o \ + LibraryI.o \ + LibraryTypes.o \ + BookFactory.o \ + Collocated.o + +SRCS = $(OBJS:.o=.cpp) \ + $(COBJS:.o=.cpp) \ + $(SOBJS:.o=.cpp) \ + $(COLOBJS:.o=.cpp) + +!include $(top_srcdir)/config/Make.rules.mak + +CPPFLAGS = -I. $(CPPFLAGS) +SLICE2CPPFLAGS = --ice $(SLICE2CPPFLAGS) + +$(CLIENT): $(OBJS) $(COBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(OBJS) $(COBJS), $@,, $(LIBS) + +$(SERVER): $(OBJS) $(SOBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(OBJS) $(SOBJS), $@,, $(LIBS) freeze$(LIBSUFFIX).lib + +$(COLLOCATED): $(OBJS) $(COLOBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(OBJS) $(COLOBJS), $@,, $(LIBS) freeze$(LIBSUFFIX).lib + +LibraryTypes.h LibraryTypes.cpp: Library.ice $(SLICE2FREEZE) + del /q LibraryTypes.h LibraryTypes.cpp + $(SLICE2FREEZE) --ice -I$(slicedir) --dict StringIsbnSeqDict,string,Ice::StringSeq LibraryTypes $(slicedir)/Ice/BuiltinSequences.ice Library.ice + +Library.cpp Library.h: Library.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) $(SLICE2CPPFLAGS) Library.ice + +Scanner.cpp : Scanner.l + flex $(FLEXFLAGS) Scanner.l + del /q $@ + echo #include "IceUtil/Config.h" > Scanner.cpp + type lex.yy.c >> Scanner.cpp + del /q lex.yy.c + +Grammar.cpp Grammar.h: Grammar.y + del /q Grammar.h Grammar.cpp + bison -dvt Grammar.y + move Grammar.tab.c Grammar.cpp + move Grammar.tab.h Grammar.h + del /q Grammar.output + +clean:: + del /q LibraryTypes.h LibraryTypes.cpp + +clean:: + del /q Library.cpp Library.h + +clean:: + del /q Grammar.cpp Grammar.h + del /q Scanner.cpp + +!include .depend diff --git a/cpp/demo/Freeze/library/Parser.h b/cpp/demo/Freeze/library/Parser.h index 887bee14e1c..ec42b9b895c 100644 --- a/cpp/demo/Freeze/library/Parser.h +++ b/cpp/demo/Freeze/library/Parser.h @@ -13,13 +13,14 @@ #include <Ice/Ice.h> #include <Library.h> #include <list> +#include <stdio.h> #ifdef _WIN32 # include <io.h> -# define isatty _isatty -# define fileno _fileno -// '_isatty' : inconsistent dll linkage. dllexport assumed. # ifdef _MSC_VER +# define isatty _isatty +# define fileno _fileno +// '_isatty' : inconsistent dll linkage. dllexport assumed. # pragma warning( disable : 4273 ) # endif #endif diff --git a/cpp/demo/Freeze/library/Scanner.l b/cpp/demo/Freeze/library/Scanner.l index 8065e808454..287be3255c2 100644 --- a/cpp/demo/Freeze/library/Scanner.l +++ b/cpp/demo/Freeze/library/Scanner.l @@ -30,6 +30,7 @@ WS [ \t\v\f\r] NL [\n] %option noyywrap +%option never-interactive %% diff --git a/cpp/demo/Freeze/phonebook/Makefile.mak b/cpp/demo/Freeze/phonebook/Makefile.mak new file mode 100644 index 00000000000..82432cd3d80 --- /dev/null +++ b/cpp/demo/Freeze/phonebook/Makefile.mak @@ -0,0 +1,92 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = ..\..\.. + +CLIENT = client.exe +SERVER = server.exe +COLLOCATED = collocated.exe + +TARGETS = $(CLIENT) $(SERVER) $(COLLOCATED) + +OBJS = PhoneBook.o + +COBJS = Grammar.o \ + Scanner.o \ + Parser.o \ + RunParser.o \ + Client.o \ + +SOBJS = PhoneBookI.o \ + ContactFactory.o \ + NameIndex.o \ + Server.o + +COLOBJS = Grammar.o \ + Scanner.o \ + Parser.o \ + RunParser.o \ + PhoneBookI.o \ + ContactFactory.o \ + NameIndex.o \ + Collocated.o + +SRCS = $(OBJS:.o=.cpp) \ + $(COBJS:.o=.cpp) \ + $(SOBJS:.o=.cpp) \ + $(COLOBJS:.o=.cpp) + +!include $(top_srcdir)/config/Make.rules.mak + +CPPFLAGS = -I. $(CPPFLAGS) + +$(CLIENT): $(OBJS) $(COBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(OBJS) $(COBJS), $@,, $(LIBS) + +$(SERVER): $(OBJS) $(SOBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(OBJS) $(SOBJS), $@,, $(LIBS) freeze$(LIBSUFFIX).lib + +$(COLLOCATED): $(OBJS) $(COLOBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(OBJS) $(COLOBJS), $@,, $(LIBS) freeze$(LIBSUFFIX).lib + +NameIndex.h NameIndex.cpp: PhoneBook.ice $(SLICE2FREEZE) + del /q NameIndex.h NameIndex.cpp + $(SLICE2FREEZE) $(ICECPPFLAGS) --index NameIndex,Demo::Contact,name,case-insensitive NameIndex PhoneBook.ice + +PhoneBook.cpp PhoneBook.h: PhoneBook.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) $(SLICE2CPPFLAGS) PhoneBook.ice + +Scanner.cpp : Scanner.l + flex $(FLEXFLAGS) Scanner.l + del /q $@ + echo #include "IceUtil/Config.h" > Scanner.cpp + type lex.yy.c >> Scanner.cpp + del /q lex.yy.c + +Grammar.cpp Grammar.h: Grammar.y + del /q Grammar.h Grammar.cpp + bison -dvt Grammar.y + move Grammar.tab.c Grammar.cpp + move Grammar.tab.h Grammar.h + del /q Grammar.output + +clean:: + del /q NameIndex.h NameIndex.cpp + +clean:: + del /q PhoneBook.cpp PhoneBook.h + +clean:: + del /q Grammar.cpp Grammar.h + del /q Scanner.cpp + +!include .depend diff --git a/cpp/demo/Freeze/phonebook/Parser.h b/cpp/demo/Freeze/phonebook/Parser.h index 22e476c8f30..79b501994f5 100644 --- a/cpp/demo/Freeze/phonebook/Parser.h +++ b/cpp/demo/Freeze/phonebook/Parser.h @@ -13,13 +13,14 @@ #include <Ice/Ice.h> #include <PhoneBook.h> #include <list> +#include <stdio.h> #ifdef _WIN32 # include <io.h> -# define isatty _isatty -# define fileno _fileno -// '_isatty' : inconsistent dll linkage. dllexport assumed. # ifdef _MSC_VER +# define isatty _isatty +# define fileno _fileno +// '_isatty' : inconsistent dll linkage. dllexport assumed. # pragma warning( disable : 4273 ) # endif #endif diff --git a/cpp/demo/Freeze/phonebook/PhoneBookI.cpp b/cpp/demo/Freeze/phonebook/PhoneBookI.cpp index 7b7bf223301..11caee91056 100644 --- a/cpp/demo/Freeze/phonebook/PhoneBookI.cpp +++ b/cpp/demo/Freeze/phonebook/PhoneBookI.cpp @@ -21,42 +21,42 @@ ContactI::ContactI(const ContactFactoryPtr& contactFactory) : string ContactI::getName(const Ice::Current&) const { - Lock lock(*this); - return name; + IceUtil::Mutex::Lock lock(*this); + return name; } void ContactI::setName(const string& newName, const Ice::Current&) { - Lock lock(*this); + IceUtil::Mutex::Lock lock(*this); name = newName; } string ContactI::getAddress(const Ice::Current&) const { - Lock lock(*this); + IceUtil::Mutex::Lock lock(*this); return address; } void ContactI::setAddress(const string& newAddress, const Ice::Current&) { - Lock lock(*this); + IceUtil::Mutex::Lock lock(*this); address = newAddress; } string ContactI::getPhone(const Ice::Current&) const { - Lock lock(*this); + IceUtil::Mutex::Lock lock(*this); return phone; } void ContactI::setPhone(const string& newPhone, const Ice::Current&) { - Lock lock(*this); + IceUtil::Mutex::Lock lock(*this); phone = newPhone; } diff --git a/cpp/demo/Freeze/phonebook/Scanner.l b/cpp/demo/Freeze/phonebook/Scanner.l index 6b475c31de5..e6fea8b19c0 100644 --- a/cpp/demo/Freeze/phonebook/Scanner.l +++ b/cpp/demo/Freeze/phonebook/Scanner.l @@ -30,6 +30,7 @@ WS [ \t\v\f\r] NL [\n] %option noyywrap +%option never-interactive %% diff --git a/cpp/demo/Glacier2/Makefile.mak b/cpp/demo/Glacier2/Makefile.mak new file mode 100644 index 00000000000..cba28a804d6 --- /dev/null +++ b/cpp/demo/Glacier2/Makefile.mak @@ -0,0 +1,19 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = ..\.. + +!include $(top_srcdir)\config\Make.rules.mak + +SUBDIRS = callback chat + +$(EVERYTHING):: + @for %i in ( $(SUBDIRS) ) do \ + @echo "making $@ in %i" & \ + cmd /c "cd %i & $(MAKE) -f Makefile.mak $@" diff --git a/cpp/demo/Glacier2/callback/Makefile.mak b/cpp/demo/Glacier2/callback/Makefile.mak new file mode 100644 index 00000000000..46c10a4609a --- /dev/null +++ b/cpp/demo/Glacier2/callback/Makefile.mak @@ -0,0 +1,55 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = ..\..\.. + +CLIENT = client.exe +SERVER = server.exe +SESSION_SERVER = sessionserver.exe + +TARGETS = $(CLIENT) $(SERVER) $(SESSION_SERVER) + +OBJS = Callback.o \ + CallbackI.o + +COBJS = Client.o + +SOBJS = Server.o + +SSOBJS = SessionServer.o \ + SessionI.o + +SRCS = $(OBJS:.o=.cpp) \ + $(COBJS:.o=.cpp) \ + $(SOBJS:.o=.cpp) \ + $(SSOBJS:.o=.cpp) + +!include $(top_srcdir)/config/Make.rules.mak + +CPPFLAGS = -I. $(CPPFLAGS) + +$(CLIENT): $(OBJS) $(COBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(OBJS) $(COBJS), $@,, $(LIBS) glacier2$(LIBSUFFIX).lib + +$(SERVER): $(OBJS) $(SOBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(OBJS) $(SOBJS), $@,, $(LIBS) + +$(SESSION_SERVER): $(SSOBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(SSOBJS), $@,, $(LIBS) glacier2$(LIBSUFFIX).lib + +Callback.cpp Callback.h: Callback.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) $(SLICE2CPPFLAGS) Callback.ice + +clean:: + del /q Callback.cpp Callback.h + +!include .depend diff --git a/cpp/demo/Glacier2/chat/Makefile.mak b/cpp/demo/Glacier2/chat/Makefile.mak new file mode 100644 index 00000000000..8bcb4c59c4b --- /dev/null +++ b/cpp/demo/Glacier2/chat/Makefile.mak @@ -0,0 +1,46 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = ..\..\.. + +CLIENT = client.exe +SERVER = server.exe + +TARGETS = $(CLIENT) $(SERVER) + +OBJS = Chat.o + +COBJS = Client.o + +SOBJS = Server.o \ + ChatSessionI.o + +SRCS = $(OBJS:.o=.cpp) \ + $(COBJS:.o=.cpp) \ + $(SOBJS:.o=.cpp) \ + +!include $(top_srcdir)/config/Make.rules.mak + +CPPFLAGS = -I. $(CPPFLAGS) + +$(CLIENT): $(OBJS) $(COBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(OBJS) $(COBJS), $@,, $(LIBS) glacier2$(LIBSUFFIX).lib + +$(SERVER): $(OBJS) $(SOBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(OBJS) $(SOBJS), $@,, $(LIBS) glacier2$(LIBSUFFIX).lib + +Chat.cpp Chat.h: Chat.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) $(SLICE2CPPFLAGS) Chat.ice + +clean:: + del /q Chat.cpp Chat.h + +!include .depend diff --git a/cpp/demo/Ice/Makefile.mak b/cpp/demo/Ice/Makefile.mak new file mode 100644 index 00000000000..2c1245e3c76 --- /dev/null +++ b/cpp/demo/Ice/Makefile.mak @@ -0,0 +1,29 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = ..\.. + +!include $(top_srcdir)\config\Make.rules.mak + +SUBDIRS = minimal \ + hello \ + latency \ + throughput \ + value \ + callback \ + nested \ + invoke \ + bidir \ + session \ + converter + +$(EVERYTHING):: + @for %i in ( $(SUBDIRS) ) do \ + @echo "making $@ in %i" & \ + cmd /c "cd %i & $(MAKE) -f Makefile.mak $@" diff --git a/cpp/demo/Ice/bidir/Makefile.mak b/cpp/demo/Ice/bidir/Makefile.mak new file mode 100644 index 00000000000..5eb32267beb --- /dev/null +++ b/cpp/demo/Ice/bidir/Makefile.mak @@ -0,0 +1,46 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = ..\..\.. + +CLIENT = client.exe +SERVER = server.exe + +TARGETS = $(CLIENT) $(SERVER) + +OBJS = Callback.o + +COBJS = Client.o + +SOBJS = CallbackI.o \ + Server.o + +SRCS = $(OBJS:.o=.cpp) \ + $(COBJS:.o=.cpp) \ + $(SOBJS:.o=.cpp) + +!include $(top_srcdir)/config/Make.rules.mak + +CPPFLAGS = -I. $(CPPFLAGS) + +$(CLIENT): $(OBJS) $(COBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(OBJS) $(COBJS), $@,, $(LIBS) + +$(SERVER): $(OBJS) $(SOBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(OBJS) $(SOBJS), $@,, $(LIBS) + +Callback.cpp Callback.h: Callback.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) $(SLICE2CPPFLAGS) Callback.ice + +clean:: + del /q Callback.cpp Callback.h + +!include .depend diff --git a/cpp/demo/Ice/callback/Makefile.mak b/cpp/demo/Ice/callback/Makefile.mak new file mode 100644 index 00000000000..66cac1cdd65 --- /dev/null +++ b/cpp/demo/Ice/callback/Makefile.mak @@ -0,0 +1,46 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = ..\..\.. + +CLIENT = client.exe +SERVER = server.exe + +TARGETS = $(CLIENT) $(SERVER) + +OBJS = Callback.o + +COBJS = Client.o + +SOBJS = CallbackSenderI.o \ + Server.o + +SRCS = $(OBJS:.o=.cpp) \ + $(COBJS:.o=.cpp) \ + $(SOBJS:.o=.cpp) + +!include $(top_srcdir)/config/Make.rules.mak + +CPPFLAGS = -I. $(CPPFLAGS) + +$(CLIENT): $(OBJS) $(COBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(OBJS) $(COBJS), $@,, $(LIBS) + +$(SERVER): $(OBJS) $(SOBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(OBJS) $(SOBJS), $@,, $(LIBS) + +Callback.cpp Callback.h: Callback.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) $(SLICE2CPPFLAGS) Callback.ice + +clean:: + del /q Callback.cpp Callback.h + +!include .depend diff --git a/cpp/demo/Ice/converter/Makefile.mak b/cpp/demo/Ice/converter/Makefile.mak new file mode 100644 index 00000000000..95d09f533a9 --- /dev/null +++ b/cpp/demo/Ice/converter/Makefile.mak @@ -0,0 +1,47 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = ..\..\.. + +CLIENT = client.exe +SERVER = server.exe + +TARGETS = $(CLIENT) $(SERVER) + +OBJS = Echo.o \ + StringConverterI.o + +COBJS = Client.o + +SOBJS = EchoI.o \ + Server.o + +SRCS = $(OBJS:.o=.cpp) \ + $(COBJS:.o=.cpp) \ + $(SOBJS:.o=.cpp) + +!include $(top_srcdir)/config/Make.rules.mak + +CPPFLAGS = -I. $(CPPFLAGS) + +$(CLIENT): $(OBJS) $(COBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(OBJS) $(COBJS), $@,, $(LIBS) + +$(SERVER): $(OBJS) $(SOBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(OBJS) $(SOBJS), $@,, $(LIBS) + +Echo.cpp Echo.h: Echo.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) $(SLICE2CPPFLAGS) Echo.ice + +clean:: + del /q Echo.cpp Echo.h + +!include .depend diff --git a/cpp/demo/Ice/hello/Makefile.mak b/cpp/demo/Ice/hello/Makefile.mak new file mode 100644 index 00000000000..64c16a4a21f --- /dev/null +++ b/cpp/demo/Ice/hello/Makefile.mak @@ -0,0 +1,46 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = ..\..\.. + +CLIENT = client.exe +SERVER = server.exe + +TARGETS = $(CLIENT) $(SERVER) + +OBJS = Hello.o + +COBJS = Client.o + +SOBJS = HelloI.o \ + Server.o + +SRCS = $(OBJS:.o=.cpp) \ + $(COBJS:.o=.cpp) \ + $(SOBJS:.o=.cpp) + +!include $(top_srcdir)/config/Make.rules.mak + +CPPFLAGS = -I. $(CPPFLAGS) + +$(CLIENT): $(OBJS) $(COBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(OBJS) $(COBJS), $@,, $(LIBS) + +$(SERVER): $(OBJS) $(SOBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(OBJS) $(SOBJS), $@,, $(LIBS) + +Hello.cpp Hello.h: Hello.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) $(SLICE2CPPFLAGS) Hello.ice + +clean:: + del /q Hello.cpp Hello.h + +!include .depend diff --git a/cpp/demo/Ice/invoke/Makefile.mak b/cpp/demo/Ice/invoke/Makefile.mak new file mode 100644 index 00000000000..cc056158efe --- /dev/null +++ b/cpp/demo/Ice/invoke/Makefile.mak @@ -0,0 +1,46 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = ..\..\.. + +CLIENT = client.exe +SERVER = server.exe + +TARGETS = $(CLIENT) $(SERVER) + +OBJS = Printer.o + +COBJS = Client.o + +SOBJS = PrinterI.o \ + Server.o + +SRCS = $(OBJS:.o=.cpp) \ + $(COBJS:.o=.cpp) \ + $(SOBJS:.o=.cpp) + +!include $(top_srcdir)/config/Make.rules.mak + +CPPFLAGS = -I. $(CPPFLAGS) + +$(CLIENT): $(OBJS) $(COBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(OBJS) $(COBJS), $@,, $(LIBS) + +$(SERVER): $(OBJS) $(SOBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(OBJS) $(SOBJS), $@,, $(LIBS) + +Printer.cpp Printer.h: Printer.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) --stream $(SLICE2CPPFLAGS) Printer.ice + +clean:: + del /q Printer.cpp Printer.h + +!include .depend diff --git a/cpp/demo/Ice/latency/Makefile.mak b/cpp/demo/Ice/latency/Makefile.mak new file mode 100644 index 00000000000..33041c6880f --- /dev/null +++ b/cpp/demo/Ice/latency/Makefile.mak @@ -0,0 +1,45 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = ..\..\.. + +CLIENT = client.exe +SERVER = server.exe + +TARGETS = $(CLIENT) $(SERVER) + +OBJS = Latency.o + +COBJS = Client.o + +SOBJS = Server.o + +SRCS = $(OBJS:.o=.cpp) \ + $(COBJS:.o=.cpp) \ + $(SOBJS:.o=.cpp) + +!include $(top_srcdir)/config/Make.rules.mak + +CPPFLAGS = -I. $(CPPFLAGS) + +$(CLIENT): $(OBJS) $(COBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(OBJS) $(COBJS), $@,, $(LIBS) + +$(SERVER): $(OBJS) $(SOBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(OBJS) $(SOBJS), $@,, $(LIBS) + +Latency.cpp Latency.h: Latency.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) $(SLICE2CPPFLAGS) Latency.ice + +clean:: + del /q Latency.cpp Latency.h + +!include .depend diff --git a/cpp/demo/Ice/minimal/Makefile.mak b/cpp/demo/Ice/minimal/Makefile.mak new file mode 100644 index 00000000000..64c16a4a21f --- /dev/null +++ b/cpp/demo/Ice/minimal/Makefile.mak @@ -0,0 +1,46 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = ..\..\.. + +CLIENT = client.exe +SERVER = server.exe + +TARGETS = $(CLIENT) $(SERVER) + +OBJS = Hello.o + +COBJS = Client.o + +SOBJS = HelloI.o \ + Server.o + +SRCS = $(OBJS:.o=.cpp) \ + $(COBJS:.o=.cpp) \ + $(SOBJS:.o=.cpp) + +!include $(top_srcdir)/config/Make.rules.mak + +CPPFLAGS = -I. $(CPPFLAGS) + +$(CLIENT): $(OBJS) $(COBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(OBJS) $(COBJS), $@,, $(LIBS) + +$(SERVER): $(OBJS) $(SOBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(OBJS) $(SOBJS), $@,, $(LIBS) + +Hello.cpp Hello.h: Hello.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) $(SLICE2CPPFLAGS) Hello.ice + +clean:: + del /q Hello.cpp Hello.h + +!include .depend diff --git a/cpp/demo/Ice/nested/Makefile.mak b/cpp/demo/Ice/nested/Makefile.mak new file mode 100644 index 00000000000..66d04251e9c --- /dev/null +++ b/cpp/demo/Ice/nested/Makefile.mak @@ -0,0 +1,46 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = ..\..\.. + +CLIENT = client.exe +SERVER = server.exe + +TARGETS = $(CLIENT) $(SERVER) + +OBJS = Nested.o \ + NestedI.o + +COBJS = Client.o + +SOBJS = Server.o + +SRCS = $(OBJS:.o=.cpp) \ + $(COBJS:.o=.cpp) \ + $(SOBJS:.o=.cpp) + +!include $(top_srcdir)/config/Make.rules.mak + +CPPFLAGS = -I. $(CPPFLAGS) + +$(CLIENT): $(OBJS) $(COBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(OBJS) $(COBJS), $@,, $(LIBS) + +$(SERVER): $(OBJS) $(SOBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(OBJS) $(SOBJS), $@,, $(LIBS) + +Nested.cpp Nested.h: Nested.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) $(SLICE2CPPFLAGS) Nested.ice + +clean:: + del /q Nested.cpp Nested.h + +!include .depend diff --git a/cpp/demo/Ice/session/Makefile.mak b/cpp/demo/Ice/session/Makefile.mak new file mode 100644 index 00000000000..bc4b7da4db3 --- /dev/null +++ b/cpp/demo/Ice/session/Makefile.mak @@ -0,0 +1,48 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = ..\..\.. + +CLIENT = client.exe +SERVER = server.exe + +TARGETS = $(CLIENT) $(SERVER) + +OBJS = Session.o + +COBJS = Client.o + +SOBJS = ReapThread.o \ + SessionFactoryI.o \ + SessionI.o \ + Server.o + +SRCS = $(OBJS:.o=.cpp) \ + $(COBJS:.o=.cpp) \ + $(SOBJS:.o=.cpp) + +!include $(top_srcdir)/config/Make.rules.mak + +CPPFLAGS = -I. $(CPPFLAGS) + +$(CLIENT): $(OBJS) $(COBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(OBJS) $(COBJS), $@,, $(LIBS) + +$(SERVER): $(OBJS) $(SOBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(OBJS) $(SOBJS), $@,, $(LIBS) + +Session.cpp Session.h: Session.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) $(SLICE2CPPFLAGS) Session.ice + +clean:: + del /q Session.cpp Session.h + +!include .depend diff --git a/cpp/demo/Ice/throughput/Makefile.mak b/cpp/demo/Ice/throughput/Makefile.mak new file mode 100644 index 00000000000..f03a0dc9e9c --- /dev/null +++ b/cpp/demo/Ice/throughput/Makefile.mak @@ -0,0 +1,46 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = ..\..\.. + +CLIENT = client.exe +SERVER = server.exe + +TARGETS = $(CLIENT) $(SERVER) + +OBJS = Throughput.o + +COBJS = Client.o + +SOBJS = ThroughputI.o \ + Server.o + +SRCS = $(OBJS:.o=.cpp) \ + $(COBJS:.o=.cpp) \ + $(SOBJS:.o=.cpp) + +!include $(top_srcdir)/config/Make.rules.mak + +CPPFLAGS = -I. $(CPPFLAGS) + +$(CLIENT): $(OBJS) $(COBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(OBJS) $(COBJS), $@,, $(LIBS) + +$(SERVER): $(OBJS) $(SOBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(OBJS) $(SOBJS), $@,, $(LIBS) + +Throughput.cpp Throughput.h: Throughput.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) $(SLICE2CPPFLAGS) Throughput.ice + +clean:: + del /q Throughput.cpp Throughput.h + +!include .depend diff --git a/cpp/demo/Ice/value/Makefile.mak b/cpp/demo/Ice/value/Makefile.mak new file mode 100644 index 00000000000..8bcdb86001d --- /dev/null +++ b/cpp/demo/Ice/value/Makefile.mak @@ -0,0 +1,47 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = ..\..\.. + +CLIENT = client.exe +SERVER = server.exe + +TARGETS = $(CLIENT) $(SERVER) + +OBJS = Value.o \ + ValueI.o + +COBJS = Client.o \ + ObjectFactory.o + +SOBJS = Server.o + +SRCS = $(OBJS:.o=.cpp) \ + $(COBJS:.o=.cpp) \ + $(SOBJS:.o=.cpp) + +!include $(top_srcdir)/config/Make.rules.mak + +CPPFLAGS = -I. $(CPPFLAGS) + +$(CLIENT): $(OBJS) $(COBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(OBJS) $(COBJS), $@,, $(LIBS) + +$(SERVER): $(OBJS) $(SOBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(OBJS) $(SOBJS), $@,, $(LIBS) + +Value.cpp Value.h: Value.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) $(SLICE2CPPFLAGS) Value.ice + +clean:: + del /q Value.cpp Value.h + +!include .depend diff --git a/cpp/demo/IceBox/Makefile.mak b/cpp/demo/IceBox/Makefile.mak new file mode 100644 index 00000000000..8bbd004b3e4 --- /dev/null +++ b/cpp/demo/IceBox/Makefile.mak @@ -0,0 +1,19 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = ..\.. + +!include $(top_srcdir)\config\Make.rules.mak + +SUBDIRS = hello + +$(EVERYTHING):: + @for %i in ( $(SUBDIRS) ) do \ + @echo "making $@ in %i" & \ + cmd /c "cd %i & $(MAKE) -f Makefile.mak $@" diff --git a/cpp/demo/IceBox/hello/Makefile.mak b/cpp/demo/IceBox/hello/Makefile.mak new file mode 100644 index 00000000000..e43a5439f6a --- /dev/null +++ b/cpp/demo/IceBox/hello/Makefile.mak @@ -0,0 +1,53 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = ..\..\.. + +CLIENT = client.exe + +LIBNAME = helloservice$(LIBSUFFIX).lib +DLLNAME = helloservice$(LIBSUFFIX).dll + +TARGETS = $(CLIENT) $(LIBNAME) $(DLLNAME) + +OBJS = Hello.o + +COBJS = Client.o + +SOBJS = HelloI.o \ + HelloServiceI.o + +SRCS = $(OBJS:.o=.cpp) \ + $(COBJS:.o=.cpp) \ + $(SOBJS:.o=.cpp) + +SLICE_SRCS = Hello.ice + +!include $(top_srcdir)\config\Make.rules.mak + +CPPFLAGS = -I. $(CPPFLAGS) +LINKWITH = $(LIBS) icebox$(LIBSUFFIX).lib + +$(LIBNAME) : $(DLLNAME) + +$(DLLNAME): $(OBJS) $(SOBJS) + del /q $@ + $(LINK) $(LD_DLLFLAGS) $(OBJS) $(SOBJS), $(DLLNAME),, $(LINKWITH) + +$(CLIENT): $(OBJS) $(COBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(OBJS) $(COBJS), $@,, $(LIBS) + +Hello.cpp Hello.h: Hello.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) $(SLICE2CPPFLAGS) Hello.ice + +clean:: + del /q Hello.cpp Hello.h + +!include .depend diff --git a/cpp/demo/IceGrid/Makefile.mak b/cpp/demo/IceGrid/Makefile.mak new file mode 100644 index 00000000000..c74951e014f --- /dev/null +++ b/cpp/demo/IceGrid/Makefile.mak @@ -0,0 +1,19 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = ..\.. + +!include $(top_srcdir)\config\Make.rules.mak + +SUBDIRS = allocate sessionActivation simple + +$(EVERYTHING):: + @for %i in ( $(SUBDIRS) ) do \ + @echo "making $@ in %i" & \ + cmd /c "cd %i & $(MAKE) -f Makefile.mak $@" diff --git a/cpp/demo/IceGrid/allocate/Makefile.mak b/cpp/demo/IceGrid/allocate/Makefile.mak new file mode 100644 index 00000000000..7f92c187197 --- /dev/null +++ b/cpp/demo/IceGrid/allocate/Makefile.mak @@ -0,0 +1,46 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = ..\..\.. + +CLIENT = client.exe +SERVER = server.exe + +TARGETS = $(CLIENT) $(SERVER) + +OBJS = Hello.o + +COBJS = Client.o + +SOBJS = HelloI.o \ + Server.o + +SRCS = $(OBJS:.o=.cpp) \ + $(COBJS:.o=.cpp) \ + $(SOBJS:.o=.cpp) + +!include $(top_srcdir)/config/Make.rules.mak + +CPPFLAGS = -I. $(CPPFLAGS) + +$(CLIENT): $(OBJS) $(COBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(OBJS) $(COBJS), $@,, $(LIBS) icegrid$(LIBSUFFIX).lib glacier2$(LIBSUFFIX).lib + +$(SERVER): $(OBJS) $(SOBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(OBJS) $(SOBJS), $@,, $(LIBS) + +Hello.cpp Hello.h: Hello.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) $(SLICE2CPPFLAGS) Hello.ice + +clean:: + del /q Hello.cpp Hello.h + +!include .depend diff --git a/cpp/demo/IceGrid/sessionActivation/Makefile.mak b/cpp/demo/IceGrid/sessionActivation/Makefile.mak new file mode 100644 index 00000000000..7f92c187197 --- /dev/null +++ b/cpp/demo/IceGrid/sessionActivation/Makefile.mak @@ -0,0 +1,46 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = ..\..\.. + +CLIENT = client.exe +SERVER = server.exe + +TARGETS = $(CLIENT) $(SERVER) + +OBJS = Hello.o + +COBJS = Client.o + +SOBJS = HelloI.o \ + Server.o + +SRCS = $(OBJS:.o=.cpp) \ + $(COBJS:.o=.cpp) \ + $(SOBJS:.o=.cpp) + +!include $(top_srcdir)/config/Make.rules.mak + +CPPFLAGS = -I. $(CPPFLAGS) + +$(CLIENT): $(OBJS) $(COBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(OBJS) $(COBJS), $@,, $(LIBS) icegrid$(LIBSUFFIX).lib glacier2$(LIBSUFFIX).lib + +$(SERVER): $(OBJS) $(SOBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(OBJS) $(SOBJS), $@,, $(LIBS) + +Hello.cpp Hello.h: Hello.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) $(SLICE2CPPFLAGS) Hello.ice + +clean:: + del /q Hello.cpp Hello.h + +!include .depend diff --git a/cpp/demo/IceGrid/simple/Makefile.mak b/cpp/demo/IceGrid/simple/Makefile.mak new file mode 100644 index 00000000000..7f92c187197 --- /dev/null +++ b/cpp/demo/IceGrid/simple/Makefile.mak @@ -0,0 +1,46 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = ..\..\.. + +CLIENT = client.exe +SERVER = server.exe + +TARGETS = $(CLIENT) $(SERVER) + +OBJS = Hello.o + +COBJS = Client.o + +SOBJS = HelloI.o \ + Server.o + +SRCS = $(OBJS:.o=.cpp) \ + $(COBJS:.o=.cpp) \ + $(SOBJS:.o=.cpp) + +!include $(top_srcdir)/config/Make.rules.mak + +CPPFLAGS = -I. $(CPPFLAGS) + +$(CLIENT): $(OBJS) $(COBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(OBJS) $(COBJS), $@,, $(LIBS) icegrid$(LIBSUFFIX).lib glacier2$(LIBSUFFIX).lib + +$(SERVER): $(OBJS) $(SOBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(OBJS) $(SOBJS), $@,, $(LIBS) + +Hello.cpp Hello.h: Hello.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) $(SLICE2CPPFLAGS) Hello.ice + +clean:: + del /q Hello.cpp Hello.h + +!include .depend diff --git a/cpp/demo/IceStorm/Makefile.mak b/cpp/demo/IceStorm/Makefile.mak new file mode 100644 index 00000000000..9bb419d2b82 --- /dev/null +++ b/cpp/demo/IceStorm/Makefile.mak @@ -0,0 +1,19 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = ..\.. + +!include $(top_srcdir)\config\Make.rules.mak + +SUBDIRS = clock + +$(EVERYTHING):: + @for %i in ( $(SUBDIRS) ) do \ + @echo "making $@ in %i" & \ + cmd /c "cd %i & $(MAKE) -f Makefile.mak $@" diff --git a/cpp/demo/IceStorm/clock/Makefile.mak b/cpp/demo/IceStorm/clock/Makefile.mak new file mode 100644 index 00000000000..14b8109bc93 --- /dev/null +++ b/cpp/demo/IceStorm/clock/Makefile.mak @@ -0,0 +1,48 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = ..\..\.. + +PUBLISHER = publisher.exe +SUBSCRIBER = subscriber.exe + +TARGETS = $(PUBLISHER) $(SUBSCRIBER) + +OBJS = Clock.o + +POBJS = Publisher.o + +SOBJS = Subscriber.o \ + ClockI.o + +SRCS = $(OBJS:.o=.cpp) \ + $(POBJS:.o=.cpp) \ + $(SOBJS:.o=.cpp) + + +!include $(top_srcdir)/config/Make.rules.mak + +CPPFLAGS = -I. $(CPPFLAGS) +LIBS = $(top_srcdir)\lib\icestorm$(LIBSUFFIX).lib $(LIBS) + +$(PUBLISHER): $(OBJS) $(POBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(OBJS) $(POBJS), $@,, $(LIBS) + +$(SUBSCRIBER): $(OBJS) $(SOBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(OBJS) $(SOBJS), $@,, $(LIBS) + +Clock.cpp Clock.h: Clock.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) $(SLICE2CPPFLAGS) Clock.ice + +clean:: + del /q Clock.cpp Clock.h + +!include .depend diff --git a/cpp/demo/IceUtil/Makefile.mak b/cpp/demo/IceUtil/Makefile.mak new file mode 100644 index 00000000000..e8b3e1e4d6c --- /dev/null +++ b/cpp/demo/IceUtil/Makefile.mak @@ -0,0 +1,19 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = ..\.. + +!include $(top_srcdir)/config/Make.rules.mak + +SUBDIRS = workqueue + +$(EVERYTHING):: + @for %i in ( $(SUBDIRS) ) do \ + @echo "making $@ in %i" & \ + cmd /c "cd %i & $(MAKE) -f Makefile.mak $@" diff --git a/cpp/demo/IceUtil/workqueue/Makefile.mak b/cpp/demo/IceUtil/workqueue/Makefile.mak new file mode 100644 index 00000000000..b0b68545215 --- /dev/null +++ b/cpp/demo/IceUtil/workqueue/Makefile.mak @@ -0,0 +1,28 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = ..\..\.. + +CLIENT = workqueue.exe + +TARGETS = $(CLIENT) + +OBJS = WorkQueue.o + +SRCS = $(OBJS:.o=.cpp) + +!include $(top_srcdir)/config/Make.rules.mak + +CPPFLAGS = -I. $(CPPFLAGS) + +$(CLIENT): $(OBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(OBJS), $@,, $(BASELIBS) + +!include .depend diff --git a/cpp/demo/Makefile.mak b/cpp/demo/Makefile.mak new file mode 100644 index 00000000000..2a87f5183bd --- /dev/null +++ b/cpp/demo/Makefile.mak @@ -0,0 +1,26 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = .. + +!include $(top_srcdir)/config/Make.rules.mak + +SUBDIRS = IceUtil \ + Ice \ + IceBox \ + Glacier2 \ + Freeze \ + IceStorm \ + IceGrid \ + book + +$(EVERYTHING):: + @for %i in ( $(SUBDIRS) ) do \ + @echo "making $@ in %i" & \ + cmd /c "cd %i & $(MAKE) -f Makefile.mak $@" diff --git a/cpp/demo/book/Makefile.mak b/cpp/demo/book/Makefile.mak new file mode 100644 index 00000000000..fc6f5c3fc72 --- /dev/null +++ b/cpp/demo/book/Makefile.mak @@ -0,0 +1,19 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = ..\.. + +!include $(top_srcdir)\config\Make.rules.mak + +SUBDIRS = printer simple_filesystem + +$(EVERYTHING):: + @for %i in ( $(SUBDIRS) ) do \ + @echo "making $@ in %i" & \ + cmd /c "cd %i & $(MAKE) -f Makefile.mak $@" diff --git a/cpp/demo/book/printer/Makefile.mak b/cpp/demo/book/printer/Makefile.mak new file mode 100644 index 00000000000..ba871076d16 --- /dev/null +++ b/cpp/demo/book/printer/Makefile.mak @@ -0,0 +1,45 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = ..\..\.. + +CLIENT = client.exe +SERVER = server.exe + +TARGETS = $(CLIENT) $(SERVER) + +OBJS = Printer.o + +COBJS = Client.o + +SOBJS = Server.o + +SRCS = $(OBJS:.o=.cpp) \ + $(COBJS:.o=.cpp) \ + $(SOBJS:.o=.cpp) + +!include $(top_srcdir)/config/Make.rules.mak + +CPPFLAGS = -I. $(CPPFLAGS) + +$(CLIENT): $(OBJS) $(COBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(OBJS) $(COBJS), $@,, $(LIBS) + +$(SERVER): $(OBJS) $(SOBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(OBJS) $(SOBJS), $@,, $(LIBS) + +Printer.cpp Printer.h: Printer.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) $(SLICE2CPPFLAGS) Printer.ice + +clean:: + del /q Printer.cpp Printer.h + +!include .depend diff --git a/cpp/demo/book/simple_filesystem/Makefile.mak b/cpp/demo/book/simple_filesystem/Makefile.mak new file mode 100644 index 00000000000..e349be88b0a --- /dev/null +++ b/cpp/demo/book/simple_filesystem/Makefile.mak @@ -0,0 +1,46 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = ..\..\.. + +CLIENT = client.exe +SERVER = server.exe + +TARGETS = $(CLIENT) $(SERVER) + +OBJS = Filesystem.o + +COBJS = Client.o + +SOBJS = FilesystemI.o \ + Server.o + +SRCS = $(OBJS:.o=.cpp) \ + $(COBJS:.o=.cpp) \ + $(SOBJS:.o=.cpp) + +!include $(top_srcdir)/config/Make.rules.mak + +CPPFLAGS = -I. $(CPPFLAGS) + +$(CLIENT): $(OBJS) $(COBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(OBJS) $(COBJS), $@,, $(LIBS) + +$(SERVER): $(OBJS) $(SOBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(OBJS) $(SOBJS), $@,, $(LIBS) + +Filesystem.cpp Filesystem.h: Filesystem.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) $(SLICE2CPPFLAGS) Filesystem.ice + +clean:: + del /q Filesystem.cpp Filesystem.h + +!include .depend diff --git a/cpp/include/Freeze/Makefile.mak b/cpp/include/Freeze/Makefile.mak new file mode 100644 index 00000000000..f85d9ffb140 --- /dev/null +++ b/cpp/include/Freeze/Makefile.mak @@ -0,0 +1,21 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = ..\.. + +!include $(top_srcdir)/config/Make.rules.mak + +install:: + @if not exist $(install_includedir)\Freeze \ + @echo "Creating $(install_includedir)\Freeze..." & \ + mkdir $(install_includedir)\Freeze + + @for %i in ( *.h ) do \ + @echo Installing %i & \ + copy %i $(install_includedir)\Freeze diff --git a/cpp/include/Glacier2/Makefile.mak b/cpp/include/Glacier2/Makefile.mak new file mode 100644 index 00000000000..c8cbf7ca43e --- /dev/null +++ b/cpp/include/Glacier2/Makefile.mak @@ -0,0 +1,21 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = ..\.. + +!include $(top_srcdir)/config/Make.rules.mak + +install:: + @if not exist $(install_includedir)\Glacier2 \ + @echo "Creating $(install_includedir)\Glacier2..." & \ + mkdir $(install_includedir)\Glacier2 + + @for %i in ( *.h ) do \ + @echo Installing %i & \ + copy %i $(install_includedir)\Glacier2 diff --git a/cpp/include/Ice/Handle.h b/cpp/include/Ice/Handle.h index 3aa0b643712..8ad0f389f3c 100644 --- a/cpp/include/Ice/Handle.h +++ b/cpp/include/Ice/Handle.h @@ -177,13 +177,21 @@ public: template<class Y> static Handle dynamicCast(const ::IceUtil::HandleBase<Y>& r) { +#ifdef __BCPLUSPLUS__ + return Handle<T>(dynamic_cast<T*>(r._ptr)); +#else return Handle(dynamic_cast<T*>(r._ptr)); +#endif } template<class Y> static Handle dynamicCast(Y* p) { +#ifdef __BCPLUSPLUS__ + return Handle<T>(dynamic_cast<T*>(p)); +#else return Handle(dynamic_cast<T*>(p)); +#endif } void __clearHandleUnsafe() diff --git a/cpp/include/Ice/Makefile.mak b/cpp/include/Ice/Makefile.mak new file mode 100644 index 00000000000..37e4eb0a8e0 --- /dev/null +++ b/cpp/include/Ice/Makefile.mak @@ -0,0 +1,21 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = ..\.. + +!include $(top_srcdir)/config/Make.rules.mak + +install:: + @if not exist $(install_includedir)\Ice \ + @echo "Creating $(install_includedir)\Ice..." & \ + mkdir $(install_includedir)\Ice + + @for %i in ( *.h ) do \ + @echo Installing %i & \ + copy %i $(install_includedir)\Ice diff --git a/cpp/include/Ice/ProxyHandle.h b/cpp/include/Ice/ProxyHandle.h index dd337f8cedb..c43cc49a4b1 100644 --- a/cpp/include/Ice/ProxyHandle.h +++ b/cpp/include/Ice/ProxyHandle.h @@ -304,7 +304,7 @@ public: template<class Y> std::ostream& operator<<(std::ostream& os, ::IceInternal::ProxyHandle<Y> p) { - return os << (p ? p->ice_toString() : ""); + return os << (p ? p->ice_toString() : std::string("")); } #endif diff --git a/cpp/include/IceBox/Makefile.mak b/cpp/include/IceBox/Makefile.mak new file mode 100644 index 00000000000..54773ee2d95 --- /dev/null +++ b/cpp/include/IceBox/Makefile.mak @@ -0,0 +1,21 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = ..\.. + +!include $(top_srcdir)/config/Make.rules.mak + +install:: + @if not exist $(install_includedir)\IceBox \ + @echo "Creating $(install_includedir)\IceBox..." & \ + mkdir $(install_includedir)\IceBox + + @for %i in ( *.h ) do \ + @echo Installing %i & \ + copy %i $(install_includedir)\IceBox diff --git a/cpp/include/IceGrid/Makefile.mak b/cpp/include/IceGrid/Makefile.mak new file mode 100644 index 00000000000..352cb0ac234 --- /dev/null +++ b/cpp/include/IceGrid/Makefile.mak @@ -0,0 +1,21 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = ..\.. + +!include $(top_srcdir)/config/Make.rules.mak + +install:: + @if not exist $(install_includedir)\IceGrid \ + @echo "Creating $(install_includedir)\IceGrid..." & \ + mkdir $(install_includedir)\IceGrid + + @for %i in ( *.h ) do \ + @echo Installing %i & \ + copy %i $(install_includedir)\IceGrid diff --git a/cpp/include/IcePatch2/ClientUtil.h b/cpp/include/IcePatch2/ClientUtil.h index b707d7596e4..0357919dd72 100755 --- a/cpp/include/IcePatch2/ClientUtil.h +++ b/cpp/include/IcePatch2/ClientUtil.h @@ -14,6 +14,7 @@ #include <IceUtil/Thread.h> #include <IcePatch2/FileServer.h> #include <fstream> +#include <stdio.h> namespace IcePatch2 { diff --git a/cpp/include/IcePatch2/Makefile.mak b/cpp/include/IcePatch2/Makefile.mak new file mode 100644 index 00000000000..ee849169148 --- /dev/null +++ b/cpp/include/IcePatch2/Makefile.mak @@ -0,0 +1,21 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = ..\.. + +!include $(top_srcdir)/config/Make.rules.mak + +install:: + @if not exist $(install_includedir)\IcePatch2 \ + @echo "Creating $(install_includedir)\IcePatch2..." & \ + mkdir $(install_includedir)\IcePatch2 + + @for %i in ( *.h ) do \ + @echo Installing %i & \ + copy %i $(install_includedir)\IcePatch2 diff --git a/cpp/include/IcePatch2/Util.h b/cpp/include/IcePatch2/Util.h index 0bfa14e2e64..51d64150d91 100644 --- a/cpp/include/IcePatch2/Util.h +++ b/cpp/include/IcePatch2/Util.h @@ -12,6 +12,7 @@ #include <Ice/Ice.h> #include <IcePatch2/FileInfo.h> +#include <stdio.h> namespace IcePatch2 { diff --git a/cpp/include/IceSSL/Makefile.mak b/cpp/include/IceSSL/Makefile.mak new file mode 100644 index 00000000000..43b388a25a1 --- /dev/null +++ b/cpp/include/IceSSL/Makefile.mak @@ -0,0 +1,21 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = ..\.. + +!include $(top_srcdir)/config/Make.rules.mak + +install:: + @if not exist $(install_includedir)\IceSSL \ + @echo "Creating $(install_includedir)\IceSSL..." & \ + mkdir $(install_includedir)\IceSSL + + @for %i in ( *.h ) do \ + @echo Installing %i & \ + copy %i $(install_includedir)\IceSSL diff --git a/cpp/include/IceSSL/Plugin.h b/cpp/include/IceSSL/Plugin.h index cfb2c1943ea..28b81438714 100644 --- a/cpp/include/IceSSL/Plugin.h +++ b/cpp/include/IceSSL/Plugin.h @@ -42,7 +42,7 @@ typedef struct ssl_ctx_st SSL_CTX; // X509 is the OpenSSL type that represents a certificate. // typedef struct x509_st X509; -typedef struct X509_name_st X509_NAME; +typedef struct X509_name_st X509NAME; // // EVP_PKEY is the OpenSSL type that represents a public key. @@ -152,7 +152,7 @@ public: // // Create a DistinguishedName using an OpenSSL value. // - DistinguishedName(X509_NAME*); + DistinguishedName(X509NAME*); // // Create a DistinguishedName from a string encoded using diff --git a/cpp/include/IceStorm/Makefile.mak b/cpp/include/IceStorm/Makefile.mak new file mode 100644 index 00000000000..76672b8592d --- /dev/null +++ b/cpp/include/IceStorm/Makefile.mak @@ -0,0 +1,21 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = ..\.. + +!include $(top_srcdir)/config/Make.rules.mak + +install:: + @if not exist $(install_includedir)\IceStorm \ + @echo "Creating $(install_includedir)\IceStorm..." & \ + mkdir $(install_includedir)\IceStorm + + @for %i in ( *.h ) do \ + @echo Installing %i & \ + copy %i $(install_includedir)\IceStorm diff --git a/cpp/include/IceUtil/AbstractMutex.h b/cpp/include/IceUtil/AbstractMutex.h index fa08ce5b957..98bf0bffa22 100644 --- a/cpp/include/IceUtil/AbstractMutex.h +++ b/cpp/include/IceUtil/AbstractMutex.h @@ -36,8 +36,10 @@ class AbstractMutexI : public AbstractMutex, public T { public: +#ifndef __BCPLUSPLUS__ typedef LockT<AbstractMutexI> Lock; typedef TryLockT<AbstractMutexI> TryLock; +#endif virtual void lock() const { @@ -63,8 +65,10 @@ class AbstractMutexReadI : public AbstractMutex, public T { public: +#ifndef __BCPLUSPLUS__ typedef LockT<AbstractMutexReadI> Lock; typedef TryLockT<AbstractMutexReadI> TryLock; +#endif virtual void lock() const { @@ -90,8 +94,10 @@ class AbstractMutexWriteI : public AbstractMutex, public T { public: +#ifndef __BCPLUSPLUS__ typedef LockT<AbstractMutexWriteI> Lock; typedef TryLockT<AbstractMutexWriteI> TryLock; +#endif virtual void lock() const { diff --git a/cpp/include/IceUtil/Cache.h b/cpp/include/IceUtil/Cache.h index d6c9228156d..cd0829402fb 100644 --- a/cpp/include/IceUtil/Cache.h +++ b/cpp/include/IceUtil/Cache.h @@ -202,7 +202,7 @@ Cache<Key, Value>::pinImpl(const Key& key, const Handle<Value>& newObj) std::pair<typename CacheMap::iterator, bool> ir = #endif -#if defined(_MSC_VER) +#if defined(_MSC_VER) || defined(__BCPLUSPLUS__) _map.insert(CacheMap::value_type(key, CacheValue(0))); #else _map.insert(typename CacheMap::value_type(key, CacheValue(0))); diff --git a/cpp/include/IceUtil/Cond.h b/cpp/include/IceUtil/Cond.h index 7abf1b97cab..355728541d2 100644 --- a/cpp/include/IceUtil/Cond.h +++ b/cpp/include/IceUtil/Cond.h @@ -37,7 +37,7 @@ class Semaphore public: Semaphore(long = 0); - ~Semaphore(); + ICE_UTIL_API ~Semaphore(); void wait() const; bool timedWait(const Time&) const; diff --git a/cpp/include/IceUtil/Config.h b/cpp/include/IceUtil/Config.h index a340171ce52..49698ad9272 100644 --- a/cpp/include/IceUtil/Config.h +++ b/cpp/include/IceUtil/Config.h @@ -53,7 +53,7 @@ // // TODO: more macros to support IBM Visual Age _Export syntax as well. // -#if (defined(_MSC_VER) && !defined(ICE_STATIC_LIBS)) || \ +#if defined(__BCPLUSPLUS__) || (defined(_MSC_VER) && !defined(ICE_STATIC_LIBS)) || \ (defined(__HP_aCC) && defined(__HP_WINDLL)) # define ICE_DECLSPEC_EXPORT __declspec(dllexport) # define ICE_DECLSPEC_IMPORT __declspec(dllimport) @@ -90,7 +90,7 @@ // TODO: figure out why IceUtil does not compile with _SLTP_DEBUG using // the Intel compiler. // -#if !defined(NDEBUG) && !defined(_STLP_DEBUG) && !defined(__INTEL_COMPILER) +#if !defined(NDEBUG) && !defined(_STLP_DEBUG) && !defined(__INTEL_COMPILER) && !defined(__BCPLUSPLUS__) # define _STLP_DEBUG #endif @@ -107,7 +107,7 @@ # define _WIN32_WINNT 0x0400 # endif -# if !defined(_DLL) || !defined(_MT) +# if defined(_MSC_VER) && (!defined(_DLL) || !defined(_MT)) # error "Only multi-threaded DLL libraries can be used with Ice!" # endif @@ -179,7 +179,7 @@ private: // // Int64 typedef // -#if defined(_MSC_VER) +#if defined(__BCPLUSPLUS__) || defined(_MSC_VER) // // On Windows, long is always 32-bit // @@ -195,7 +195,7 @@ typedef long long Int64; // // ICE_INT64: macro for Int64 literal values // -#if defined(_MSC_VER) +#if defined(__BCPLUSPLUS__) || defined(_MSC_VER) # define ICE_INT64(n) n##i64 #elif defined(ICE_64) # define ICE_INT64(n) n##L diff --git a/cpp/include/IceUtil/Handle.h b/cpp/include/IceUtil/Handle.h index 293ae9ed02a..7fa826d4a7e 100644 --- a/cpp/include/IceUtil/Handle.h +++ b/cpp/include/IceUtil/Handle.h @@ -242,13 +242,21 @@ public: template<class Y> static Handle dynamicCast(const HandleBase<Y>& r) { +#ifdef __BCPLUSPLUS__ + return Handle<T>(dynamic_cast<T*>(r._ptr)); +#else return Handle(dynamic_cast<T*>(r._ptr)); +#endif } template<class Y> static Handle dynamicCast(Y* p) { +#ifdef __BCPLUSPLUS__ + return Handle<T>(dynamic_cast<T*>(p)); +#else return Handle(dynamic_cast<T*>(p)); +#endif } }; diff --git a/cpp/include/IceUtil/Makefile.mak b/cpp/include/IceUtil/Makefile.mak new file mode 100644 index 00000000000..b94eb8b7fc3 --- /dev/null +++ b/cpp/include/IceUtil/Makefile.mak @@ -0,0 +1,21 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = ..\.. + +!include $(top_srcdir)/config/Make.rules.mak + +install:: + @if not exist $(install_includedir)\IceUtil \ + @echo "Creating $(install_includedir)\IceUtil..." & \ + mkdir $(install_includedir)\IceUtil + + @for %i in ( *.h ) do \ + @echo Installing %i & \ + copy %i $(install_includedir)\IceUtil diff --git a/cpp/include/IceUtil/StaticMutex.h b/cpp/include/IceUtil/StaticMutex.h index a3234b3bdf9..999fda51471 100644 --- a/cpp/include/IceUtil/StaticMutex.h +++ b/cpp/include/IceUtil/StaticMutex.h @@ -77,9 +77,9 @@ public: -#ifndef _MSC_VER +#if !defined(_MSC_VER) && !defined(__BCPLUSPLUS__) // COMPILERBUG -// VC++ considers that aggregates should not have private members ... +// VC++ BC++ considers that aggregates should not have private members ... // even if it's just functions. private: #endif diff --git a/cpp/include/IceXML/Makefile.mak b/cpp/include/IceXML/Makefile.mak new file mode 100644 index 00000000000..260d09645a8 --- /dev/null +++ b/cpp/include/IceXML/Makefile.mak @@ -0,0 +1,21 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = ..\.. + +!include $(top_srcdir)/config/Make.rules.mak + +install:: + @if not exist $(install_includedir)\IceXML \ + @echo "Creating $(install_includedir)\IceXML..." & \ + mkdir $(install_includedir)\IceXML + + @for %i in ( *.h ) do \ + @echo Installing %i & \ + copy %i $(install_includedir)\IceXML diff --git a/cpp/include/Makefile.mak b/cpp/include/Makefile.mak new file mode 100644 index 00000000000..26bb3eb4dbf --- /dev/null +++ b/cpp/include/Makefile.mak @@ -0,0 +1,29 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = .. + +!include $(top_srcdir)/config/Make.rules.mak + +SUBDIRS = Freeze \ + Glacier2 \ + Ice \ + IceBox \ + IceGrid \ + IcePatch2 \ + IceSSL \ + IceStorm \ + IceUtil \ + IceXML \ + Slice + +$(EVERYTHING):: + @for %i in ( $(SUBDIRS) ) do \ + @echo "making $@ in %i" & \ + cmd /c "cd %i & $(MAKE) -f Makefile.mak $@" diff --git a/cpp/include/Slice/Makefile.mak b/cpp/include/Slice/Makefile.mak new file mode 100644 index 00000000000..3e22982c02b --- /dev/null +++ b/cpp/include/Slice/Makefile.mak @@ -0,0 +1,21 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = ..\.. + +!include $(top_srcdir)/config/Make.rules.mak + +install:: + @if not exist $(install_includedir)\Slice \ + @echo "Creating $(install_includedir)\Slice..." & \ + mkdir $(install_includedir)\Slice + + @for %i in ( *.h ) do \ + @echo Installing %i & \ + copy %i $(install_includedir)\Slice diff --git a/cpp/include/Slice/Parser.h b/cpp/include/Slice/Parser.h index 53c8cb22042..bb69b8c3036 100644 --- a/cpp/include/Slice/Parser.h +++ b/cpp/include/Slice/Parser.h @@ -19,6 +19,7 @@ #include <stack> #include <map> #include <set> +#include <stdio.h> #ifndef SLICE_API # ifdef SLICE_API_EXPORTS diff --git a/cpp/include/Slice/Preprocessor.h b/cpp/include/Slice/Preprocessor.h index f4499182329..28c0a6dd69b 100644 --- a/cpp/include/Slice/Preprocessor.h +++ b/cpp/include/Slice/Preprocessor.h @@ -11,6 +11,9 @@ #define PREPROCESSOR_H #include <IceUtil/Config.h> +#ifdef __BCPLUSPLUS__ +# include <stdio.h> +#endif #ifndef SLICE_API # ifdef SLICE_API_EXPORTS diff --git a/cpp/slice/Freeze/Makefile.mak b/cpp/slice/Freeze/Makefile.mak new file mode 100644 index 00000000000..1c93cf62cf2 --- /dev/null +++ b/cpp/slice/Freeze/Makefile.mak @@ -0,0 +1,21 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = ..\.. + +!include $(top_srcdir)/config/Make.rules.mak + +install:: + @if not exist $(install_slicedir)\Freeze \ + @echo "Creating $(install_slicedir)\Freeze..." & \ + mkdir $(install_slicedir)\Freeze + + @for %i in ( *.ice ) do \ + @echo Installing %i & \ + copy %i $(install_slicedir)\Freeze diff --git a/cpp/slice/Glacier2/Makefile.mak b/cpp/slice/Glacier2/Makefile.mak new file mode 100644 index 00000000000..45dbca34281 --- /dev/null +++ b/cpp/slice/Glacier2/Makefile.mak @@ -0,0 +1,21 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = ..\.. + +!include $(top_srcdir)/config/Make.rules.mak + +install:: + @if not exist $(install_slicedir)\Glacier2 \ + @echo "Creating $(install_slicedir)\Glacier2..." & \ + mkdir $(install_slicedir)\Glacier2 + + @for %i in ( *.ice ) do \ + @echo Installing %i & \ + copy %i $(install_slicedir)\Glacier2 diff --git a/cpp/slice/Ice/Makefile.mak b/cpp/slice/Ice/Makefile.mak new file mode 100644 index 00000000000..c3371ff9199 --- /dev/null +++ b/cpp/slice/Ice/Makefile.mak @@ -0,0 +1,21 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = ..\.. + +!include $(top_srcdir)/config/Make.rules.mak + +install:: + @if not exist $(install_slicedir)\Ice \ + @echo "Creating $(install_slicedir)\Ice..." & \ + mkdir $(install_slicedir)\Ice + + @for %i in ( *.ice ) do \ + @echo Installing %i & \ + copy %i $(install_slicedir)\Ice diff --git a/cpp/slice/IceBox/Makefile.mak b/cpp/slice/IceBox/Makefile.mak new file mode 100644 index 00000000000..bb8206058d3 --- /dev/null +++ b/cpp/slice/IceBox/Makefile.mak @@ -0,0 +1,21 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = ..\.. + +!include $(top_srcdir)/config/Make.rules.mak + +install:: + @if not exist $(install_slicedir)\IceBox \ + @echo "Creating $(install_slicedir)\IceBox..." & \ + mkdir $(install_slicedir)\IceBox + + @for %i in ( *.ice ) do \ + @echo Installing %i & \ + copy %i $(install_slicedir)\IceBox diff --git a/cpp/slice/IceGrid/Makefile.mak b/cpp/slice/IceGrid/Makefile.mak new file mode 100644 index 00000000000..c69128a9212 --- /dev/null +++ b/cpp/slice/IceGrid/Makefile.mak @@ -0,0 +1,21 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = ..\.. + +!include $(top_srcdir)/config/Make.rules.mak + +install:: + @if not exist $(install_slicedir)\IceGrid \ + @echo "Creating $(install_slicedir)\IceGrid..." & \ + mkdir $(install_slicedir)\IceGrid + + @for %i in ( *.ice ) do \ + @echo Installing %i & \ + copy %i $(install_slicedir)\IceGrid diff --git a/cpp/slice/IcePatch2/Makefile.mak b/cpp/slice/IcePatch2/Makefile.mak new file mode 100644 index 00000000000..ed941d561de --- /dev/null +++ b/cpp/slice/IcePatch2/Makefile.mak @@ -0,0 +1,21 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = ..\.. + +!include $(top_srcdir)/config/Make.rules.mak + +install:: + @if not exist $(install_slicedir)\IcePatch2 \ + @echo "Creating $(install_slicedir)\IcePatch2..." & \ + mkdir $(install_slicedir)\IcePatch2 + + @for %i in ( *.ice ) do \ + @echo Installing %i & \ + copy %i $(install_slicedir)\IcePatch2 diff --git a/cpp/slice/IceSSL/Makefile.mak b/cpp/slice/IceSSL/Makefile.mak new file mode 100644 index 00000000000..3a6dc877f09 --- /dev/null +++ b/cpp/slice/IceSSL/Makefile.mak @@ -0,0 +1,21 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = ..\.. + +!include $(top_srcdir)/config/Make.rules.mak + +install:: + @if not exist $(install_slicedir)\IceSSL \ + @echo "Creating $(install_slicedir)\IceSSL..." & \ + mkdir $(install_slicedir)\IceSSL + + @for %i in ( *.ice ) do \ + @echo Installing %i & \ + copy %i $(install_slicedir)\IceSSL diff --git a/cpp/slice/IceStorm/Makefile.mak b/cpp/slice/IceStorm/Makefile.mak new file mode 100644 index 00000000000..79a7ab89e13 --- /dev/null +++ b/cpp/slice/IceStorm/Makefile.mak @@ -0,0 +1,21 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = ..\.. + +!include $(top_srcdir)/config/Make.rules.mak + +install:: + @if not exist $(install_slicedir)\IceStorm \ + @echo "Creating $(install_slicedir)\IceStorm..." & \ + mkdir $(install_slicedir)\IceStorm + + @for %i in ( *.ice ) do \ + @echo Installing %i & \ + copy %i $(install_slicedir)\IceStorm diff --git a/cpp/slice/Makefile.mak b/cpp/slice/Makefile.mak new file mode 100644 index 00000000000..84bf49d01a9 --- /dev/null +++ b/cpp/slice/Makefile.mak @@ -0,0 +1,25 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = .. + +!include $(top_srcdir)/config/Make.rules.mak + +SUBDIRS = Freeze \ + Glacier2 \ + Ice \ + IceBox \ + IcePatch2 \ + IceStorm \ + IceGrid + +$(EVERYTHING):: + @for %i in ( $(SUBDIRS) ) do \ + @echo "making $@ in %i" & \ + cmd /c "cd %i & $(MAKE) -f Makefile.mak $@" diff --git a/cpp/src/Freeze/Makefile.mak b/cpp/src/Freeze/Makefile.mak new file mode 100644 index 00000000000..b9382910b3a --- /dev/null +++ b/cpp/src/Freeze/Makefile.mak @@ -0,0 +1,127 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = ..\.. + +LIBNAME = $(top_srcdir)\lib\freeze$(LIBSUFFIX).lib +DLLNAME = $(top_srcdir)\bin\freeze$(SOVERSION)$(LIBSUFFIX).dll + + +TARGETS = $(LIBNAME) $(DLLNAME) + + +OBJS = CatalogData.o \ + Catalog.o \ + ConnectionI.o \ + Connection.o \ + DB.o \ + EvictorI.o \ + EvictorIteratorI.o \ + Evictor.o \ + EvictorStorage.o \ + Exception.o \ + IndexI.o \ + Index.o \ + MapI.o \ + ObjectStore.o \ + PingObject.o \ + SharedDbEnv.o \ + SharedDb.o \ + TransactionHolder.o \ + TransactionI.o \ + Transaction.o \ + Util.o + +SRCS = $(OBJS:.o=.cpp) + + +HDIR = $(includedir)\Freeze +SDIR = $(slicedir)\Freeze + +!include $(top_srcdir)/config/Make.rules.mak + +CPPFLAGS = -I.. $(CPPFLAGS) -DFREEZE_API_EXPORTS +SLICE2CPPFLAGS = --ice --include-dir Freeze --dll-export FREEZE_API $(SLICE2CPPFLAGS) +LINKWITH = $(LIBS) $(DB_LIBS) + +$(HDIR)/Catalog.h Catalog.cpp: $(SLICE2FREEZE) $(SDIR)/CatalogData.ice + del /q $(HDIR)\Catalog.h Catalog.cpp + $(SLICE2FREEZE) $(SLICE2CPPFLAGS) --dict Freeze::Catalog,string,Freeze::CatalogData \ + Catalog ../../slice/Freeze/CatalogData.ice + move Catalog.h $(HDIR) + +clean:: + del /q $(HDIR)\Catalog.h Catalog.cpp + + +$(LIBNAME): $(DLLNAME) + +$(DLLNAME): $(OBJS) + del /q $@ + $(LINK) $(LD_DLLFLAGS) $(OBJS), $(DLLNAME),, $(LINKWITH) + move $(DLLNAME:.dll=.lib) $(LIBNAME) + +DB.cpp $(HDIR)/DB.h: $(SDIR)/DB.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) $(SLICE2CPPFLAGS) $(SDIR)/DB.ice + move DB.h $(HDIR) + +CatalogData.cpp $(HDIR)/CatalogData.h: $(SDIR)/CatalogData.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) $(SLICE2CPPFLAGS) $(SDIR)/CatalogData.ice + move CatalogData.h $(HDIR) + +Connection.cpp $(HDIR)/Connection.h: $(SDIR)/Connection.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) $(SLICE2CPPFLAGS) $(SDIR)/Connection.ice + move Connection.h $(HDIR) + +$(HDIR)/ConnectionF.h: $(SDIR)/ConnectionF.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) $(SLICE2CPPFLAGS) $(SDIR)/ConnectionF.ice + del /q ConnectionF.cpp + move ConnectionF.h $(HDIR) + +Exception.cpp $(HDIR)/Exception.h: $(SDIR)/Exception.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) $(SLICE2CPPFLAGS) $(SDIR)/Exception.ice + move Exception.h $(HDIR) + +$(HDIR)/EvictorF.h: $(SDIR)/EvictorF.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) $(SLICE2CPPFLAGS) $(SDIR)/EvictorF.ice + del /q EvictorF.cpp + move EvictorF.h $(HDIR) + +Evictor.cpp $(HDIR)/Evictor.h: $(SDIR)/Evictor.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) $(SLICE2CPPFLAGS) $(SDIR)/Evictor.ice + move Evictor.h $(HDIR) + +EvictorStorage.cpp $(HDIR)/EvictorStorage.h: $(SDIR)/EvictorStorage.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) $(SLICE2CPPFLAGS) $(SDIR)/EvictorStorage.ice + move EvictorStorage.h $(HDIR) + +Transaction.cpp $(HDIR)/Transaction.h: $(SDIR)/Transaction.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) $(SLICE2CPPFLAGS) $(SDIR)/Transaction.ice + move Transaction.h $(HDIR) + +PingObject.cpp ../Freeze/PingObject.h: PingObject.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) $(SLICE2CPPFLAGS) PingObject.ice + +clean:: + del /q DB.cpp $(HDIR)\DB.h + del /q CatalogData.cpp $(HDIR)\CatalogData.h + del /q Connection.cpp $(HDIR)\Connection.h + del /q $(HDIR)\ConnectionF.h + del /q Exception.cpp $(HDIR)\Exception.h + del /q $(HDIR)\EvictorF.h + del /q Evictor.cpp $(HDIR)\Evictor.h + del /q EvictorStorage.cpp $(HDIR)\EvictorStorage.h + del /q Transaction.cpp $(HDIR)\Transaction.h + del /q PingObject.cpp PingObject.h + +install:: all + copy $(LIBNAME) $(install_libdir) + copy $(DLLNAME) $(install_bindir) + +!include .depend diff --git a/cpp/src/Freeze/MapI.cpp b/cpp/src/Freeze/MapI.cpp index d2874507c00..13c86e5eaac 100644 --- a/cpp/src/Freeze/MapI.cpp +++ b/cpp/src/Freeze/MapI.cpp @@ -93,7 +93,7 @@ Freeze::MapHelper::create(const Freeze::ConnectionPtr& connection, const std::vector<MapIndexBasePtr>& indices, bool createDb) { - Freeze::ConnectionIPtr connectionI = Freeze::ConnectionIPtr::dynamicCast(connection); + Freeze::ConnectionIPtr connectionI = Freeze::ConnectionIPtr::dynamicCast(connection.get()); return new MapHelperI(connectionI, dbName, key, value, keyCompare, indices, createDb); } diff --git a/cpp/src/FreezeScript/DumpDB.cpp b/cpp/src/FreezeScript/DumpDB.cpp index 135fb269c90..2076bb05676 100644 --- a/cpp/src/FreezeScript/DumpDB.cpp +++ b/cpp/src/FreezeScript/DumpDB.cpp @@ -136,7 +136,7 @@ run(int argc, char** argv, const Ice::CommunicatorPtr& communicator) vector<string> args; try { - args = opts.parse(argc, argv); + args = opts.parse(argc, (const char**)argv); } catch(const IceUtil::Options::BadOpt& e) { @@ -401,7 +401,7 @@ run(int argc, char** argv, const Ice::CommunicatorPtr& communicator) for(vector<string>::iterator p = dbNames.begin(); p != dbNames.end(); ++p) { string name = *p; - string facet = (name == "$default" ? "" : name); + string facet = (name == "$default" ? string("") : name); Db db(&dbEnv, 0); db.open(txn, dbName.c_str(), name.c_str(), DB_BTREE, DB_RDONLY, FREEZE_SCRIPT_DB_MODE); descriptor->dump(communicator, &db, txn, facet); diff --git a/cpp/src/FreezeScript/Makefile.mak b/cpp/src/FreezeScript/Makefile.mak new file mode 100644 index 00000000000..37f995965e1 --- /dev/null +++ b/cpp/src/FreezeScript/Makefile.mak @@ -0,0 +1,75 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = ..\.. + +TRANSFORMDB = $(top_srcdir)\bin\transformdb.exe +DUMPDB = $(top_srcdir)\bin\dumpdb.exe + +TARGETS = $(TRANSFORMDB) $(DUMPDB) + +COMMON_OBJS = Grammar.o \ + Scanner.o \ + AssignVisitor.o \ + Data.o \ + Error.o \ + Functions.o \ + Exception.o \ + Parser.o \ + Print.o \ + Util.o + +TRANSFORM_OBJS = TransformAnalyzer.o \ + TransformVisitor.o \ + Transformer.o \ + transformdb.o + +DUMP_OBJS = DumpDescriptors.o \ + DumpDB.o + +SRCS = $(COMMON_OBJS:.o=.cpp) $(TRANSFORM_OBJS:.o=.cpp) $(DUMP_OBJS:.o=.cpp) + +HDIR = $(includedir)\FreezeScript + +!include $(top_srcdir)/config/Make.rules.mak + +CPPFLAGS = -I.. $(CPPFLAGS) +LINKWITH = slice$(LIBSUFFIX).lib icexml$(LIBSUFFIX).lib freeze$(LIBSUFFIX).lib $(LIBS) $(DB_LIBS) + +$(TRANSFORMDB): $(TRANSFORM_OBJS) $(COMMON_OBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(TRANSFORM_OBJS) $(COMMON_OBJS), $@,, $(LINKWITH) + +$(DUMPDB): $(DUMP_OBJS) $(COMMON_OBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(DUMP_OBJS) $(COMMON_OBJS), $@,, $(LINKWITH) + +Scanner.cpp : Scanner.l + flex $(FLEXFLAGS) Scanner.l + del /q $@ + echo #include "IceUtil/Config.h" > Scanner.cpp + type lex.yy.c >> Scanner.cpp + del /q lex.yy.c + +Grammar.cpp Grammar.h: Grammar.y + del /q Grammar.h Grammar.cpp + bison -dvt --name-prefix "freeze_script_" Grammar.y + move Grammar.tab.c Grammar.cpp + move Grammar.tab.h Grammar.h + del /q Grammar.output + +clean:: + del /q Grammar.cpp Grammar.h + del /q Scanner.cpp + +install:: all + copy $(TRANSFORMDB) $(install_bindir) + copy $(DUMPDB) $(install_bindir) + +!include .depend diff --git a/cpp/src/FreezeScript/Parser.cpp b/cpp/src/FreezeScript/Parser.cpp index 6d8baccdf4e..7325f982995 100644 --- a/cpp/src/FreezeScript/Parser.cpp +++ b/cpp/src/FreezeScript/Parser.cpp @@ -137,7 +137,11 @@ FreezeScript::EvaluateException::ice_name() const void FreezeScript::EvaluateException::ice_print(ostream& out) const { +#ifdef __BCPLUSPLUS__ + Ice::Exception::ice_print(out); +#else Exception::ice_print(out); +#endif out << ":\nerror occurred while evaluating expression"; if(!_reason.empty()) { diff --git a/cpp/src/FreezeScript/Print.cpp b/cpp/src/FreezeScript/Print.cpp index 6c713046c79..c4ea1bd8007 100644 --- a/cpp/src/FreezeScript/Print.cpp +++ b/cpp/src/FreezeScript/Print.cpp @@ -97,7 +97,7 @@ void FreezeScript::PrintVisitor::visitProxy(const ProxyDataPtr& data) { string str = data->toString(); - _out << typeToString(data->getType()) << '(' << (str.empty() ? "nil" : str) << ')'; + _out << typeToString(data->getType()) << '(' << (str.empty() ? string("nil") : str) << ')'; } void diff --git a/cpp/src/FreezeScript/transformdb.cpp b/cpp/src/FreezeScript/transformdb.cpp index cf38e463bf5..a3f6468529f 100644 --- a/cpp/src/FreezeScript/transformdb.cpp +++ b/cpp/src/FreezeScript/transformdb.cpp @@ -152,7 +152,7 @@ transformDb(bool evictor, const Ice::CommunicatorPtr& communicator, // Execute the transformation descriptors. // istringstream istr(descriptors); - string facet = (name == "$default" ? "" : name); + string facet = (name == "$default" ? string("") : name); FreezeScript::transformDatabase(communicator, objectFactory, oldUnit, newUnit, &db, dbNew, txnNew, 0, dbName, facet, purgeObjects, cerr, suppress, istr); @@ -235,7 +235,7 @@ run(int argc, char** argv, const Ice::CommunicatorPtr& communicator) vector<string> args; try { - args = opts.parse(argc, argv); + args = opts.parse(argc, (const char**)argv); } catch(const IceUtil::Options::BadOpt& e) { diff --git a/cpp/src/Glacier2/FilterI.h b/cpp/src/Glacier2/FilterI.h index fa50d3fe63f..9d1857ab496 100755 --- a/cpp/src/Glacier2/FilterI.h +++ b/cpp/src/Glacier2/FilterI.h @@ -129,7 +129,6 @@ FilterT<T, P>::remove(const std::vector<T>& deletions, const Ice::Current&) while(r != toRemove.end()) { iterator i = mark; - bool found = false; while(i != _items.end() && r != toRemove.end()) { if(*r == *i) @@ -142,7 +141,6 @@ FilterT<T, P>::remove(const std::vector<T>& deletions, const Ice::Current&) ++i; ++r; mark = i; - found = true; } else { diff --git a/cpp/src/Glacier2/Glacier2Router.cpp b/cpp/src/Glacier2/Glacier2Router.cpp index 4868cc29376..cc0c5c6860d 100644 --- a/cpp/src/Glacier2/Glacier2Router.cpp +++ b/cpp/src/Glacier2/Glacier2Router.cpp @@ -11,6 +11,7 @@ #include <IceUtil/UUID.h> #include <IceUtil/Options.h> #include <Ice/Service.h> +#include <Glacier2/RouterI.h> #include <Glacier2/Session.h> #include <Glacier2/SessionRouterI.h> #include <Glacier2/CryptPermissionsVerifierI.h> @@ -78,7 +79,7 @@ Glacier2::RouterService::start(int argc, char* argv[]) vector<string> args; try { - args = opts.parse(argc, argv); + args = opts.parse(argc, (const char**)argv); } catch(const IceUtil::Options::BadOpt& e) { diff --git a/cpp/src/Glacier2/Makefile.mak b/cpp/src/Glacier2/Makefile.mak new file mode 100644 index 00000000000..c273e32cf52 --- /dev/null +++ b/cpp/src/Glacier2/Makefile.mak @@ -0,0 +1,133 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = ..\.. + +LIBNAME = $(top_srcdir)\lib\glacier2$(LIBSUFFIX).lib +DLLNAME = $(top_srcdir)\bin\glacier2$(SOVERSION)$(LIBSUFFIX).dll + +ROUTER = $(top_srcdir)\bin\glacier2router.exe + +!ifdef BUILD_UTILS + +TARGETS = $(ROUTER) + +!else + +TARGETS = $(LIBNAME) $(DLLNAME) + +!endif + +OBJS = PermissionsVerifier.o \ + Router.o \ + SSLInfo.o \ + Session.o + +ROBJS = Blobject.o \ + ClientBlobject.o \ + CryptPermissionsVerifierI.o \ + Glacier2Router.o \ + ProxyVerifier.o \ + RequestQueue.o \ + RouterI.o \ + RoutingTable.o \ + FilterI.o \ + FilterManager.o \ + ServerBlobject.o \ + SessionRouterI.o + +SRCS = $(OBJS:.o=.cpp) \ + $(ROBJS:.o=.cpp) + +HDIR = $(includedir)\Glacier2 +SDIR = $(slicedir)\Glacier2 + +!include $(top_srcdir)\config\Make.rules.mak + +!ifdef BUILD_UTILS + +CPPFLAGS = -I.. $(CPPFLAGS) +LINKWITH = $(LIBS) $(OPENSSL_LIBS) glacier2$(LIBSUFFIX).lib icessl$(LIBSUFFIX).lib + +!else + +CPPFLAGS = -I.. $(CPPFLAGS) -DGLACIER2_API_EXPORTS + +!endif + +SLICE2CPPFLAGS = --include-dir Glacier2 --dll-export GLACIER2_API $(SLICE2CPPFLAGS) + +$(LIBNAME): $(DLLNAME) + +$(DLLNAME): $(OBJS) + del /q $@ + $(LINK) $(LD_DLLFLAGS) $(OBJS), $(DLLNAME),, $(LIBS) + move $(DLLNAME:.dll=.lib) $(LIBNAME) + +$(ROUTER): $(ROBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(ROBJS), $@,, $(LINKWITH) + +$(HDIR)\PermissionsVerifierF.h: $(SDIR)\PermissionsVerifierF.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) $(SLICE2CPPFLAGS) $(SDIR)\PermissionsVerifierF.ice + del /q PermissionsVerifierF.cpp + move PermissionsVerifierF.h $(HDIR) + +PermissionsVerifier.cpp $(HDIR)\PermissionsVerifier.h: $(SDIR)\PermissionsVerifier.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) $(SLICE2CPPFLAGS) $(SDIR)\PermissionsVerifier.ice + move PermissionsVerifier.h $(HDIR) + +$(HDIR)\RouterF.h: $(SDIR)\RouterF.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) $(SLICE2CPPFLAGS) $(SDIR)\RouterF.ice + del /q RouterF.cpp + move RouterF.h $(HDIR) + +Router.cpp $(HDIR)\Router.h: $(SDIR)\Router.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) $(SLICE2CPPFLAGS) $(SDIR)\Router.ice + move Router.h $(HDIR) + +$(HDIR)\SessionF.h: $(SDIR)\SessionF.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) $(SLICE2CPPFLAGS) $(SDIR)\SessionF.ice + del /q SessionF.cpp + move SessionF.h $(HDIR) + +Session.cpp $(HDIR)\Session.h: $(SDIR)\Session.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) $(SLICE2CPPFLAGS) $(SDIR)\Session.ice + move Session.h $(HDIR) + +SSLInfo.cpp $(HDIR)\SSLInfo.h: $(SDIR)\SSLInfo.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) $(SLICE2CPPFLAGS) $(SDIR)\SSLInfo.ice + move SSLInfo.h $(HDIR) + +!ifdef BUILD_UTILS + +clean:: + del /q $(HDIR)\PermissionsVerifierF.h + del /q PermissionsVerifier.cpp $(HDIR)\PermissionsVerifier.h + del /q $(HDIR)\RouterF.h + del /q Router.cpp $(HDIR)\Router.h + del /q $(HDIR)\SessionF.h + del /q Session.cpp $(HDIR)\Session.h + del /q SSLInfo.cpp $(HDIR)\SSLInfo.h + +install:: all + copy $(LIBNAME) $(install_libdir) + copy $(DLLNAME) $(install_bindir) + copy $(ROUTER) $(install_bindir) + +!else + +install:: all + +$(EVERYTHING):: + $(MAKE) /f Makefile.mak BUILD_UTILS=1 $@ + +!endif + +!include .depend diff --git a/cpp/src/Glacier2/RouterI.cpp b/cpp/src/Glacier2/RouterI.cpp index dc86b39c1cc..6291efa01ea 100644 --- a/cpp/src/Glacier2/RouterI.cpp +++ b/cpp/src/Glacier2/RouterI.cpp @@ -9,6 +9,8 @@ #include <IceUtil/Random.h> +#include <Glacier2/FilterManager.h> +#include <Glacier2/RoutingTable.h> #include <Glacier2/RouterI.h> #include <Glacier2/Session.h> diff --git a/cpp/src/Ice/BasicStream.cpp b/cpp/src/Ice/BasicStream.cpp index e80ed0e8e50..b8c7f12b659 100644 --- a/cpp/src/Ice/BasicStream.cpp +++ b/cpp/src/Ice/BasicStream.cpp @@ -22,6 +22,9 @@ #include <Ice/TraceUtil.h> #include <Ice/TraceLevels.h> #include <Ice/LoggerUtil.h> +#ifdef __BCPLUSPLUS__ +# include <iterator> +#endif using namespace std; using namespace Ice; diff --git a/cpp/src/Ice/ConnectionFactory.cpp b/cpp/src/Ice/ConnectionFactory.cpp index 647d76a5d3c..55a01678fd9 100644 --- a/cpp/src/Ice/ConnectionFactory.cpp +++ b/cpp/src/Ice/ConnectionFactory.cpp @@ -24,6 +24,9 @@ #include <Ice/RouterInfo.h> #include <Ice/LocalException.h> #include <Ice/Functional.h> +#ifdef __BCPLUSPLUS__ +# include <iterator> +#endif using namespace std; using namespace Ice; diff --git a/cpp/src/Ice/DynamicLibrary.cpp b/cpp/src/Ice/DynamicLibrary.cpp index e2e6d793c13..d64037fb4ec 100644 --- a/cpp/src/Ice/DynamicLibrary.cpp +++ b/cpp/src/Ice/DynamicLibrary.cpp @@ -161,7 +161,12 @@ IceInternal::DynamicLibrary::getSymbol(const string& name) { assert(_hnd != 0); #ifdef _WIN32 +# ifdef __BCPLUSPLUS__ + string newName = "_" + name; + return GetProcAddress(_hnd, newName.c_str()); +# else return GetProcAddress(_hnd, name.c_str()); +# endif #else symbol_type result = dlsym(_hnd, name.c_str()); if(result == 0) diff --git a/cpp/src/Ice/EventHandler.h b/cpp/src/Ice/EventHandler.h index f7836b96b6a..67547044997 100644 --- a/cpp/src/Ice/EventHandler.h +++ b/cpp/src/Ice/EventHandler.h @@ -73,7 +73,7 @@ public: protected: EventHandler(const InstancePtr&); - virtual ~EventHandler(); + ICE_API virtual ~EventHandler(); const InstancePtr _instance; diff --git a/cpp/src/Ice/Instance.cpp b/cpp/src/Ice/Instance.cpp index a86ef6afc26..031d3a723bd 100644 --- a/cpp/src/Ice/Instance.cpp +++ b/cpp/src/Ice/Instance.cpp @@ -770,7 +770,7 @@ IceInternal::Instance::finishSetup(int& argc, char* argv[]) if(printProcessId) { -#ifdef _WIN32 +#ifdef _MSC_VER cout << _getpid() << endl; #else cout << getpid() << endl; diff --git a/cpp/src/Ice/Makefile.mak b/cpp/src/Ice/Makefile.mak new file mode 100644 index 00000000000..e559c44426b --- /dev/null +++ b/cpp/src/Ice/Makefile.mak @@ -0,0 +1,300 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = ..\.. + +LIBNAME = $(top_srcdir)\lib\ice$(LIBSUFFIX).lib +DLLNAME = $(top_srcdir)\bin\ice$(SOVERSION)$(LIBSUFFIX).dll + +TARGETS = $(LIBNAME) $(DLLNAME) + +OBJS = Acceptor.o \ + Application.o \ + Buffer.o \ + BasicStream.o \ + BuiltinSequences.o \ + CommunicatorI.o \ + Communicator.o \ + ConnectionFactory.o \ + ConnectionI.o \ + ConnectionMonitor.o \ + Connection.o \ + Connector.o \ + Current.o \ + DefaultsAndOverrides.o \ + Direct.o \ + DynamicLibrary.o \ + EndpointFactoryManager.o \ + EndpointFactory.o \ + Endpoint.o \ + EndpointI.o \ + EventHandler.o \ + EventLoggerI.o \ + Exception.o \ + FacetMap.o \ + FactoryTableDef.o \ + FactoryTable.o \ + GC.o \ + GCRecMutex.o \ + GCShared.o \ + Identity.o \ + IdentityUtil.o \ + IncomingAsync.o \ + Incoming.o \ + Initialize.o \ + Instance.o \ + LocalException.o \ + LocalObject.o \ + LocatorInfo.o \ + Locator.o \ + LoggerI.o \ + Logger.o \ + LoggerUtil.o \ + Network.o \ + ObjectAdapterFactory.o \ + ObjectAdapterI.o \ + ObjectAdapter.o \ + ObjectFactoryManager.o \ + ObjectFactory.o \ + Object.o \ + OutgoingAsync.o \ + Outgoing.o \ + PluginManagerI.o \ + Plugin.o \ + Process.o \ + PropertiesI.o \ + Properties.o \ + PropertyNames.o \ + Protocol.o \ + ProtocolPluginFacade.o \ + ProxyFactory.o \ + Proxy.o \ + ReferenceFactory.o \ + Reference.o \ + RouterInfo.o \ + Router.o \ + ServantLocator.o \ + ServantManager.o \ + Service.o \ + SliceChecksumDict.o \ + SliceChecksums.o \ + Stats.o \ + StreamI.o \ + Stream.o \ + StringConverter.o \ + TcpAcceptor.o \ + TcpConnector.o \ + TcpEndpointI.o \ + TcpTransceiver.o \ + ThreadPool.o \ + TraceLevels.o \ + TraceUtil.o \ + Transceiver.o \ + UdpEndpointI.o \ + UdpTransceiver.o \ + UnknownEndpointI.o + +SRCS = $(OBJS:.o=.cpp) + +HDIR = $(includedir)\Ice +SDIR = $(slicedir)\Ice + +!include $(top_srcdir)\config\Make.rules.mak + +CPPFLAGS = -I.. $(CPPFLAGS) -DICE_API_EXPORTS +SLICE2CPPFLAGS = --ice --include-dir Ice --dll-export ICE_API $(SLICE2CPPFLAGS) +LINKWITH = $(BASELIBS) $(BZIP2_LIBS) $(ICE_OS_LIBS) ws2_32.lib + +$(LIBNAME): $(DLLNAME) + +$(DLLNAME): $(OBJS) + del /q $@ + $(LINK) $(LD_DLLFLAGS) $(OBJS), $(DLLNAME),, $(LINKWITH) + move $(DLLNAME:.dll=.lib) $(LIBNAME) + +EventLoggerI.o: EventLoggerMsg.h + +EventLoggerMsg.h EventLoggerMsg.res: EventLoggerMsg.mc + mc EventLoggerMsg.mc + rc -r -fo EventLoggerMsg.res EventLoggerMsg.rc + +BuiltinSequences.cpp $(HDIR)\BuiltinSequences.h: $(SDIR)\BuiltinSequences.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) $(SLICE2CPPFLAGS) $(SDIR)\BuiltinSequences.ice + move BuiltinSequences.h $(HDIR) + +$(HDIR)\CommunicatorF.h: $(SDIR)\CommunicatorF.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) $(SLICE2CPPFLAGS) $(SDIR)\CommunicatorF.ice + move CommunicatorF.h $(HDIR) + del /q CommunicatorF.cpp + +Communicator.cpp $(HDIR)\Communicator.h: $(SDIR)\Communicator.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) $(SLICE2CPPFLAGS) $(SDIR)\Communicator.ice + move Communicator.h $(HDIR) + +$(HDIR)\ConnectionF.h: $(SDIR)\ConnectionF.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) $(SLICE2CPPFLAGS) $(SDIR)\ConnectionF.ice + move ConnectionF.h $(HDIR) + del /q ConnectionF.cpp + +Connection.cpp $(HDIR)\Connection.h: $(SDIR)\Connection.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) $(SLICE2CPPFLAGS) $(SDIR)\Connection.ice + move Connection.h $(HDIR) + +Current.cpp $(HDIR)\Current.h: $(SDIR)\Current.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) $(SLICE2CPPFLAGS) $(SDIR)\Current.ice + move Current.h $(HDIR) + +Endpoint.cpp $(HDIR)\Endpoint.h: $(SDIR)\Endpoint.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) $(SLICE2CPPFLAGS) $(SDIR)\Endpoint.ice + move Endpoint.h $(HDIR) + +FacetMap.cpp $(HDIR)\FacetMap.h: $(SDIR)\FacetMap.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) $(SLICE2CPPFLAGS) $(SDIR)\FacetMap.ice + move FacetMap.h $(HDIR) + +Identity.cpp $(HDIR)\Identity.h: $(SDIR)\Identity.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) $(SLICE2CPPFLAGS) $(SDIR)\Identity.ice + move Identity.h $(HDIR) + +LocalException.cpp $(HDIR)\LocalException.h: $(SDIR)\LocalException.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) $(SLICE2CPPFLAGS) $(SDIR)\LocalException.ice + move LocalException.h $(HDIR) + +$(HDIR)\LocatorF.h: $(SDIR)\LocatorF.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) $(SLICE2CPPFLAGS) $(SDIR)\LocatorF.ice + move LocatorF.h $(HDIR) + del /q LocatorF.cpp + +Locator.cpp $(HDIR)\Locator.h: $(SDIR)\Locator.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) $(SLICE2CPPFLAGS) $(SDIR)\Locator.ice + move Locator.h $(HDIR) + +$(HDIR)\LoggerF.h: $(SDIR)\LoggerF.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) $(SLICE2CPPFLAGS) $(SDIR)\LoggerF.ice + move LoggerF.h $(HDIR) + del /q LoggerF.cpp + +Logger.cpp $(HDIR)\Logger.h: $(SDIR)\Logger.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) $(SLICE2CPPFLAGS) $(SDIR)\Logger.ice + move Logger.h $(HDIR) + +$(HDIR)\ObjectAdapterF.h: $(SDIR)\ObjectAdapterF.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) $(SLICE2CPPFLAGS) $(SDIR)\ObjectAdapterF.ice + move ObjectAdapterF.h $(HDIR) + del /q ObjectAdapterF.cpp + +ObjectAdapter.cpp $(HDIR)\ObjectAdapter.h: $(SDIR)\ObjectAdapter.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) $(SLICE2CPPFLAGS) $(SDIR)\ObjectAdapter.ice + move ObjectAdapter.h $(HDIR) + +$(HDIR)\ObjectFactoryF.h: $(SDIR)\ObjectFactoryF.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) $(SLICE2CPPFLAGS) $(SDIR)\ObjectFactoryF.ice + move ObjectFactoryF.h $(HDIR) + del /q ObjectFactoryF.cpp + +ObjectFactory.cpp $(HDIR)\ObjectFactory.h: $(SDIR)\ObjectFactory.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) $(SLICE2CPPFLAGS) $(SDIR)\ObjectFactory.ice + move ObjectFactory.h $(HDIR) + +$(HDIR)\PluginF.h: $(SDIR)\PluginF.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) $(SLICE2CPPFLAGS) $(SDIR)\PluginF.ice + move PluginF.h $(HDIR) + del /q PluginF.cpp + +Plugin.cpp $(HDIR)\Plugin.h: $(SDIR)\Plugin.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) $(SLICE2CPPFLAGS) $(SDIR)\Plugin.ice + move Plugin.h $(HDIR) + +$(HDIR)\ProcessF.h: $(SDIR)\ProcessF.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) $(SLICE2CPPFLAGS) $(SDIR)\ProcessF.ice + move ProcessF.h $(HDIR) + del /q ProcessF.cpp + +Process.cpp $(HDIR)\Process.h: $(SDIR)\Process.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) $(SLICE2CPPFLAGS) $(SDIR)\Process.ice + move Process.h $(HDIR) + +$(HDIR)\PropertiesF.h: $(SDIR)\PropertiesF.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) $(SLICE2CPPFLAGS) $(SDIR)\PropertiesF.ice + move PropertiesF.h $(HDIR) + del /q PropertiesF.cpp + +Properties.cpp $(HDIR)\Properties.h: $(SDIR)\Properties.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) $(SLICE2CPPFLAGS) $(SDIR)\Properties.ice + move Properties.h $(HDIR) + +$(HDIR)\RouterF.h: $(SDIR)\RouterF.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) $(SLICE2CPPFLAGS) $(SDIR)\RouterF.ice + move RouterF.h $(HDIR) + del /q RouterF.cpp + +Router.cpp $(HDIR)\Router.h: $(SDIR)\Router.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) $(SLICE2CPPFLAGS) $(SDIR)\Router.ice + move Router.h $(HDIR) + +$(HDIR)\ServantLocatorF.h: $(SDIR)\ServantLocatorF.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) $(SLICE2CPPFLAGS) $(SDIR)\ServantLocatorF.ice + move ServantLocatorF.h $(HDIR) + del /q ServantLocatorF.cpp + +ServantLocator.cpp $(HDIR)\ServantLocator.h: $(SDIR)\ServantLocator.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) $(SLICE2CPPFLAGS) $(SDIR)\ServantLocator.ice + move ServantLocator.h $(HDIR) + +SliceChecksumDict.cpp $(HDIR)\SliceChecksumDict.h: $(SDIR)\SliceChecksumDict.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) $(SLICE2CPPFLAGS) $(SDIR)\SliceChecksumDict.ice + move SliceChecksumDict.h $(HDIR) + +$(HDIR)\StatsF.h: $(SDIR)\StatsF.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) $(SLICE2CPPFLAGS) $(SDIR)\StatsF.ice + move StatsF.h $(HDIR) + del /q StatsF.cpp + +Stats.cpp $(HDIR)\Stats.h: $(SDIR)\Stats.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) $(SLICE2CPPFLAGS) $(SDIR)\Stats.ice + move Stats.h $(HDIR) + +clean:: + del /q BuiltinSequences.cpp $(HDIR)\BuiltinSequences.h + del /q $(HDIR)\CommunicatorF.h + del /q Communicator.cpp $(HDIR)\Communicator.h + del /q $(HDIR)\ConnectionF.h + del /q Connection.cpp $(HDIR)\Connection.h + del /q Current.cpp $(HDIR)\Current.h + del /q Endpoint.cpp $(HDIR)\Endpoint.h + del /q FacetMap.cpp $(HDIR)\FacetMap.h + del /q Identity.cpp $(HDIR)\Identity.h + del /q LocalException.cpp $(HDIR)\LocalException.h + del /q $(HDIR)\LocatorF.h + del /q Locator.cpp $(HDIR)\Locator.h + del /q $(HDIR)\LoggerF.h + del /q Logger.cpp $(HDIR)\Logger.h + del /q $(HDIR)\ObjectAdapterF.h + del /q ObjectAdapter.cpp $(HDIR)\ObjectAdapter.h + del /q $(HDIR)\ObjectFactoryF.h + del /q ObjectFactory.cpp $(HDIR)\ObjectFactory.h + del /q $(HDIR)\PluginF.h + del /q Plugin.cpp $(HDIR)\Plugin.h + del /q $(HDIR)\ProcessF.h + del /q Process.cpp $(HDIR)\Process.h + del /q $(HDIR)\PropertiesF.h + del /q Properties.cpp $(HDIR)\Properties.h + del /q $(HDIR)\RouterF.h + del /q Router.cpp $(HDIR)\Router.h + del /q $(HDIR)\ServantLocatorF.h + del /q ServantLocator.cpp $(HDIR)\ServantLocator.h + del /q SliceChecksumDict.cpp $(HDIR)\SliceChecksumDict.h + del /q $(HDIR)\StatsF.h + del /q Stats.cpp $(HDIR)\Stats.h + +install:: all + copy $(LIBNAME) $(install_libdir) + copy $(DLLNAME) $(install_bindir) + +!include .depend diff --git a/cpp/src/Ice/ObjectAdapterI.cpp b/cpp/src/Ice/ObjectAdapterI.cpp index fbe051e2a50..a1461abd88f 100644 --- a/cpp/src/Ice/ObjectAdapterI.cpp +++ b/cpp/src/Ice/ObjectAdapterI.cpp @@ -36,6 +36,10 @@ # include <sys/time.h> #endif +#ifdef __BCPLUSPLUS__ +# include <iterator> +#endif + using namespace std; using namespace Ice; using namespace IceInternal; diff --git a/cpp/src/Ice/Protocol.cpp b/cpp/src/Ice/Protocol.cpp index e405673ec4f..53a6e2bc96d 100644 --- a/cpp/src/Ice/Protocol.cpp +++ b/cpp/src/Ice/Protocol.cpp @@ -14,7 +14,11 @@ namespace IceInternal const Ice::Byte magic[] = { 0x49, 0x63, 0x65, 0x50 }; // 'I', 'c', 'e', 'P' +#ifdef __BCPLUSPLUS__ +const Ice::Byte requestHdr[headerSize + sizeof(Ice::Int)] = +#else const Ice::Byte requestHdr[] = +#endif { magic[0], magic[1], @@ -30,7 +34,11 @@ const Ice::Byte requestHdr[] = 0, 0, 0, 0 // Request id (placeholder) }; +#ifdef __BCPLUSPLUS__ +const Ice::Byte requestBatchHdr[headerSize + sizeof(Ice::Int)] = +#else const Ice::Byte requestBatchHdr[] = +#endif { magic[0], magic[1], diff --git a/cpp/src/Ice/Reference.cpp b/cpp/src/Ice/Reference.cpp index 169a5c71a0c..dffa814cee1 100644 --- a/cpp/src/Ice/Reference.cpp +++ b/cpp/src/Ice/Reference.cpp @@ -1590,17 +1590,26 @@ IceInternal::IndirectReference::getConnection(bool& comp) const if(!getRouterInfo()) { assert(_locatorInfo); - const IndirectReferencePtr self = const_cast<IndirectReference*>(this); - _locatorInfo->clearCache(self); + + // COMPILERFIX: Braces needed to prevent BCB from causing Reference refCount from + // being decremented twice when loop continues. + { + const IndirectReferencePtr self = const_cast<IndirectReference*>(this); + _locatorInfo->clearCache(self); + } if(cached) { - TraceLevelsPtr traceLevels = getInstance()->traceLevels(); - if(traceLevels->retry >= 2) + // COMPILERFIX: Braces needed to prevent BCB from causing TraceLevels refCount from + // being decremented twice when loop continues. { - Trace out(getInstance()->initializationData().logger, traceLevels->retryCat); - out << "connection to cached endpoints failed\n" - << "removing endpoints from cache and trying one more time\n" << ex; + TraceLevelsPtr traceLevels = getInstance()->traceLevels(); + if(traceLevels->retry >= 2) + { + Trace out(getInstance()->initializationData().logger, traceLevels->retryCat); + out << "connection to cached endpoints failed\n" + << "removing endpoints from cache and trying one more time\n" << ex; + } } continue; } diff --git a/cpp/src/Ice/ReferenceFactory.cpp b/cpp/src/Ice/ReferenceFactory.cpp index 334fa9984d3..6b720ec6321 100644 --- a/cpp/src/Ice/ReferenceFactory.cpp +++ b/cpp/src/Ice/ReferenceFactory.cpp @@ -31,7 +31,7 @@ void IceInternal::decRef(::IceInternal::ReferenceFactory* p) { p->__decRef(); } ReferencePtr IceInternal::ReferenceFactory::copy(const Reference* r) const { - Mutex::Lock sync(*this); + IceUtil::Mutex::Lock sync(*this); if(!_instance) { @@ -57,7 +57,7 @@ IceInternal::ReferenceFactory::create(const Identity& ident, const RouterInfoPtr& routerInfo, bool collocationOptimization) { - Mutex::Lock sync(*this); + IceUtil::Mutex::Lock sync(*this); if(!_instance) { @@ -88,7 +88,7 @@ IceInternal::ReferenceFactory::create(const Identity& ident, bool collocationOptimization, int locatorCacheTimeout) { - Mutex::Lock sync(*this); + IceUtil::Mutex::Lock sync(*this); if(!_instance) { @@ -114,7 +114,7 @@ IceInternal::ReferenceFactory::create(const Identity& ident, Reference::Mode mode, const vector<Ice::ConnectionIPtr>& fixedConnections) { - Mutex::Lock sync(*this); + IceUtil::Mutex::Lock sync(*this); if(!_instance) { @@ -643,7 +643,7 @@ IceInternal::ReferenceFactory::ReferenceFactory(const InstancePtr& instance, con void IceInternal::ReferenceFactory::destroy() { - Mutex::Lock sync(*this); + IceUtil::Mutex::Lock sync(*this); if(!_instance) { diff --git a/cpp/src/Ice/ServantManager.cpp b/cpp/src/Ice/ServantManager.cpp index 21a49cab273..c1d3b7aa736 100644 --- a/cpp/src/Ice/ServantManager.cpp +++ b/cpp/src/Ice/ServantManager.cpp @@ -19,6 +19,9 @@ using namespace Ice; using namespace IceInternal; void IceInternal::incRef(ServantManager* p) { p->__incRef(); } +#ifdef __BCPLUSPLUS__ +ICE_API +#endif void IceInternal::decRef(ServantManager* p) { p->__decRef(); } void diff --git a/cpp/src/Ice/ThreadPool.cpp b/cpp/src/Ice/ThreadPool.cpp index 03a762bf3f1..abef235ca7d 100644 --- a/cpp/src/Ice/ThreadPool.cpp +++ b/cpp/src/Ice/ThreadPool.cpp @@ -24,6 +24,9 @@ using namespace Ice; using namespace IceInternal; void IceInternal::incRef(ThreadPool* p) { p->__incRef(); } +#ifdef __BCPLUSPLUS__ +ICE_API +#endif void IceInternal::decRef(ThreadPool* p) { p->__decRef(); } IceInternal::ThreadPool::ThreadPool(const InstancePtr& instance, const string& prefix, int timeout) : diff --git a/cpp/src/Ice/TraceLevels.cpp b/cpp/src/Ice/TraceLevels.cpp index 6c8653fdafb..4b6abe1617f 100644 --- a/cpp/src/Ice/TraceLevels.cpp +++ b/cpp/src/Ice/TraceLevels.cpp @@ -15,6 +15,9 @@ using namespace Ice; using namespace IceInternal; void IceInternal::incRef(TraceLevels* p) { p->__incRef(); } +#ifdef __BCPLUSPLUS__ +ICE_API +#endif void IceInternal::decRef(TraceLevels* p) { p->__decRef(); } IceInternal::TraceLevels::TraceLevels(const PropertiesPtr& properties) : diff --git a/cpp/src/IceBox/Admin.cpp b/cpp/src/IceBox/Admin.cpp index 9bf94b87920..bc5c89c9af6 100644 --- a/cpp/src/IceBox/Admin.cpp +++ b/cpp/src/IceBox/Admin.cpp @@ -56,7 +56,7 @@ Client::run(int argc, char* argv[]) vector<string> commands; try { - commands = opts.parse(argc, argv); + commands = opts.parse(argc, (const char**)argv); } catch(const IceUtil::Options::BadOpt& e) { diff --git a/cpp/src/IceBox/Exception.cpp b/cpp/src/IceBox/Exception.cpp index 60070c1cb31..1452f81f66d 100644 --- a/cpp/src/IceBox/Exception.cpp +++ b/cpp/src/IceBox/Exception.cpp @@ -14,7 +14,11 @@ using namespace std; void IceBox::FailureException::ice_print(ostream& out) const { +#ifdef __BCPLUSPLUS__ + Ice::Exception::ice_print(out); +#else Exception::ice_print(out); +#endif out << ":\nservice failure exception: " << reason; } diff --git a/cpp/src/IceBox/Makefile.mak b/cpp/src/IceBox/Makefile.mak new file mode 100644 index 00000000000..27db2de4bd4 --- /dev/null +++ b/cpp/src/IceBox/Makefile.mak @@ -0,0 +1,96 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = ..\.. + +LIBNAME = $(top_srcdir)\lib\icebox$(LIBSUFFIX).lib +DLLNAME = $(top_srcdir)\bin\icebox$(SOVERSION)$(LIBSUFFIX).dll + +SERVER = $(top_srcdir)\bin\icebox$(LIBSUFFIX).exe +ADMIN = $(top_srcdir)\bin\iceboxadmin.exe + +!ifdef BUILD_UTILS + +TARGETS = $(SERVER) $(ADMIN) + +!else + +TARGETS = $(LIBNAME) $(DLLNAME) + +!endif + +OBJS = IceBox.o \ + Exception.o + +SOBJS = ServiceManagerI.o \ + Service.o + +AOBJS = Admin.o + +SRCS = $(OBJS:.o=.cpp) \ + $(SOBJS:.o=.cpp) \ + $(AOBJS:.o=.cpp) + +HDIR = $(includedir)\IceBox +SDIR = $(slicedir)\IceBox + +!include $(top_srcdir)\config\Make.rules.mak + +!ifdef BUILD_UTILS + +CPPFLAGS = -I.. $(CPPFLAGS) + +!else + +CPPFLAGS = -I.. $(CPPFLAGS) -DICE_BOX_API_EXPORTS + +!endif + +SLICE2CPPFLAGS = --checksum --ice --dll-export ICE_BOX_API --include-dir IceBox $(SLICE2CPPFLAGS) + +$(LIBNAME): $(DLLNAME) + +$(DLLNAME): $(OBJS) + del /q $@ + $(LINK) $(LD_DLLFLAGS) $(OBJS), $(DLLNAME),, $(LIBS) + move $(DLLNAME:.dll=.lib) $(LIBNAME) + +$(SERVER): $(SOBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(SOBJS), $@,, $(LIBS) icebox$(LIBSUFFIX).lib + +$(ADMIN): $(AOBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(AOBJS), $@,, $(LIBS) icebox$(LIBSUFFIX).lib + +IceBox.cpp $(HDIR)\IceBox.h: $(SDIR)\IceBox.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) $(SLICE2CPPFLAGS) $(SDIR)\IceBox.ice + move IceBox.h $(HDIR) + +!ifdef BUILD_UTILS + +clean:: + del /q IceBox.cpp $(HDIR)\IceBox.h + +install:: all + copy $(LIBNAME) $(install_libdir) + copy $(DLLNAME) $(install_bindir) + copy $(SERVER) $(install_bindir) + copy $(ADMIN) $(install_bindir) + +!else + +install:: all + +$(EVERYTHING):: + $(MAKE) /f Makefile.mak BUILD_UTILS=1 $@ + +!endif + +!include .depend diff --git a/cpp/src/IceBox/Service.cpp b/cpp/src/IceBox/Service.cpp index 96e401290de..52aa9dd2bc4 100644 --- a/cpp/src/IceBox/Service.cpp +++ b/cpp/src/IceBox/Service.cpp @@ -52,7 +52,7 @@ IceBox::IceBoxService::start(int argc, char* argv[]) vector<string> args; try { - args = opts.parse(argc, argv); + args = opts.parse(argc, (const char**)argv); } catch(const IceUtil::Options::BadOpt& e) { diff --git a/cpp/src/IceGrid/Client.cpp b/cpp/src/IceGrid/Client.cpp index b0e6eb505fa..e79fa2d9903 100644 --- a/cpp/src/IceGrid/Client.cpp +++ b/cpp/src/IceGrid/Client.cpp @@ -72,7 +72,7 @@ Client::run(int argc, char* argv[]) vector<string> args; try { - args = opts.parse(argc, argv); + args = opts.parse(argc, (const char**)argv); } catch(const IceUtil::Options::BadOpt& e) { diff --git a/cpp/src/IceGrid/DescriptorHelper.cpp b/cpp/src/IceGrid/DescriptorHelper.cpp index 0a23a5760f3..e54553fc476 100644 --- a/cpp/src/IceGrid/DescriptorHelper.cpp +++ b/cpp/src/IceGrid/DescriptorHelper.cpp @@ -2446,8 +2446,8 @@ ApplicationHelper::update(const ApplicationUpdateDescriptor& updt) const { resolve.exception("can't remove servers for node `" + p->name + "': node doesn't exist"); } - desc.loadFactor = p->loadFactor ? p->loadFactor->value : ""; - desc.description = p->description ? p->description->value : ""; + desc.loadFactor = p->loadFactor ? p->loadFactor->value : string(""); + desc.description = p->description ? p->description->value : string(""); def.nodes.insert(make_pair(p->name, desc)); } } diff --git a/cpp/src/IceGrid/DescriptorParser.cpp b/cpp/src/IceGrid/DescriptorParser.cpp index 8d1b715cad6..003e280d25f 100644 --- a/cpp/src/IceGrid/DescriptorParser.cpp +++ b/cpp/src/IceGrid/DescriptorParser.cpp @@ -780,10 +780,10 @@ DescriptorHandler::elementValue() bool DescriptorHandler::isTargetDeployable(const string& target) const { - string application = _currentApplication.get() ? _currentApplication->getDescriptor().name : ""; - string node = _currentNode.get() ? _currentNode->getName() : ""; - string server = _currentServer.get() ? _currentServer->getDescriptor()->id : ""; - string service = _currentService.get() ? _currentService->getDescriptor()->name : ""; + string application = _currentApplication.get() ? _currentApplication->getDescriptor().name : string(""); + string node = _currentNode.get() ? _currentNode->getName() : string(""); + string server = _currentServer.get() ? _currentServer->getDescriptor()->id : string(""); + string service = _currentService.get() ? _currentService->getDescriptor()->name : string(""); // // Compute the current fully qualified name of the communicator. diff --git a/cpp/src/IceGrid/IceGridNode.cpp b/cpp/src/IceGrid/IceGridNode.cpp index 219b70a4457..b0a7f1bdb54 100644 --- a/cpp/src/IceGrid/IceGridNode.cpp +++ b/cpp/src/IceGrid/IceGridNode.cpp @@ -19,6 +19,12 @@ #include <IceGrid/NodeI.h> #include <IceGrid/NodeSessionManager.h> #include <IceGrid/TraceLevels.h> +#ifdef __BCPLUSPLUS__ +# include <IceGrid/ServerI.h> +# include <IceGrid/AdminSessionI.h> +# include <IceGrid/ReapThread.h> +# include <IceGrid/Database.h> +#endif #include <IceGrid/DescriptorParser.h> #include <IcePatch2/Util.h> @@ -26,8 +32,10 @@ # include <direct.h> # include <sys/types.h> # include <sys/stat.h> -# define S_ISDIR(mode) ((mode) & _S_IFDIR) -# define S_ISREG(mode) ((mode) & _S_IFREG) +# ifdef _MSC_VER +# define S_ISDIR(mode) ((mode) & _S_IFDIR) +# define S_ISREG(mode) ((mode) & _S_IFREG) +# endif #else # include <sys/stat.h> #endif diff --git a/cpp/src/IceGrid/IceGridRegistry.cpp b/cpp/src/IceGrid/IceGridRegistry.cpp index dc718fa94b4..961eef75e08 100644 --- a/cpp/src/IceGrid/IceGridRegistry.cpp +++ b/cpp/src/IceGrid/IceGridRegistry.cpp @@ -11,6 +11,13 @@ #include <Ice/Ice.h> #include <Ice/Service.h> #include <IceGrid/RegistryI.h> +#ifdef __BCPLUSPLUS__ +# include <IceGrid/AdminSessionI.h> +# include <IceGrid/WaitQueue.h> +# include <IceGrid/ReapThread.h> +# include <IceGrid/TraceLevels.h> +# include <IceGrid/Database.h> +#endif using namespace std; using namespace Ice; @@ -57,7 +64,7 @@ RegistryService::start(int argc, char* argv[]) vector<string> args; try { - args = opts.parse(argc, argv); + args = opts.parse(argc, (const char**)argv); } catch(const IceUtil::Options::BadOpt& e) { diff --git a/cpp/src/IceGrid/LocatorRegistryI.cpp b/cpp/src/IceGrid/LocatorRegistryI.cpp index 2bb8efa0183..5b187460681 100644 --- a/cpp/src/IceGrid/LocatorRegistryI.cpp +++ b/cpp/src/IceGrid/LocatorRegistryI.cpp @@ -166,7 +166,7 @@ LocatorRegistryI::setAdapterDirectProxy_async(const Ice::AMD_LocatorRegistry_set { Ice::Trace out(traceLevels->logger, traceLevels->locatorCat); out << "registered adapter `" << adapterId << "' endpoints: `" - << (proxy ? proxy->ice_toString() : "") << "'"; + << (proxy ? proxy->ice_toString() : string("")) << "'"; } return; } @@ -220,7 +220,7 @@ LocatorRegistryI::setReplicatedAdapterDirectProxy_async( { Ice::Trace out(traceLevels->logger, traceLevels->locatorCat); out << "registered replicated adapter `" << adapterId << "' endpoints: `" - << (proxy ? proxy->ice_toString() : "") << "'"; + << (proxy ? proxy->ice_toString() : string("")) << "'"; } return; } @@ -270,7 +270,8 @@ LocatorRegistryI::setServerProcessProxy_async(const Ice::AMD_LocatorRegistry_set if(traceLevels->locator > 1) { Ice::Trace out(traceLevels->logger, traceLevels->locatorCat); - out << "registered server `" << id << "' process proxy: `" << (proxy ? proxy->ice_toString() : "") << "'"; + out << "registered server `" << id << "' process proxy: `" << (proxy ? proxy->ice_toString() : string("")) + << "'"; } return; } diff --git a/cpp/src/IceGrid/Makefile b/cpp/src/IceGrid/Makefile index 669ede90dc7..ab46dede30b 100644 --- a/cpp/src/IceGrid/Makefile +++ b/cpp/src/IceGrid/Makefile @@ -105,6 +105,7 @@ SLICE_SRCS = $(SDIR)/Admin.ice \ $(SDIR)/Exception.ice \ $(SDIR)/FileParser.ice \ $(SDIR)/Query.ice \ + $(SDIR)/Registry.ice \ $(SDIR)/Session.ice \ $(SDIR)/Observer.ice \ $(SDIR)/Descriptor.ice \ diff --git a/cpp/src/IceGrid/Makefile.mak b/cpp/src/IceGrid/Makefile.mak new file mode 100644 index 00000000000..6a84a90818d --- /dev/null +++ b/cpp/src/IceGrid/Makefile.mak @@ -0,0 +1,260 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = ..\.. + +LIBNAME = $(top_srcdir)\lib\icegrid$(LIBSUFFIX).lib +DLLNAME = $(top_srcdir)\bin\icegrid$(SOVERSION)$(LIBSUFFIX).dll + +ADMIN = $(top_srcdir)\bin\icegridadmin.exe +NODE_SERVER = $(top_srcdir)\bin\icegridnode.exe +REGISTRY_SERVER = $(top_srcdir)\bin\icegridregistry.exe + +!ifdef BUILD_UTILS + +TARGETS = $(ADMIN) $(NODE_SERVER) $(REGISTRY_SERVER) + +!else + +TARGETS = $(LIBNAME) $(DLLNAME) + +!endif + +LIB_OBJS = Admin.o \ + Query.o \ + Exception.o \ + Descriptor.o \ + Observer.o \ + Session.o \ + Registry.o \ + UserAccountMapper.o + +ADMIN_OBJS = Grammar.o \ + Scanner.o \ + Parser.o \ + DescriptorParser.o \ + DescriptorBuilder.o \ + DescriptorHelper.o \ + FileParser.o \ + FileParserI.o \ + Util.o \ + Internal.o \ + Client.o + +COMMON_OBJS = Internal.o \ + DescriptorParser.o \ + DescriptorBuilder.o \ + TraceLevels.o + +NODE_OBJS = NodeI.o \ + ServerI.o \ + ServerAdapterI.o \ + Activator.o \ + PlatformInfo.o \ + NodeSessionManager.o + +REGISTRY_OBJS = RegistryI.o \ + InternalRegistryI.o \ + StringApplicationInfoDict.o \ + IdentityObjectInfoDict.o \ + StringAdapterInfoDict.o \ + Database.o \ + Allocatable.o \ + AdapterCache.o \ + ObjectCache.o \ + AllocatableObjectCache.o \ + ServerCache.o \ + NodeCache.o \ + ReplicaCache.o \ + LocatorI.o \ + LocatorRegistryI.o \ + AdminI.o \ + Util.o \ + DescriptorHelper.o \ + NodeSessionI.o \ + ReplicaSessionI.o \ + ReapThread.o \ + SessionI.o \ + AdminSessionI.o \ + SessionServantLocatorI.o \ + Topics.o \ + QueryI.o \ + WaitQueue.o \ + FileUserAccountMapperI.o \ + ReplicaSessionManager.o + +NODE_SVR_OBJS = $(COMMON_OBJS) \ + $(NODE_OBJS) \ + $(REGISTRY_OBJS) \ + IceGridNode.o + +REGISTRY_SVR_OBJS = \ + $(COMMON_OBJS) \ + $(REGISTRY_OBJS) \ + IceGridRegistry.o + +SRCS = $(LIB_OBJS:.o=.cpp) \ + $(ADMIN_OBJS:.o=.cpp) \ + $(COMMON_OBJS:.o=.cpp) \ + $(NODE_OBJS:.o=.cpp) \ + $(REGISTRY_OBJS:.o=.cpp) \ + IceGridNode.cpp \ + IceGridRegistry.cpp + +HDIR = $(includedir)\IceGrid +SDIR = $(slicedir)\IceGrid + +SLICE2FREEZECMD = $(SLICE2FREEZE) --ice --include-dir IceGrid $(ICECPPFLAGS) + +!include $(top_srcdir)\config\Make.rules.mak + +SLICE2CPPFLAGS = --checksum --ice --include-dir IceGrid --dll-export ICE_GRID_API $(SLICE2CPPFLAGS) +LINKWITH = $(LIBS) glacier2$(LIBSUFFIX).lib +ALINKWITH = $(LINKWITH) icegrid$(LIBSUFFIX).lib icexml$(LIBSUFFIX).lib icepatch2$(LIBSUFFIX).lib +NLINKWITH = $(ALINKWITH) icestorm$(LIBSUFFIX).lib freeze$(LIBSUFFIX).lib icebox$(LIBSUFFIX).lib \ + icessl$(LIBSUFFIX).lib icestormservice$(LIBSUFFIX).lib $(OPENSSL_LIBS) + +!ifdef BUILD_UTILS + +CPPFLAGS = -I. -I.. $(CPPFLAGS) + +!else + +CPPFLAGS = -I.. -DICE_GRID_API_EXPORTS $(CPPFLAGS) + +!endif + +$(LIBNAME): $(DLLNAME) + +$(DLLNAME): $(LIB_OBJS) + del /q $@ + $(LINK) $(LD_DLLFLAGS) $(LIB_OBJS), $(DLLNAME),, $(LINKWITH) + move $(DLLNAME:.dll=.lib) $(LIBNAME) + +$(ADMIN): $(ADMIN_OBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(ADMIN_OBJS), $@,, $(ALINKWITH) + +$(REGISTRY_SERVER): $(REGISTRY_SVR_OBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(REGISTRY_SVR_OBJS), $@,, $(NLINKWITH) + +$(NODE_SERVER): $(NODE_SVR_OBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(NODE_SVR_OBJS), $@,, $(NLINKWITH) + +StringApplicationInfoDict.h StringApplicationInfoDict.cpp: $(SLICE2FREEZE) + del /q StringApplicationInfoDict.h StringApplicationInfoDict.cpp + $(SLICE2FREEZECMD) --dict IceGrid::StringApplicationInfoDict,string,IceGrid::ApplicationInfo \ + StringApplicationInfoDict Internal.ice + +IdentityObjectInfoDict.h IdentityObjectInfoDict.cpp: $(SLICE2FREEZE) + del /q IdentityObjectInfoDict.h IdentityObjectInfoDict.cpp + $(SLICE2FREEZECMD) --dict IceGrid::IdentityObjectInfoDict,Ice::Identity,IceGrid::ObjectInfo \ + --dict-index IceGrid::IdentityObjectInfoDict,type \ + IdentityObjectInfoDict ..\..\slice\Ice\Identity.ice Internal.ice + +StringAdapterInfoDict.h StringAdapterInfoDict.cpp: $(SLICE2FREEZE) + del /q StringAdapterInfoDict.h StringAdapterInfoDict.cpp + $(SLICE2FREEZECMD) --dict IceGrid::StringAdapterInfoDict,string,IceGrid::AdapterInfo \ + --dict-index IceGrid::StringAdapterInfoDict,replicaGroupId StringAdapterInfoDict $(SDIR)\Admin.ice + +Admin.cpp $(HDIR)\Admin.h: $(SDIR)\Admin.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) $(SLICE2CPPFLAGS) $(SDIR)\Admin.ice + move Admin.h $(HDIR) + +Exception.cpp $(HDIR)\Exception.h: $(SDIR)\Exception.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) $(SLICE2CPPFLAGS) $(SDIR)\Exception.ice + move Exception.h $(HDIR) + +FileParser.cpp $(HDIR)\FileParser.h: $(SDIR)\FileParser.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) $(SLICE2CPPFLAGS) $(SDIR)\FileParser.ice + move FileParser.h $(HDIR) + +Query.cpp $(HDIR)\Query.h: $(SDIR)\Query.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) $(SLICE2CPPFLAGS) $(SDIR)\Query.ice + move Query.h $(HDIR) + +Session.cpp $(HDIR)\Session.h: $(SDIR)\Session.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) $(SLICE2CPPFLAGS) $(SDIR)\Session.ice + move Session.h $(HDIR) + +Observer.cpp $(HDIR)\Observer.h: $(SDIR)\Observer.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) $(SLICE2CPPFLAGS) $(SDIR)\Observer.ice + move Observer.h $(HDIR) + +Descriptor.cpp $(HDIR)\Descriptor.h: $(SDIR)\Descriptor.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) $(SLICE2CPPFLAGS) $(SDIR)\Descriptor.ice + move Descriptor.h $(HDIR) + +UserAccountMapper.cpp $(HDIR)\UserAccountMapper.h: $(SDIR)\UserAccountMapper.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) $(SLICE2CPPFLAGS) $(SDIR)\UserAccountMapper.ice + move UserAccountMapper.h $(HDIR) + +Registry.cpp $(HDIR)\Registry.h: $(SDIR)\Registry.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) $(SLICE2CPPFLAGS) $(SDIR)\Registry.ice + move Registry.h $(HDIR) + +Internal.cpp Internal.h: Internal.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) $(SLICE2CPPFLAGS) Internal.ice + +Scanner.cpp : Scanner.l + flex $(FLEXFLAGS) Scanner.l + del /q $@ + echo #include "IceUtil/Config.h" > Scanner.cpp + type lex.yy.c >> Scanner.cpp + del /q lex.yy.c + +Grammar.cpp Grammar.h: Grammar.y + del /q Grammar.h Grammar.cpp + bison -dvt Grammar.y + move Grammar.tab.c Grammar.cpp + move Grammar.tab.h Grammar.h + del /q Grammar.output + +!ifdef BUILD_UTILS + +clean:: + del /q StringApplicationInfoDict.h StringApplicationInfoDict.cpp + del /q StringAdapterInfoDict.h StringAdapterInfoDict.cpp + del /q IdentityObjectInfoDict.h IdentityObjectInfoDict.cpp + +clean:: + del /q Admin.cpp $(HDIR)\Admin.h + del /q Exception.cpp $(HDIR)\Exception.h + del /q FileParser.cpp $(HDIR)\FileParser.h + del /q Query.cpp $(HDIR)\Query.h + del /q Session.cpp $(HDIR)\Session.h + del /q Observer.cpp $(HDIR)\Observer.h + del /q Descriptor.cpp $(HDIR)\Descriptor.h + del /q UserAccountMapper.cpp $(HDIR)\UserAccountMapper.h + del /q Registry.cpp $(HDIR)\Registry.h + del /q Internal.cpp Internal.h + +clean:: + del /q Grammar.cpp Grammar.h + del /q Scanner.cpp + +install:: all + copy $(LIBNAME) $(install_libdir) + copy $(DLLNAME) $(install_bindir) + copy $(ADMIN) $(install_bindir) + copy $(NODE_SERVER) $(install_bindir) + copy $(REGISTRY_SERVER) $(install_bindir) + +!else + +install:: all + +$(EVERYTHING):: + $(MAKE) /f Makefile.mak BUILD_UTILS=1 $@ + +!endif + +!include .depend diff --git a/cpp/src/IceGrid/NodeCache.cpp b/cpp/src/IceGrid/NodeCache.cpp index 9b8ede8039c..1da1ed0aa8f 100644 --- a/cpp/src/IceGrid/NodeCache.cpp +++ b/cpp/src/IceGrid/NodeCache.cpp @@ -445,7 +445,8 @@ NodeEntry::loadServer(const ServerEntryPtr& entry, const ServerInfo& server, con } AMI_Node_loadServerPtr amiCB = new LoadCB(_cache.getTraceLevels(), entry, entry->getId(), _name); - node->loadServer_async(amiCB, server.application, desc, session ? session->getId() : ""); + string sessionId = session ? session->getId() : string(""); + node->loadServer_async(amiCB, server.application, desc, sessionId); } catch(const NodeUnreachableException& ex) { diff --git a/cpp/src/IceGrid/NodeI.cpp b/cpp/src/IceGrid/NodeI.cpp index 9c002fefafc..ce218173db3 100644 --- a/cpp/src/IceGrid/NodeI.cpp +++ b/cpp/src/IceGrid/NodeI.cpp @@ -144,7 +144,8 @@ public: { roundedSize = 1; } - out << _dest << ": downloading " << (_path.empty() ? "" : (_path + " ")) << roundedSize << "KB "; + out << _dest << ": downloading " << (_path.empty() ? string("") : (_path + " ")) << roundedSize + << "KB "; _startedPatch = true; } } diff --git a/cpp/src/IceGrid/Parser.cpp b/cpp/src/IceGrid/Parser.cpp index 0b6bcc8f030..f736f7bbe41 100644 --- a/cpp/src/IceGrid/Parser.cpp +++ b/cpp/src/IceGrid/Parser.cpp @@ -949,15 +949,15 @@ Parser::endpointsAdapter(const list<string>& args) if(adpts.size() == 1 && adpts.begin()->id == adapterId) { string endpoints = _communicator->proxyToString(adpts.begin()->proxy); - cout << (endpoints.empty() ? "<inactive>" : endpoints) << endl; + cout << (endpoints.empty() ? string("<inactive>") : endpoints) << endl; } else { for(AdapterInfoSeq::const_iterator p = adpts.begin(); p != adpts.end(); ++p) { - cout << (p->id.empty() ? "<empty>" : p->id) << ": "; + cout << (p->id.empty() ? string("<empty>") : p->id) << ": "; string endpoints = _communicator->proxyToString(p->proxy); - cout << (endpoints.empty() ? "<inactive>" : endpoints) << endl; + cout << (endpoints.empty() ? string("<inactive>") : endpoints) << endl; } } } diff --git a/cpp/src/IceGrid/Parser.h b/cpp/src/IceGrid/Parser.h index 9a4aaa50614..c793e540d5a 100644 --- a/cpp/src/IceGrid/Parser.h +++ b/cpp/src/IceGrid/Parser.h @@ -14,13 +14,14 @@ #include <IceGrid/Admin.h> #include <IceGrid/Query.h> #include <list> +#include <stdio.h> #ifdef _WIN32 # include <io.h> -# define isatty _isatty -# define fileno _fileno -// '_isatty' : inconsistent dll linkage. dllexport assumed. # ifdef _MSC_VER +# define isatty _isatty +# define fileno _fileno +// '_isatty' : inconsistent dll linkage. dllexport assumed. # pragma warning( disable : 4273 ) # endif #endif diff --git a/cpp/src/IceGrid/RegistryI.cpp b/cpp/src/IceGrid/RegistryI.cpp index 9dc35eeecb8..dfacb440acc 100644 --- a/cpp/src/IceGrid/RegistryI.cpp +++ b/cpp/src/IceGrid/RegistryI.cpp @@ -40,8 +40,10 @@ #ifdef _WIN32 # include <direct.h> -# define S_ISDIR(mode) ((mode) & _S_IFDIR) -# define S_ISREG(mode) ((mode) & _S_IFREG) +# ifdef _MSC_VER +# define S_ISDIR(mode) ((mode) & _S_IFDIR) +# define S_ISREG(mode) ((mode) & _S_IFREG) +# endif #else # include <unistd.h> #endif diff --git a/cpp/src/IceGrid/Scanner.l b/cpp/src/IceGrid/Scanner.l index 213934d1dfb..3b0e8d4435b 100644 --- a/cpp/src/IceGrid/Scanner.l +++ b/cpp/src/IceGrid/Scanner.l @@ -33,6 +33,7 @@ WS [ \t\v\f\r] NL [\n] %option noyywrap +%option never-interactive %% diff --git a/cpp/src/IceGrid/ServerI.cpp b/cpp/src/IceGrid/ServerI.cpp index 67953e08d04..f5eb0042622 100644 --- a/cpp/src/IceGrid/ServerI.cpp +++ b/cpp/src/IceGrid/ServerI.cpp @@ -130,365 +130,6 @@ private: const TimedServerCommandPtr _command; }; -class LoadCommand : public ServerCommand -{ -public: - - LoadCommand(const ServerIPtr& server) : - ServerCommand(server) - { - } - - virtual bool - canExecute(ServerI::InternalServerState state) - { - return state == ServerI::Inactive; - } - - virtual ServerI::InternalServerState - nextState() - { - return ServerI::Loading; - } - - virtual void - execute() - { - _server->update(); - } - - void - setUpdate(const string& application, const ServerDescriptorPtr& desc, const std::string& sessionId, bool clearDir) - { - _clearDir = clearDir; - _application = application; - _desc = desc; - _sessionId = sessionId; - } - - bool - clearDir() const - { - return _clearDir; - } - - string - sessionId() const - { - return _sessionId; - } - - string - getApplication() const - { - return _application; - } - - ServerDescriptorPtr - getDescriptor() const - { - return _desc; - } - - void - addCallback(const AMD_Node_loadServerPtr& amdCB) - { - _loadCB.push_back(amdCB); - } - - void - failed(const Ice::Exception& ex) - { - for(vector<AMD_Node_loadServerPtr>::const_iterator p = _loadCB.begin(); p != _loadCB.end(); ++p) - { - (*p)->ice_exception(ex); - } - } - - void - finished(const ServerPrx& proxy, const AdapterPrxDict& adapters, int at, int dt) - { - for(vector<AMD_Node_loadServerPtr>::const_iterator p = _loadCB.begin(); p != _loadCB.end(); ++p) - { - (*p)->ice_response(proxy, adapters, at, dt); - } - } - -private: - - vector<AMD_Node_loadServerPtr> _loadCB; - bool _clearDir; - string _application; - ServerDescriptorPtr _desc; - string _sessionId; - auto_ptr<DeploymentException> _exception; -}; - -class DestroyCommand : public ServerCommand -{ -public: - - DestroyCommand(const ServerIPtr& server, bool kill) : - ServerCommand(server), - _kill(kill) - { - } - - virtual bool - canExecute(ServerI::InternalServerState state) - { - return - state == ServerI::Inactive || - state == ServerI::WaitForActivation || - state == ServerI::Active || - state == ServerI::ActivationTimeout || - state == ServerI::Deactivating || - state == ServerI::DeactivatingWaitForProcess; - } - - virtual ServerI::InternalServerState - nextState() - { - return ServerI::Destroying; - } - - virtual void - execute() - { - if(_kill) - { - _server->kill(); - } - else - { - _server->destroy(); - } - } - - void - addCallback(const AMD_Node_destroyServerPtr& amdCB) - { - _destroyCB.push_back(amdCB); - } - - void - finished() - { - for(vector<AMD_Node_destroyServerPtr>::const_iterator p = _destroyCB.begin(); p != _destroyCB.end(); ++p) - { - (*p)->ice_response(); - } - } - -private: - - const bool _kill; - vector<AMD_Node_destroyServerPtr> _destroyCB; -}; - -class PatchCommand : public ServerCommand, public IceUtil::Monitor<IceUtil::Mutex> -{ -public: - - PatchCommand(const ServerIPtr& server) : - ServerCommand(server), - _notified(false), - _destroyed(false) - { - } - - virtual bool - canExecute(ServerI::InternalServerState state) - { - return state == ServerI::Inactive; - } - - virtual ServerI::InternalServerState - nextState() - { - return ServerI::Patching; - } - - virtual void - execute() - { - Lock sync(*this); - _notified = true; - notifyAll(); - } - - bool - waitForPatch() - { - Lock sync(*this); - while(!_notified && !_destroyed) - { - wait(); - } - return _destroyed; - } - - void - destroyed() - { - Lock sync(*this); - _destroyed = true; - notifyAll(); - } - - void - finished() - { - } - -private: - - bool _notified; - bool _destroyed; -}; - -class StartCommand : public TimedServerCommand -{ -public: - - StartCommand(const ServerIPtr& server, const WaitQueuePtr& waitQueue, int timeout) : - TimedServerCommand(server, waitQueue, timeout) - { - } - - virtual bool - canExecute(ServerI::InternalServerState state) - { - return state == ServerI::Inactive; - } - - virtual ServerI::InternalServerState - nextState() - { - startTimer(); - return ServerI::Activating; - } - - virtual void - execute() - { - _server->activate(); - } - - virtual void - timeout(bool destroyed) - { - _server->activationFailed(destroyed); - } - - void - addCallback(const AMD_Server_startPtr& amdCB) - { - _startCB.push_back(amdCB); - } - - void - failed(const string& reason) - { - stopTimer(); - ServerStartException ex(_server->getId(), reason); - for(vector<AMD_Server_startPtr>::const_iterator p = _startCB.begin(); p != _startCB.end(); ++p) - { - (*p)->ice_exception(ex); - } - _startCB.clear(); - } - - void - finished() - { - stopTimer(); - for(vector<AMD_Server_startPtr>::const_iterator p = _startCB.begin(); p != _startCB.end(); ++p) - { - (*p)->ice_response(); - } - _startCB.clear(); - } - -private: - - vector<AMD_Server_startPtr> _startCB; -}; - -class StopCommand : public TimedServerCommand -{ -public: - - StopCommand(const ServerIPtr& server, const WaitQueuePtr& waitQueue, int timeout) : - TimedServerCommand(server, waitQueue, timeout) - { - } - - static bool - isStopped(ServerI::InternalServerState state) - { - return state == ServerI::Inactive || state == ServerI::Patching || state == ServerI::Loading; - } - - virtual bool - canExecute(ServerI::InternalServerState state) - { - return state == ServerI::WaitForActivation || state == ServerI::ActivationTimeout || state == ServerI::Active; - } - - virtual ServerI::InternalServerState - nextState() - { - startTimer(); - return ServerI::Deactivating; - } - - virtual void - execute() - { - _server->deactivate(); - } - - virtual void - timeout(bool) - { - _server->kill(); - } - - void - addCallback(const AMD_Server_stopPtr& amdCB) - { - _stopCB.push_back(amdCB); - } - - void - failed(const string& reason) - { - stopTimer(); - ServerStopException ex(_server->getId(), reason); - for(vector<AMD_Server_stopPtr>::const_iterator p = _stopCB.begin(); p != _stopCB.end(); ++p) - { - (*p)->ice_exception(ex); - } - _stopCB.clear(); - } - - void - finished() - { - stopTimer(); - for(vector<AMD_Server_stopPtr>::const_iterator p = _stopCB.begin(); p != _stopCB.end(); ++p) - { - (*p)->ice_response(); - } - _stopCB.clear(); - } - -private: - - vector<AMD_Server_stopPtr> _stopCB; -}; - class DelayedStart : public WaitItem { public: @@ -547,7 +188,7 @@ struct EnvironmentEval : std::unary_function<string, string> } string variable = v.substr(beg + 1, end - beg - 1); int ret = GetEnvironmentVariable(variable.c_str(), buf, sizeof(buf)); - string valstr = (ret > 0 && ret < sizeof(buf)) ? string(buf) : ""; + string valstr = (ret > 0 && ret < sizeof(buf)) ? string(buf) : string(""); v.replace(beg, end - beg + 1, valstr); beg += valstr.size(); } @@ -608,6 +249,314 @@ TimedServerCommand::stopTimer() _waitQueue->remove(_timer); } +LoadCommand::LoadCommand(const ServerIPtr& server) : + ServerCommand(server) +{ +} + +bool +LoadCommand::canExecute(ServerI::InternalServerState state) +{ + return state == ServerI::Inactive; +} + +ServerI::InternalServerState +LoadCommand::nextState() +{ + return ServerI::Loading; +} + +void +LoadCommand::execute() +{ + _server->update(); +} + +void +LoadCommand::setUpdate(const string& application, const ServerDescriptorPtr& desc, const std::string& sessionId, + bool clearDir) +{ + _clearDir = clearDir; + _application = application; + _desc = desc; + _sessionId = sessionId; +} + +bool +LoadCommand::clearDir() const +{ + return _clearDir; +} + +string +LoadCommand::sessionId() const +{ + return _sessionId; +} + +string +LoadCommand::getApplication() const +{ + return _application; +} + +ServerDescriptorPtr +LoadCommand::getDescriptor() const +{ + return _desc; +} + +void +LoadCommand::addCallback(const AMD_Node_loadServerPtr& amdCB) +{ + _loadCB.push_back(amdCB); +} + +void +LoadCommand::failed(const Ice::Exception& ex) +{ + for(vector<AMD_Node_loadServerPtr>::const_iterator p = _loadCB.begin(); p != _loadCB.end(); ++p) + { + (*p)->ice_exception(ex); + } +} + +void +LoadCommand::finished(const ServerPrx& proxy, const AdapterPrxDict& adapters, int at, int dt) +{ + for(vector<AMD_Node_loadServerPtr>::const_iterator p = _loadCB.begin(); p != _loadCB.end(); ++p) + { + (*p)->ice_response(proxy, adapters, at, dt); + } +} + +DestroyCommand::DestroyCommand(const ServerIPtr& server, bool kill) : + ServerCommand(server), + _kill(kill) +{ +} + +bool +DestroyCommand::canExecute(ServerI::InternalServerState state) +{ + return + state == ServerI::Inactive || + state == ServerI::WaitForActivation || + state == ServerI::Active || + state == ServerI::ActivationTimeout || + state == ServerI::Deactivating || + state == ServerI::DeactivatingWaitForProcess; +} + +ServerI::InternalServerState +DestroyCommand::nextState() +{ + return ServerI::Destroying; +} + +void +DestroyCommand::execute() +{ + if(_kill) + { + _server->kill(); + } + else + { + _server->destroy(); + } +} + +void +DestroyCommand::addCallback(const AMD_Node_destroyServerPtr& amdCB) +{ + _destroyCB.push_back(amdCB); +} + +void +DestroyCommand::finished() +{ + for(vector<AMD_Node_destroyServerPtr>::const_iterator p = _destroyCB.begin(); p != _destroyCB.end(); ++p) + { + (*p)->ice_response(); + } +} + +PatchCommand::PatchCommand(const ServerIPtr& server) : + ServerCommand(server), + _notified(false), + _destroyed(false) +{ +} + +bool +PatchCommand::canExecute(ServerI::InternalServerState state) +{ + return state == ServerI::Inactive; +} + +ServerI::InternalServerState +PatchCommand::nextState() +{ + return ServerI::Patching; +} + +void +PatchCommand::execute() +{ + Lock sync(*this); + _notified = true; + notifyAll(); +} + +bool +PatchCommand::waitForPatch() +{ + Lock sync(*this); + while(!_notified && !_destroyed) + { + wait(); + } + return _destroyed; +} + +void +PatchCommand::destroyed() +{ + Lock sync(*this); + _destroyed = true; + notifyAll(); +} + +void +PatchCommand::finished() +{ +} + +StartCommand::StartCommand(const ServerIPtr& server, const WaitQueuePtr& waitQueue, int timeout) : + TimedServerCommand(server, waitQueue, timeout) +{ +} + +bool +StartCommand::canExecute(ServerI::InternalServerState state) +{ + return state == ServerI::Inactive; +} + +ServerI::InternalServerState +StartCommand::nextState() +{ + startTimer(); + return ServerI::Activating; +} + +void +StartCommand::execute() +{ + _server->activate(); +} + +void +StartCommand::timeout(bool destroyed) +{ + _server->activationFailed(destroyed); +} + +void +StartCommand::addCallback(const AMD_Server_startPtr& amdCB) +{ + _startCB.push_back(amdCB); +} + +void +StartCommand::failed(const string& reason) +{ + stopTimer(); + ServerStartException ex(_server->getId(), reason); + for(vector<AMD_Server_startPtr>::const_iterator p = _startCB.begin(); p != _startCB.end(); ++p) + { + (*p)->ice_exception(ex); + } + _startCB.clear(); +} + +void +StartCommand::finished() +{ + stopTimer(); + for(vector<AMD_Server_startPtr>::const_iterator p = _startCB.begin(); p != _startCB.end(); ++p) + { + (*p)->ice_response(); + } + _startCB.clear(); +} + +StopCommand::StopCommand(const ServerIPtr& server, const WaitQueuePtr& waitQueue, int timeout) : + TimedServerCommand(server, waitQueue, timeout) +{ +} + +bool +StopCommand::isStopped(ServerI::InternalServerState state) +{ + return state == ServerI::Inactive || state == ServerI::Patching || state == ServerI::Loading; +} + +bool +StopCommand::canExecute(ServerI::InternalServerState state) +{ + return state == ServerI::WaitForActivation || state == ServerI::ActivationTimeout || state == ServerI::Active; +} + +ServerI::InternalServerState +StopCommand::nextState() +{ + startTimer(); + return ServerI::Deactivating; +} + +void +StopCommand::execute() +{ + _server->deactivate(); +} + +void +StopCommand::timeout(bool) +{ + _server->kill(); +} + +void +StopCommand::addCallback(const AMD_Server_stopPtr& amdCB) +{ + _stopCB.push_back(amdCB); +} + +void +StopCommand::failed(const string& reason) +{ + stopTimer(); + ServerStopException ex(_server->getId(), reason); + for(vector<AMD_Server_stopPtr>::const_iterator p = _stopCB.begin(); p != _stopCB.end(); ++p) + { + (*p)->ice_exception(ex); + } + _stopCB.clear(); +} + +void +StopCommand::finished() +{ + stopTimer(); + for(vector<AMD_Server_stopPtr>::const_iterator p = _stopCB.begin(); p != _stopCB.end(); ++p) + { + (*p)->ice_response(); + } + _stopCB.clear(); +} + ServerI::ServerI(const NodeIPtr& node, const ServerPrx& proxy, const string& serversDir, const string& id, int wt) : _node(node), _this(proxy), @@ -1459,7 +1408,7 @@ ServerI::terminated(const string& msg, int status) #else os << " with exit code " << status; #endif - os << (msg.empty() ? "." : ":\n" + msg); + os << (msg.empty() ? string(".") : ":\n" + msg); setStateNoSync(ServerI::Deactivating, os.str()); } } diff --git a/cpp/src/IceGrid/ServerI.h b/cpp/src/IceGrid/ServerI.h index f71aca358aa..643bede299e 100644 --- a/cpp/src/IceGrid/ServerI.h +++ b/cpp/src/IceGrid/ServerI.h @@ -199,6 +199,116 @@ private: }; typedef IceUtil::Handle<TimedServerCommand> TimedServerCommandPtr; +class DestroyCommand : public ServerCommand +{ +public: + + DestroyCommand(const ServerIPtr&, bool); + + bool canExecute(ServerI::InternalServerState state); + ServerI::InternalServerState nextState(); + void execute(); + + void addCallback(const AMD_Node_destroyServerPtr& amdCB); + void finished(); + +private: + + const bool _kill; + std::vector<AMD_Node_destroyServerPtr> _destroyCB; +}; + +class StopCommand : public TimedServerCommand +{ +public: + + StopCommand(const ServerIPtr&, const WaitQueuePtr&, int); + + static bool isStopped(ServerI::InternalServerState state); + + bool canExecute(ServerI::InternalServerState state); + ServerI::InternalServerState nextState(); + void execute(); + void timeout(bool destroyed); + + void addCallback(const AMD_Server_stopPtr&); + void failed(const std::string& reason); + void finished(); + +private: + + std::vector<AMD_Server_stopPtr> _stopCB; +}; + +class StartCommand : public TimedServerCommand +{ +public: + + StartCommand(const ServerIPtr&, const WaitQueuePtr&, int); + + bool canExecute(ServerI::InternalServerState state); + ServerI::InternalServerState nextState(); + void execute(); + void timeout(bool destroyed); + + void addCallback(const AMD_Server_startPtr&); + void failed(const std::string& reason); + void finished(); + +private: + + std::vector<AMD_Server_startPtr> _startCB; +}; + +class PatchCommand : public ServerCommand, public IceUtil::Monitor<IceUtil::Mutex> +{ +public: + + PatchCommand(const ServerIPtr&); + + bool canExecute(ServerI::InternalServerState state); + ServerI::InternalServerState nextState(); + void execute(); + + bool waitForPatch(); + void destroyed(); + void finished(); + +private: + + bool _notified; + bool _destroyed; +}; + +class LoadCommand : public ServerCommand +{ +public: + + LoadCommand(const ServerIPtr&); + + bool canExecute(ServerI::InternalServerState state); + ServerI::InternalServerState nextState(); + void execute(); + + void setUpdate(const std::string&, const ServerDescriptorPtr&, const std::string&, bool clearDir); + bool clearDir() const; + std::string sessionId() const; + std::string getApplication() const; + ServerDescriptorPtr getDescriptor() const; + void addCallback(const AMD_Node_loadServerPtr&); + void failed(const Ice::Exception&); + void finished(const ServerPrx&, const AdapterPrxDict&, int, int); + +private: + + std::vector<AMD_Node_loadServerPtr> _loadCB; + bool _clearDir; + std::string _application; + ServerDescriptorPtr _desc; + std::string _sessionId; + std::auto_ptr<DeploymentException> _exception; +}; + } #endif diff --git a/cpp/src/IceGrid/Topics.cpp b/cpp/src/IceGrid/Topics.cpp index df673f08813..508a07920a4 100644 --- a/cpp/src/IceGrid/Topics.cpp +++ b/cpp/src/IceGrid/Topics.cpp @@ -76,9 +76,17 @@ private: const int _serial; }; - NodeObserverTopic::NodeObserverTopic(const Ice::ObjectAdapterPtr& adapter, const IceStorm::TopicManagerPrx& topicManager) : +/* +#ifdef __BCPLUSPLUS__ // COMPILERFIX +{ +} + +void +NodeObserverTopic::initialize(const IceStorm::TopicManagerPrx& topicManager) +#endif +*/ _serial(0) { IceStorm::TopicPrx t; @@ -260,6 +268,15 @@ NodeObserverTopic::unsubscribe(const NodeObserverPrx& observer) RegistryObserverTopic::RegistryObserverTopic(const Ice::ObjectAdapterPtr& adapter, const IceStorm::TopicManagerPrx& topicManager) : +/* +#ifdef __BCPLUSPLUS__ // COMPILERFIX +{ +} + +void +RegistryObserverTopic::initialize(const IceStorm::TopicManagerPrx& topicManager) +#endif +*/ _serial(0) { IceStorm::TopicPrx t; diff --git a/cpp/src/IceGrid/Topics.h b/cpp/src/IceGrid/Topics.h index 90924b4fea7..b51985e0535 100644 --- a/cpp/src/IceGrid/Topics.h +++ b/cpp/src/IceGrid/Topics.h @@ -24,6 +24,9 @@ class NodeObserverTopic : public NodeObserver, public IceUtil::Mutex public: NodeObserverTopic(const Ice::ObjectAdapterPtr&, const IceStorm::TopicManagerPrx&); +#ifdef __BCPLUSPLUS__ // COMPILERFIX +// void initialize(const IceStorm::TopicManagerPrx&); +#endif virtual void init(const NodeDynamicInfoSeq&, const Ice::Current&); virtual void nodeUp(const NodeDynamicInfo&, const Ice::Current&); @@ -51,11 +54,14 @@ typedef IceUtil::Handle<NodeObserverTopic> NodeObserverTopicPtr; class RegistryObserverTopic : public RegistryObserver, public IceUtil::Monitor<IceUtil::Mutex> { public: +#ifdef __BCPLUSPLUS__ // COMPILERFIX +// void initialize(const IceStorm::TopicManagerPrx&); +#endif + RegistryObserverTopic(const Ice::ObjectAdapterPtr&, const IceStorm::TopicManagerPrx&); virtual void init(int, const ApplicationInfoSeq&, const AdapterInfoSeq&, const ObjectInfoSeq&, const Ice::Current&); - virtual void applicationAdded(int, const ApplicationInfo&, const Ice::Current&); virtual void applicationRemoved(int, const std::string&, const Ice::Current&); virtual void applicationUpdated(int, const ApplicationUpdateInfo&, const Ice::Current&); diff --git a/cpp/src/IceGrid/Util.h b/cpp/src/IceGrid/Util.h index c7f6ed142a3..f48c9ede590 100644 --- a/cpp/src/IceGrid/Util.h +++ b/cpp/src/IceGrid/Util.h @@ -16,6 +16,9 @@ #include <IceUtil/Random.h> #include <functional> +#ifdef __BCPLUSPLUS__ +# include <iterator> +#endif namespace IceGrid { diff --git a/cpp/src/IcePatch2/Calc.cpp b/cpp/src/IcePatch2/Calc.cpp index 42386286936..dfe342c7018 100644 --- a/cpp/src/IcePatch2/Calc.cpp +++ b/cpp/src/IcePatch2/Calc.cpp @@ -12,6 +12,10 @@ #include <IcePatch2/Util.h> #include <OS.h> +#ifdef __BCPLUSPLUS__ +# include <iterator> +#endif + using namespace std; using namespace Ice; using namespace IcePatch2; @@ -128,7 +132,7 @@ main(int argc, char* argv[]) vector<string> args; try { - args = opts.parse(argc, argv); + args = opts.parse(argc, (const char**)argv); } catch(const IceUtil::Options::BadOpt& e) { diff --git a/cpp/src/IcePatch2/Client.cpp b/cpp/src/IcePatch2/Client.cpp index 8427f0c8257..7cb8243d55d 100644 --- a/cpp/src/IcePatch2/Client.cpp +++ b/cpp/src/IcePatch2/Client.cpp @@ -169,7 +169,11 @@ private: keyPressed() { bool pressed = false; +#ifdef __BCPLUSPLUS__ + while(kbhit()) +#else while(_kbhit()) +#endif { pressed = true; _getch(); @@ -241,7 +245,7 @@ Client::run(int argc, char* argv[]) vector<string> args; try { - args = opts.parse(argc, argv); + args = opts.parse(argc, (const char**)argv); } catch(const IceUtil::Options::BadOpt& e) { diff --git a/cpp/src/IcePatch2/ClientUtil.cpp b/cpp/src/IcePatch2/ClientUtil.cpp index 0cd356e93df..2c6f736f436 100755 --- a/cpp/src/IcePatch2/ClientUtil.cpp +++ b/cpp/src/IcePatch2/ClientUtil.cpp @@ -14,6 +14,10 @@ #include <list> #include <OS.h> +#ifdef __BCPLUSPLUS__ +# include <iterator> +#endif + using namespace std; using namespace Ice; using namespace IcePatch2; diff --git a/cpp/src/IcePatch2/Makefile.mak b/cpp/src/IcePatch2/Makefile.mak new file mode 100644 index 00000000000..4e015b27cc9 --- /dev/null +++ b/cpp/src/IcePatch2/Makefile.mak @@ -0,0 +1,113 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = ..\.. + +LIBNAME = $(top_srcdir)\lib\icepatch2$(LIBSUFFIX).lib +DLLNAME = $(top_srcdir)\bin\icepatch2$(SOVERSION)$(LIBSUFFIX).dll + +SERVER = $(top_srcdir)\bin\icepatch2server.exe +CLIENT = $(top_srcdir)\bin\icepatch2client.exe +CALC = $(top_srcdir)\bin\icepatch2calc.exe + +!ifdef BUILD_UTILS + +TARGETS = $(SERVER) $(CLIENT) $(CALC) + +!else + +TARGETS = $(LIBNAME) $(DLLNAME) + +!endif + +OBJS = Util.o \ + ClientUtil.o \ + FileInfo.o \ + FileServer.o \ + OS.o + +SOBJS = Server.o \ + FileServerI.o + +COBJS = Client.o + +CALCOBJS = Calc.o + +SRCS = $(OBJS:.o=.cpp) \ + $(SOBJS:.o=.cpp) \ + $(COBJS:.o=.cpp) \ + $(CALCOBJS:.o=.cpp) + +HDIR = $(includedir)\IcePatch2 +SDIR = $(slicedir)\IcePatch2 + +!include $(top_srcdir)\config\Make.rules.mak + +!ifdef BUILD_UTILS + +CPPFLAGS = -I. -I.. $(CPPFLAGS) + +!else + +CPPFLAGS = -I. -I.. $(CPPFLAGS) -DICE_PATCH2_API_EXPORTS + +!endif + +SLICE2CPPFLAGS = --ice --include-dir IcePatch2 --dll-export ICE_PATCH2_API $(SLICE2CPPFLAGS) + +$(LIBNAME): $(DLLNAME) + +$(DLLNAME): $(OBJS) + del /q $@ + $(LINK) $(LD_DLLFLAGS) $(OBJS), $(DLLNAME),, $(LIBS) $(BZIP2_LIBS) $(OPENSSL_LIBS) + move $(DLLNAME:.dll=.lib) $(LIBNAME) + +$(SERVER): $(SOBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(SOBJS), $@,, $(LIBS) icepatch2$(LIBSUFFIX).lib + +$(CLIENT): $(COBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(COBJS), $@,, $(LIBS) icepatch2$(LIBSUFFIX).lib + +$(CALC): $(CALCOBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(CALCOBJS), $@,, $(LIBS) icepatch2$(LIBSUFFIX).lib + +FileInfo.cpp $(HDIR)\FileInfo.h: $(SDIR)\FileInfo.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) $(SLICE2CPPFLAGS) $(SDIR)\FileInfo.ice + move FileInfo.h $(HDIR) + +FileServer.cpp $(HDIR)\FileServer.h: $(SDIR)\FileServer.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) $(SLICE2CPPFLAGS) $(SDIR)\FileServer.ice + move FileServer.h $(HDIR) + +!ifdef BUILD_UTILS + +clean:: + del /q FileInfo.cpp $(HDIR)\FileInfo.h + del /q FileServer.cpp $(HDIR)\FileServer.h + +install:: all + copy $(LIBNAME) $(install_libdir) + copy $(DLLNAME) $(install_bindir) + copy $(SERVER) $(install_bindir) + copy $(CLIENT) $(install_bindir) + copy $(CALC) $(install_bindir) + +!else + +install:: all + +$(EVERYTHING):: + $(MAKE) /f Makefile.mak BUILD_UTILS=1 $@ + +!endif + +!include .depend diff --git a/cpp/src/IcePatch2/OS.cpp b/cpp/src/IcePatch2/OS.cpp index eadaf3d16ac..df7654cb712 100644 --- a/cpp/src/IcePatch2/OS.cpp +++ b/cpp/src/IcePatch2/OS.cpp @@ -11,6 +11,11 @@ #include <OS.h> #include <IceUtil/Unicode.h> +#ifdef __BCPLUSPLUS__ +# include <dir.h> +# include <io.h> +#endif + using namespace std; using namespace OS; diff --git a/cpp/src/IcePatch2/OS.h b/cpp/src/IcePatch2/OS.h index 3957c7c2813..9e86493d1aa 100644 --- a/cpp/src/IcePatch2/OS.h +++ b/cpp/src/IcePatch2/OS.h @@ -13,6 +13,7 @@ #include <Ice/Config.h> #include <sys/stat.h> #include <fcntl.h> +#include <stdio.h> #ifndef ICE_PATCH2_API # ifdef ICE_PATCH2_API_EXPORTS @@ -28,11 +29,13 @@ namespace OS #ifdef _WIN32 typedef struct _stat structstat; +#ifdef _MSC_VER # define O_RDONLY _O_RDONLY # define O_BINARY _O_BINARY # define S_ISDIR(mode) ((mode) & _S_IFDIR) # define S_ISREG(mode) ((mode) & _S_IFREG) +#endif #else diff --git a/cpp/src/IcePatch2/Server.cpp b/cpp/src/IcePatch2/Server.cpp index efe193805cf..7c604c1a392 100644 --- a/cpp/src/IcePatch2/Server.cpp +++ b/cpp/src/IcePatch2/Server.cpp @@ -74,7 +74,7 @@ IcePatch2::PatcherService::start(int argc, char* argv[]) vector<string> args; try { - args = opts.parse(argc, argv); + args = opts.parse(argc, (const char**)argv); } catch(const IceUtil::Options::BadOpt& e) { diff --git a/cpp/src/IcePatch2/Util.cpp b/cpp/src/IcePatch2/Util.cpp index d8522353f21..652e088efd0 100644 --- a/cpp/src/IcePatch2/Util.cpp +++ b/cpp/src/IcePatch2/Util.cpp @@ -30,6 +30,10 @@ # include <dirent.h> #endif +#ifdef __BCPLUSPLUS__ +# include <iterator> +#endif + const char* IcePatch2::checksumFile = "IcePatch2.sum"; const char* IcePatch2::logFile = "IcePatch2.log"; @@ -426,6 +430,7 @@ IcePatch2::getDirname(const string& pa) void IcePatch2::rename(const string& fromPa, const string& toPa) { + const string fromPath = simplify(fromPa); const string toPath = simplify(toPa); @@ -452,6 +457,10 @@ IcePatch2::remove(const string& pa) { if(OS::rmdir(path) == -1) { + if(errno == EACCES) + { + assert(false); + } throw "cannot remove directory `" + path + "':\n" + lastError(); } } @@ -507,24 +516,25 @@ IcePatch2::readDirectory(const string& pa) #ifdef _WIN32 - struct _wfinddata_t data; + StringSeq result; const wstring fs = IceUtil::stringToWstring(simplify(path + "/*")); -#if defined(_MSC_VER) && (_MSC_VER < 1300) - long h = _wfindfirst(fs.c_str(), &data); -#else - intptr_t h = _wfindfirst(fs.c_str(), &data); -#endif +# ifdef __BCPLUSPLUS__ + struct _wffblk data; + int h = _wfindfirst(fs.c_str(), &data, FA_DIREC); if(h == -1) { + if(_doserrno == ENMFILE) + { + return result; + } throw "cannot read directory `" + path + "':\n" + lastError(); } - StringSeq result; while(true) { - string name = IceUtil::wstringToString(data.name); + string name = IceUtil::wstringToString(data.ff_name); assert(!name.empty()); if(name != ".." && name != ".") @@ -532,7 +542,7 @@ IcePatch2::readDirectory(const string& pa) result.push_back(name); } - if(_wfindnext(h, &data) == -1) + if(_wfindnext(&data) == -1) { if(errno == ENOENT) { @@ -540,15 +550,52 @@ IcePatch2::readDirectory(const string& pa) } string ex = "cannot read directory `" + path + "':\n" + lastError(); - _findclose(h); + _wfindclose(&data); throw ex; } } + _wfindclose(&data); +# else + struct _wfinddata_t data; + +# if defined(_MSC_VER) && (_MSC_VER < 1300) + long h = _wfindfirst(fs.c_str(), &data); +# else + intptr_t h = _wfindfirst(fs.c_str(), &data); +# endif + if(h == -1) + { + throw "cannot read directory `" + path + "':\n" + lastError(); + } + + while(true) + { + string name = IceUtil::wstringToString(data.name); + assert(!name.empty()); + + if(name != ".." && name != ".") + { + result.push_back(name); + } + + if(_wfindnext(h, &data) == -1) + { + if(errno == ENOENT) + { + break; + } + + string ex = "cannot read directory `" + path + "':\n" + lastError(); + _findclose(h); + throw ex; + } + } + _findclose(h); +# endif sort(result.begin(), result.end()); - return result; #else diff --git a/cpp/src/IceSSL/Certificate.cpp b/cpp/src/IceSSL/Certificate.cpp index 030f798042a..05d4055edd0 100755 --- a/cpp/src/IceSSL/Certificate.cpp +++ b/cpp/src/IceSSL/Certificate.cpp @@ -122,7 +122,7 @@ ASMUtcTimeToIceUtilTime(const ASN1_UTCTIME* s) } static string -convertX509NameToString(X509_NAME* name) +convertX509NameToString(X509NAME* name) { BIO* out = BIO_new(BIO_s_mem()); X509_NAME_print_ex(out, name, 0, XN_FLAG_RFC2253); @@ -245,7 +245,7 @@ ParseException::ice_throw() const throw *this; } -DistinguishedName::DistinguishedName(X509_NAME* name) : +DistinguishedName::DistinguishedName(X509NAME* name) : _rdns(RFC2253::parseStrict(convertX509NameToString(name))) { unescape(); diff --git a/cpp/src/IceSSL/Makefile.mak b/cpp/src/IceSSL/Makefile.mak new file mode 100644 index 00000000000..f692eed1e59 --- /dev/null +++ b/cpp/src/IceSSL/Makefile.mak @@ -0,0 +1,49 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = ..\.. + +LIBNAME = $(top_srcdir)\lib\icessl$(LIBSUFFIX).lib +DLLNAME = $(top_srcdir)\bin\icessl$(SOVERSION)$(LIBSUFFIX).dll + +TARGETS = $(LIBNAME) $(DLLNAME) + +OBJS = AcceptorI.o \ + Certificate.o \ + ConnectorI.o \ + EndpointI.o \ + Instance.o \ + PluginI.o \ + TransceiverI.o \ + Util.o \ + RFC2253.o \ + TrustManager.o + +SRCS = $(OBJS:.o=.cpp) + +HDIR = $(includedir)\IceSSL + +!include $(top_srcdir)/config/Make.rules.mak + +CPPFLAGS = -I.. $(CPPFLAGS) -DICE_SSL_API_EXPORTS + +LINKWITH = $(OPENSSL_LIBS) $(LIBS) + +$(LIBNAME): $(DLLNAME) + +$(DLLNAME): $(OBJS) + del /q $@ + $(LINK) $(LD_DLLFLAGS) $(OBJS), $(DLLNAME),, $(LINKWITH) + move $(DLLNAME:.dll=.lib) $(LIBNAME) + +install:: all + copy $(LIBNAME) $(install_libdir) + copy $(DLLNAME) $(install_bindir) + +!include .depend diff --git a/cpp/src/IceSSL/Util.cpp b/cpp/src/IceSSL/Util.cpp index 2298170812c..81da0f00efb 100644 --- a/cpp/src/IceSSL/Util.cpp +++ b/cpp/src/IceSSL/Util.cpp @@ -15,8 +15,10 @@ # include <direct.h> # include <sys/types.h> # include <sys/stat.h> -# define S_ISDIR(mode) ((mode) & _S_IFDIR) -# define S_ISREG(mode) ((mode) & _S_IFREG) +# ifdef _MSC_VER +# define S_ISDIR(mode) ((mode) & _S_IFDIR) +# define S_ISREG(mode) ((mode) & _S_IFREG) +# endif #else # include <sys/stat.h> #endif diff --git a/cpp/src/IceStorm/Admin.cpp b/cpp/src/IceStorm/Admin.cpp index 296aa2029cf..aa94afbb525 100644 --- a/cpp/src/IceStorm/Admin.cpp +++ b/cpp/src/IceStorm/Admin.cpp @@ -71,7 +71,7 @@ Client::run(int argc, char* argv[]) vector<string> args; try { - args = opts.parse(argc, argv); + args = opts.parse(argc, (const char**)argv); } catch(const IceUtil::Options::BadOpt& e) { diff --git a/cpp/src/IceStorm/Flusher.cpp b/cpp/src/IceStorm/Flusher.cpp index 097de86d24d..0c9142db350 100644 --- a/cpp/src/IceStorm/Flusher.cpp +++ b/cpp/src/IceStorm/Flusher.cpp @@ -14,146 +14,125 @@ #include <IceStorm/TraceLevels.h> #include <IceStorm/Flusher.h> #include <algorithm> -#include <list> using namespace IceStorm; using namespace std; -namespace IceStorm +FlusherThread::FlusherThread(const Ice::CommunicatorPtr& communicator, const TraceLevelsPtr& traceLevels) : + _communicator(communicator), + _traceLevels(traceLevels), + _destroy(false) { - -typedef std::list<FlushablePtr> FlushableList; - -class FlusherThread : public IceUtil::Thread, public IceUtil::Monitor<IceUtil::Mutex> -{ -public: - - FlusherThread(const Ice::CommunicatorPtr& communicator, const TraceLevelsPtr& traceLevels) : - _communicator(communicator), - _traceLevels(traceLevels), - _destroy(false) + _flushTime = communicator->getProperties()->getPropertyAsIntWithDefault("IceStorm.Flush.Timeout", 1000); + if(_flushTime < 100) { - _flushTime = communicator->getProperties()->getPropertyAsIntWithDefault("IceStorm.Flush.Timeout", 1000); - if(_flushTime < 100) - { - _flushTime = 100; // Minimum of 100 ms - } + _flushTime = 100; // Minimum of 100 ms } +} - ~FlusherThread() - { - } +FlusherThread::~FlusherThread() +{ +} - virtual void - run() +void +FlusherThread::run() +{ + IceUtil::Monitor<IceUtil::Mutex>::Lock sync(*this); + while(!_destroy) { - IceUtil::Monitor<IceUtil::Mutex>::Lock sync(*this); - while(!_destroy) - { - long tout = calcTimeout(); - if(tout == 0) - { - wait(); - } - else - { - timedWait(IceUtil::Time::milliSeconds(tout)); - } - if(_destroy) - { - continue; - } - flushAll(); - } - - // - // We break a cycle by clearing the subscriber list. - // - _subscribers.clear(); + long tout = calcTimeout(); + if(tout == 0) + { + wait(); + } + else + { + timedWait(IceUtil::Time::milliSeconds(tout)); + } + if(_destroy) + { + continue; + } + flushAll(); } - void - destroy() - { - IceUtil::Monitor<IceUtil::Mutex>::Lock sync(*this); - _destroy = true; - notify(); - } + // + // We break a cycle by clearing the subscriber list. + // + _subscribers.clear(); +} + +void +FlusherThread::destroy() +{ + IceUtil::Monitor<IceUtil::Mutex>::Lock sync(*this); + _destroy = true; + notify(); +} + +// +// It would be possible to write add/remove in such a way as to +// avoid blocking while flushing by having a queue of actions +// which are only performed before flushing. For now, however, +// this issue is ignored. +// +void +FlusherThread::add(const FlushablePtr& subscriber) +{ + IceUtil::Monitor<IceUtil::Mutex>::Lock sync(*this); + bool isEmpty = _subscribers.empty(); + _subscribers.push_back(subscriber); // - // It would be possible to write add/remove in such a way as to - // avoid blocking while flushing by having a queue of actions - // which are only performed before flushing. For now, however, - // this issue is ignored. + // If the set of subscribers was previously empty then wake up + // the flushing thread since it will be waiting indefinitely // - void - add(const FlushablePtr& subscriber) + if(isEmpty) { - IceUtil::Monitor<IceUtil::Mutex>::Lock sync(*this); - bool isEmpty = _subscribers.empty(); - _subscribers.push_back(subscriber); - - // - // If the set of subscribers was previously empty then wake up - // the flushing thread since it will be waiting indefinitely - // - if(isEmpty) - { - notify(); - } + notify(); } +} - void - remove(const FlushablePtr& subscriber) - { - IceUtil::Monitor<IceUtil::Mutex>::Lock sync(*this); - _subscribers.remove(subscriber); - } +void +FlusherThread::remove(const FlushablePtr& subscriber) +{ + IceUtil::Monitor<IceUtil::Mutex>::Lock sync(*this); + _subscribers.remove(subscriber); +} -private: +void +FlusherThread::flushAll() +{ + // This is always called with the monitor locked + //IceUtil::Monitor<IceUtil::Mutex>::Lock sync(*this); - void - flushAll() - { - // This is always called with the monitor locked - //IceUtil::Monitor<IceUtil::Mutex>::Lock sync(*this); - - // - // remove_if doesn't work with handle types. remove_if also - // isn't present in the STLport implementation - // - // _subscribers.remove_if(IceUtil::constMemFun(&Flushable::inactive)); - // - _subscribers.erase(remove_if(_subscribers.begin(), _subscribers.end(), - IceUtil::constMemFun(&Flushable::inactive)), _subscribers.end()); - - _communicator->flushBatchRequests(); - - // - // Trace after the flush so that the correct number of objects - // are displayed - // - if(_traceLevels->flush > 0) - { - Ice::Trace out(_traceLevels->logger, _traceLevels->flushCat); - out << _subscribers.size() << " object(s)"; - } - } - long - calcTimeout() + // remove_if doesn't work with handle types. remove_if also + // isn't present in the STLport implementation + // + // _subscribers.remove_if(IceUtil::constMemFun(&Flushable::inactive)); + // + _subscribers.erase(remove_if(_subscribers.begin(), _subscribers.end(), + IceUtil::constMemFun(&Flushable::inactive)), _subscribers.end()); + + _communicator->flushBatchRequests(); + + // + // Trace after the flush so that the correct number of objects + // are displayed + // + if(_traceLevels->flush > 0) { - return (_subscribers.empty()) ? 0 : _flushTime; + Ice::Trace out(_traceLevels->logger, _traceLevels->flushCat); + out << _subscribers.size() << " object(s)"; } +} - Ice::CommunicatorPtr _communicator; - TraceLevelsPtr _traceLevels; - FlushableList _subscribers; - bool _destroy; - long _flushTime; -}; - -} // End namespace IceStorm +long +FlusherThread::calcTimeout() +{ + return (_subscribers.empty()) ? 0 : _flushTime; +} Flusher::Flusher(const Ice::CommunicatorPtr& communicator, const TraceLevelsPtr& traceLevels) { diff --git a/cpp/src/IceStorm/Flusher.h b/cpp/src/IceStorm/Flusher.h index a5ce6dd7c2f..33d305884f5 100644 --- a/cpp/src/IceStorm/Flusher.h +++ b/cpp/src/IceStorm/Flusher.h @@ -12,7 +12,9 @@ #include <IceUtil/Handle.h> #include <IceUtil/Shared.h> +#include <IceUtil/Thread.h> #include <Ice/CommunicatorF.h> +#include <list> namespace IceStorm { @@ -20,14 +22,40 @@ namespace IceStorm // // Forward declarations. // -class FlusherThread; -typedef IceUtil::Handle<FlusherThread> FlusherThreadPtr; - class TraceLevels; typedef IceUtil::Handle<TraceLevels> TraceLevelsPtr; class Flushable; typedef IceUtil::Handle<Flushable> FlushablePtr; +typedef std::list<FlushablePtr> FlushableList; + +// +// Flusher Thread +// +class FlusherThread : public IceUtil::Thread, public IceUtil::Monitor<IceUtil::Mutex> +{ +public: + + FlusherThread(const Ice::CommunicatorPtr&, const TraceLevelsPtr&); + ~FlusherThread(); + + virtual void run(); + void destroy(); + void add(const FlushablePtr&); + void remove(const FlushablePtr&); +private: + + void flushAll(); + long calcTimeout(); + + Ice::CommunicatorPtr _communicator; + TraceLevelsPtr _traceLevels; + FlushableList _subscribers; + bool _destroy; + long _flushTime; +}; + +typedef IceUtil::Handle<FlusherThread> FlusherThreadPtr; // // Responsible for flushing Flushable objects at regular intervals. diff --git a/cpp/src/IceStorm/Makefile b/cpp/src/IceStorm/Makefile index 176b62bb68d..48fb09e3941 100644 --- a/cpp/src/IceStorm/Makefile +++ b/cpp/src/IceStorm/Makefile @@ -52,7 +52,6 @@ AOBJS = Admin.o \ SRCS = $(OBJS:.o=.cpp) \ $(SERVICE_OBJS:.o=.cpp) \ - $(SERVER_OBJS:.o=.cpp) \ $(AOBJS:.o=.cpp) SLICE_SRCS = $(SDIR)/IceStorm.ice \ diff --git a/cpp/src/IceStorm/Makefile.mak b/cpp/src/IceStorm/Makefile.mak new file mode 100644 index 00000000000..827b7547212 --- /dev/null +++ b/cpp/src/IceStorm/Makefile.mak @@ -0,0 +1,160 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = ..\.. + +LIBNAME = $(top_srcdir)\lib\icestorm$(LIBSUFFIX).lib +DLLNAME = $(top_srcdir)\bin\icestorm$(SOVERSION)$(LIBSUFFIX).dll + +SVCLIBNAME = $(top_srcdir)\lib\icestormservice$(LIBSUFFIX).lib +SVCDLLNAME = $(top_srcdir)\bin\icestormservice$(SOVERSION)$(LIBSUFFIX).dll + +ADMIN = $(top_srcdir)\bin\icestormadmin.exe + +!ifdef BUILD_UTILS + +TARGETS = $(ADMIN) + +!else + +TARGETS = $(LIBNAME) $(DLLNAME) $(SVCLIBNAME) $(SVCDLLNAME) + +!endif + +OBJS = IceStorm.o \ + +SOBJS = TraceLevels.o \ + Flusher.o \ + Subscriber.o \ + OnewaySubscriber.o \ + OnewayBatchSubscriber.o \ + LinkSubscriber.o \ + SubscriberFactory.o \ + TopicI.o \ + TopicManagerI.o \ + PersistentTopicMap.o \ + LinkRecord.o \ + IceStormInternal.o \ + Service.o \ + QueuedProxy.o \ + OnewayProxy.o \ + TwowayProxy.o \ + LinkProxy.o + +AOBJS = Admin.o \ + Grammar.o \ + Scanner.o \ + WeightedGraph.o \ + Parser.o + +SRCS = $(OBJS:.o=.cpp) \ + $(SOBJS:.o=.cpp) \ + $(AOBJS:.o=.cpp) + +HDIR = $(includedir)\IceStorm +SDIR = $(slicedir)\IceStorm + +!include $(top_srcdir)\config\Make.rules.mak + +CPPFLAGS = -I.. $(CPPFLAGS) +SLICE2CPPFLAGS = --ice --include-dir IceStorm $(SLICE2CPPFLAGS) +LINKWITH = $(LIBS) icestorm$(LIBSUFFIX).lib freeze$(LIBSUFFIX).lib icebox$(LIBSUFFIX).lib +ALINKWITH = $(LIBS) icestorm$(LIBSUFFIX).lib icexml$(LIBSUFFIX).lib + +!ifndef BUILD_UTILS + +EXTRAFLAGS = -DICE_STORM_SERVICE_API_EXPORTS + +!endif + +IceStorm.o: IceStorm.cpp + $(CXX) -c $(CPPFLAGS) $(CXXFLAGS) -DICE_STORM_API_EXPORTS -o IceStorm.o IceStorm.cpp + +.cpp.o: + $(CXX) -c $(CPPFLAGS) $(CXXFLAGS) $(EXTRAFLAGS) -o $@ $< + +$(LIBNAME): $(DLLNAME) + +$(DLLNAME): $(OBJS) + del /q $@ + $(LINK) $(LD_DLLFLAGS) $(OBJS), $(DLLNAME),, $(LIBS) + move $(DLLNAME:.dll=.lib) $(LIBNAME) + +$(SVCLIBNAME): $(SVCDLLNAME) + +$(SVCDLLNAME): $(SOBJS) + del /q $@ + $(LINK) $(LD_DLLFLAGS) $(SOBJS), $(SVCDLLNAME),, $(LINKWITH) + move $(SVCDLLNAME:.dll=.lib) $(SVCLIBNAME) + +$(ADMIN): $(AOBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(AOBJS), $@,, $(ALINKWITH) + +PersistentTopicMap.h PersistentTopicMap.cpp: ../IceStorm/LinkRecord.ice $(slicedir)/Ice/Identity.ice $(SLICE2FREEZE) + del /q PersistentTopicMap.h PersistentTopicMap.cpp + $(SLICE2FREEZE) --ice --include-dir IceStorm -I.. -I$(slicedir) --dict \ + IceStorm::PersistentTopicMap,string,IceStorm::LinkRecordDict PersistentTopicMap \ + ..\IceStorm\LinkRecord.ice + +IceStorm.cpp $(HDIR)\IceStorm.h: $(SDIR)\IceStorm.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) --checksum --dll-export ICE_STORM_API $(SLICE2CPPFLAGS) $(SDIR)\IceStorm.ice + move IceStorm.h $(HDIR) + +IceStormInternal.cpp IceStormInternal.h: IceStormInternal.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) $(SLICE2CPPFLAGS) IceStormInternal.ice + +LinkRecord.cpp LinkRecord.h: LinkRecord.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) -I.. $(SLICE2CPPFLAGS) LinkRecord.ice + +Scanner.cpp : Scanner.l + flex $(FLEXFLAGS) Scanner.l + del /q $@ + echo #include "IceUtil/Config.h" > Scanner.cpp + type lex.yy.c >> Scanner.cpp + del /q lex.yy.c + +Grammar.cpp Grammar.h: Grammar.y + del /q Grammar.h Grammar.cpp + bison -dvt Grammar.y + move Grammar.tab.c Grammar.cpp + move Grammar.tab.h Grammar.h + del /q Grammar.output + +!ifdef BUILD_UTILS + +clean:: + del /q PersistentTopicMap.h PersistentTopicMap.cpp + +clean:: + del /q IceStorm.cpp $(HDIR)\IceStorm.h + del /q IceStormInternal.cpp IceStormInternal.h + del /q LinkRecord.cpp LinkRecord.h + +clean:: + del /q Grammar.cpp Grammar.h + del /q Scanner.cpp + +install:: all + copy $(LIBNAME) $(install_libdir) + copy $(DLLNAME) $(install_bindir) + copy $(SVCLIBNAME) $(install_libdir) + copy $(SVCDLLNAME) $(install_bindir) + copy $(ADMIN) $(install_bindir) + +!else + +install:: all + +$(EVERYTHING):: + $(MAKE) /f Makefile.mak BUILD_UTILS=1 $@ + +!endif + +!include .depend diff --git a/cpp/src/IceStorm/OnewaySubscriber.h b/cpp/src/IceStorm/OnewaySubscriber.h index 6480f89c883..e9ede06c451 100644 --- a/cpp/src/IceStorm/OnewaySubscriber.h +++ b/cpp/src/IceStorm/OnewaySubscriber.h @@ -12,13 +12,11 @@ #include <IceStorm/Subscriber.h> #include <IceStorm/QueuedProxy.h> +#include <IceStorm/SubscriberFactory.h> namespace IceStorm { -class SubscriberFactory; -typedef IceUtil::Handle<SubscriberFactory> SubscriberFactoryPtr; - class OnewaySubscriber : public Subscriber { public: diff --git a/cpp/src/IceStorm/Parser.h b/cpp/src/IceStorm/Parser.h index 222ab0145b8..7025ba30127 100644 --- a/cpp/src/IceStorm/Parser.h +++ b/cpp/src/IceStorm/Parser.h @@ -13,13 +13,14 @@ #include <IceUtil/Handle.h> #include <IceStorm/IceStorm.h> #include <list> +#include <stdio.h> #ifdef _WIN32 # include <io.h> -# define isatty _isatty -# define fileno _fileno -// '_isatty' : inconsistent dll linkage. dllexport assumed. # ifdef _MSC_VER +# define isatty _isatty +# define fileno _fileno +// '_isatty' : inconsistent dll linkage. dllexport assumed. # pragma warning( disable : 4273 ) # endif #endif diff --git a/cpp/src/IceStorm/Scanner.l b/cpp/src/IceStorm/Scanner.l index 8065c2553c0..4edfa55ee23 100644 --- a/cpp/src/IceStorm/Scanner.l +++ b/cpp/src/IceStorm/Scanner.l @@ -33,6 +33,7 @@ WS [ \t\v\f\r] NL [\n] %option noyywrap +%option never-interactive %% diff --git a/cpp/src/IceStorm/Service.cpp b/cpp/src/IceStorm/Service.cpp index 6d5291b0565..99210191015 100644 --- a/cpp/src/IceStorm/Service.cpp +++ b/cpp/src/IceStorm/Service.cpp @@ -7,6 +7,9 @@ // // ********************************************************************** +#include <IceStorm/SubscriberFactory.h> +#include <IceStorm/Flusher.h> +#include <IceStorm/TopicI.h> #include <IceStorm/TopicManagerI.h> #include <IceStorm/TraceLevels.h> #include <IceStorm/Service.h> diff --git a/cpp/src/IceUtil/Base64.cpp b/cpp/src/IceUtil/Base64.cpp index 2c75508a431..0c328e04a1e 100644 --- a/cpp/src/IceUtil/Base64.cpp +++ b/cpp/src/IceUtil/Base64.cpp @@ -9,6 +9,9 @@ #include <IceUtil/Base64.h> #include <iostream> +#ifdef __BCPLUSPLUS__ +# include <iterator> +#endif using namespace std; diff --git a/cpp/src/IceUtil/InputUtil.cpp b/cpp/src/IceUtil/InputUtil.cpp index 527f23e166a..620fa5fe68a 100644 --- a/cpp/src/IceUtil/InputUtil.cpp +++ b/cpp/src/IceUtil/InputUtil.cpp @@ -24,7 +24,7 @@ using namespace std; namespace IceUtil { -#if defined(_MSC_VER) && (_MSC_VER < 1300) +#if defined(__BCPLUSPLUS__) || (defined(_MSC_VER) && (_MSC_VER < 1300)) // // The VC60 runtime does not include _strtoi64, so we provide our own implementation // @@ -176,7 +176,7 @@ Int64 strToInt64(const char* s, char** endptr, int base) { #if defined(_WIN32) -# if defined(_MSC_VER) && (_MSC_VER < 1300) +# if defined(__BCPLUSPLUS__) || (defined(_MSC_VER) && (_MSC_VER < 1300)) return strToInt64Impl(s, endptr, base); # else return _strtoi64(s, endptr, base); diff --git a/cpp/src/IceUtil/Makefile.mak b/cpp/src/IceUtil/Makefile.mak new file mode 100644 index 00000000000..99f3ec1e0a3 --- /dev/null +++ b/cpp/src/IceUtil/Makefile.mak @@ -0,0 +1,64 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = ..\.. + +LIBNAME = $(top_srcdir)\lib\iceutil$(LIBSUFFIX).lib +DLLNAME = $(top_srcdir)\bin\iceutil$(SOVERSION)$(LIBSUFFIX).dll + +TARGETS = $(LIBNAME) $(DLLNAME) + +OBJS = Base64.o \ + Cond.o \ + ConvertUTF.o \ + CountDownLatch.o \ + CtrlCHandler.o \ + Exception.o \ + Shared.o \ + InputUtil.o \ + MD5.o \ + MD5I.o \ + Options.o \ + OutputUtil.o \ + Random.o \ + RWRecMutex.o \ + RecMutex.o \ + StaticMutex.o \ + StringUtil.o \ + Thread.o \ + ThreadException.o \ + Time.o \ + UUID.o \ + Unicode.o + +SRCS = $(OBJS:.o=.cpp) + +!include $(top_srcdir)/config/Make.rules.mak + +CPPFLAGS = $(CPPFLAGS) -DICE_UTIL_API_EXPORTS -I.. +LINKWITH = $(STLPORT_LIBS) $(ICEUTIL_OS_LIBS) + +$(LIBNAME): $(DLLNAME) + +$(DLLNAME): $(OBJS) + del /q $@ + $(LINK) $(LD_DLLFLAGS) $(OBJS), $(DLLNAME),, $(LINKWITH) + move $(DLLNAME:.dll=.lib) $(LIBNAME) + + +install:: all + copy $(LIBNAME) $(install_libdir) + copy $(DLLNAME) $(install_bindir) + +!include .depend + +parser: parser.o + del /q $@ + $(CXX) $(LDFLAGS) -o $@ parser.o $(BASELIBS) + diff --git a/cpp/src/IceUtil/Options.cpp b/cpp/src/IceUtil/Options.cpp index f921cc76890..ccbf4b462e3 100755 --- a/cpp/src/IceUtil/Options.cpp +++ b/cpp/src/IceUtil/Options.cpp @@ -691,7 +691,11 @@ IceUtil::Options::optArg(const string& opt) const } map<string, string>::const_iterator p = _opts.find(opt); - return p == _opts.end() ? "" : p->second; + if(p == _opts.end()) + { + return ""; + } + return p->second; } vector<string> diff --git a/cpp/src/IceUtil/Random.cpp b/cpp/src/IceUtil/Random.cpp index 3daec473553..9713b990932 100644 --- a/cpp/src/IceUtil/Random.cpp +++ b/cpp/src/IceUtil/Random.cpp @@ -19,7 +19,6 @@ using namespace std; - IceUtil::RandomGeneratorException::RandomGeneratorException(const char* file, int line, int error) : Exception(file, line), _error(error) diff --git a/cpp/src/IceUtil/Time.cpp b/cpp/src/IceUtil/Time.cpp index e7b572baed6..6f0ba3d1273 100644 --- a/cpp/src/IceUtil/Time.cpp +++ b/cpp/src/IceUtil/Time.cpp @@ -29,8 +29,13 @@ Time IceUtil::Time::now() { #ifdef _WIN32 +# if defined(_MSC_VER) struct _timeb tb; _ftime(&tb); +# elif defined(__BCPLUSPLUS__) + struct timeb tb; + ftime(&tb); +# endif return Time(static_cast<Int64>(tb.time) * ICE_INT64(1000000) + tb.millitm * 1000); #else diff --git a/cpp/src/IceXML/Makefile.mak b/cpp/src/IceXML/Makefile.mak new file mode 100644 index 00000000000..43af1bf3ab8 --- /dev/null +++ b/cpp/src/IceXML/Makefile.mak @@ -0,0 +1,38 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = ..\.. + +LIBNAME = $(top_srcdir)\lib\icexml$(LIBSUFFIX).lib +DLLNAME = $(top_srcdir)\bin\icexml$(SOVERSION)$(LIBSUFFIX).dll + +TARGETS = $(LIBNAME) $(DLLNAME) + +OBJS = Parser.o + +SRCS = $(OBJS:.o=.cpp) + +!include $(top_srcdir)/config/Make.rules.mak + +CPPFLAGS = $(CPPFLAGS) -DICE_XML_API_EXPORTS + +LINKWITH = $(EXPAT_LIBS) $(BASELIBS) + +$(LIBNAME): $(DLLNAME) + +$(DLLNAME): $(OBJS) + del /q $@ + $(LINK) $(LD_DLLFLAGS) $(OBJS), $(DLLNAME),, $(LINKWITH) + move $(DLLNAME:.dll=.lib) $(LIBNAME) + +install:: all + copy $(LIBNAME) $(install_libdir) + copy $(DLLNAME) $(install_bindir) + +!include .depend diff --git a/cpp/src/IceXML/Parser.cpp b/cpp/src/IceXML/Parser.cpp index 086e3475a0b..71db1bad4ee 100644 --- a/cpp/src/IceXML/Parser.cpp +++ b/cpp/src/IceXML/Parser.cpp @@ -39,7 +39,11 @@ IceXML::ParserException::ice_name() const void IceXML::ParserException::ice_print(std::ostream& out) const { +#ifdef __BCPLUSPLUS__ + IceUtil::Exception::ice_print(out); +#else Exception::ice_print(out); +#endif if(!_reason.empty()) { out << "\n" << _reason; @@ -265,7 +269,7 @@ IceXML::DocumentBuilder::startElement(const string& name, const Attributes& attr NodePtr parent = _nodeStack.front(); Element* element = new Element(parent, name, attributes, line, column); -#if NDEBUG +#ifdef NDEBUG parent->addChild(element); #else assert(parent->addChild(element)); diff --git a/cpp/src/Makefile.mak b/cpp/src/Makefile.mak new file mode 100644 index 00000000000..89d11364a1c --- /dev/null +++ b/cpp/src/Makefile.mak @@ -0,0 +1,41 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = .. + +!include $(top_srcdir)/config/Make.rules.mak + +SUBDIRS = IceUtil \ + Slice \ + slice2cpp \ + slice2cs \ + slice2vb \ + slice2freeze \ + slice2freezej \ + slice2docbook \ + slice2java \ + slice2py \ + slice2cppe \ + slice2javae \ + Ice \ + IceXML \ + IceSSL \ + IceBox \ + IcePatch2 \ + Glacier2 \ + Freeze \ + FreezeScript \ + IceStorm \ + IceGrid \ + ca + +$(EVERYTHING):: + @for %i in ( $(SUBDIRS) ) do \ + @echo "making $@ in %i" & \ + cmd /c "cd %i & $(MAKE) -f Makefile.mak $@" diff --git a/cpp/src/Slice/CsUtil.cpp b/cpp/src/Slice/CsUtil.cpp index 40bc0a5e705..6322c18219c 100755 --- a/cpp/src/Slice/CsUtil.cpp +++ b/cpp/src/Slice/CsUtil.cpp @@ -498,17 +498,17 @@ Slice::CsGenerator::writeMarshalUnmarshalCode(Output &out, if(sz <= 0x7f) { func = marshal ? "writeByte" : "readByte"; - cast = marshal ? "(byte)" : "(" + fixId(en->scoped()) + ")"; + cast = marshal ? string("(byte)") : "(" + fixId(en->scoped()) + ")"; } else if(sz <= 0x7fff) { func = marshal ? "writeShort" : "readShort"; - cast = marshal ? "(short)" : "(" + fixId(en->scoped()) + ")"; + cast = marshal ? string("(short)") : "(" + fixId(en->scoped()) + ")"; } else { func = marshal ? "writeInt" : "readInt"; - cast = marshal ? "(int)" : "(" + fixId(en->scoped()) + ")"; + cast = marshal ? string("(int)") : "(" + fixId(en->scoped()) + ")"; } if(marshal) { diff --git a/cpp/src/Slice/Makefile.mak b/cpp/src/Slice/Makefile.mak new file mode 100644 index 00000000000..9847338b451 --- /dev/null +++ b/cpp/src/Slice/Makefile.mak @@ -0,0 +1,64 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = ..\.. + +LIBNAME = $(top_srcdir)\lib\slice$(LIBSUFFIX).lib +DLLNAME = $(top_srcdir)\bin\slice$(SOVERSION)$(LIBSUFFIX).dll + +TARGETS = $(LIBNAME) $(DLLNAME) + +OBJS = Scanner.o \ + Grammar.o \ + Parser.o \ + CPlusPlusUtil.o \ + CsUtil.o \ + VbUtil.o \ + JavaUtil.o \ + Preprocessor.o \ + Checksum.o \ + PythonUtil.o \ + DotNetNames.o + +SRCS = $(OBJS:.o=.cpp) + +!include $(top_srcdir)/config/Make.rules.mak + +CPPFLAGS = -I.. $(CPPFLAGS) -DSLICE_API_EXPORTS + +$(LIBNAME): $(DLLNAME) + +$(DLLNAME): $(OBJS) + del /q $@ + $(LINK) $(LD_DLLFLAGS) $(OBJS), $(DLLNAME),, $(BASELIBS) + move $(DLLNAME:.dll=.lib) $(LIBNAME) + +Scanner.cpp : Scanner.l + flex $(FLEXFLAGS) Scanner.l + del /q $@ + echo #include "IceUtil/Config.h" > Scanner.cpp + type lex.yy.c >> Scanner.cpp + del /q lex.yy.c + +Grammar.cpp Grammar.h: Grammar.y + del /q Grammar.h Grammar.cpp + bison -dvt --name-prefix "slice_" Grammar.y + move Grammar.tab.c Grammar.cpp + move Grammar.tab.h Grammar.h + del /q Grammar.output + +clean:: + del /q Grammar.cpp Grammar.h + del /q Scanner.cpp + +install:: all + copy $(LIBNAME) $(install_libdir) + copy $(DLLNAME) $(install_bindir) + +!include .depend diff --git a/cpp/src/Slice/Parser.cpp b/cpp/src/Slice/Parser.cpp index 75710f0c86a..305f927d947 100644 --- a/cpp/src/Slice/Parser.cpp +++ b/cpp/src/Slice/Parser.cpp @@ -10,6 +10,9 @@ #include <IceUtil/Functional.h> #include <Slice/Parser.h> #include <Slice/GrammarUtil.h> +#ifdef __BCPLUSPLUS__ +# include <iterator> +#endif using namespace std; using namespace Slice; diff --git a/cpp/src/Slice/PythonUtil.cpp b/cpp/src/Slice/PythonUtil.cpp index 34dffee22a3..a45f817878c 100644 --- a/cpp/src/Slice/PythonUtil.cpp +++ b/cpp/src/Slice/PythonUtil.cpp @@ -10,6 +10,9 @@ #include <Slice/PythonUtil.h> #include <Slice/Checksum.h> #include <IceUtil/Functional.h> +#ifdef __BCPLUSPLUS__ +# include <iterator> +#endif using namespace std; using namespace Slice; diff --git a/cpp/src/Slice/VbUtil.cpp b/cpp/src/Slice/VbUtil.cpp index 1ce6aef391a..8fd115f961e 100755 --- a/cpp/src/Slice/VbUtil.cpp +++ b/cpp/src/Slice/VbUtil.cpp @@ -518,17 +518,17 @@ Slice::VbGenerator::writeMarshalUnmarshalCode(Output &out, if(sz <= 0x7f) { func = marshal ? "writeByte" : "readByte"; - cast = marshal ? "Byte" : fixId(en->scoped()); + cast = marshal ? string("Byte") : fixId(en->scoped()); } else if(sz <= 0x7fff) { func = marshal ? "writeShort" : "readShort"; - cast = marshal ? "Short" : fixId(en->scoped()); + cast = marshal ? string("Short") : fixId(en->scoped()); } else { func = marshal ? "writeInt" : "readInt"; - cast = marshal ? "Integer" : fixId(en->scoped()); + cast = marshal ? string("Integer") : fixId(en->scoped()); } if(marshal) { diff --git a/cpp/src/ca/Makefile b/cpp/src/ca/Makefile index ade4975208f..f80055cd381 100644 --- a/cpp/src/ca/Makefile +++ b/cpp/src/ca/Makefile @@ -11,7 +11,7 @@ top_srcdir = ../.. include $(top_srcdir)/config/Make.rules -CA_FILES = iceca \ +CA_FILES = iceca ImportKey.class install:: diff --git a/cpp/src/ca/Makefile.mak b/cpp/src/ca/Makefile.mak new file mode 100644 index 00000000000..382635b0697 --- /dev/null +++ b/cpp/src/ca/Makefile.mak @@ -0,0 +1,20 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = ..\.. + +!include $(top_srcdir)/config/Make.rules.mak + +CA_FILES = iceca \ + ImportKey.class + +install:: + @for %i in ( $(CA_FILES) ) do \ + @echo "Installing %i" & \ + copy %i $(install_bindir) diff --git a/cpp/src/icecpp/config.h b/cpp/src/icecpp/config.h index 9f947753bcf..88246f9aecd 100644 --- a/cpp/src/icecpp/config.h +++ b/cpp/src/icecpp/config.h @@ -37,7 +37,9 @@ # pragma warning( 4 : 4267 ) # endif # endif -# define alloca _alloca +# ifdef _MSC_VER +# define alloca _alloca +# endif #endif #if defined(__linux) || defined(__FreeBSD__) || defined(__sun) || \ diff --git a/cpp/src/slice2cpp/Gen.cpp b/cpp/src/slice2cpp/Gen.cpp index b8d889059b3..76c5167f616 100644 --- a/cpp/src/slice2cpp/Gen.cpp +++ b/cpp/src/slice2cpp/Gen.cpp @@ -1527,11 +1527,12 @@ Slice::Gen::TypesVisitor::emitUpcall(const ExceptionPtr& base, const string& cal C.zeroIndent(); C << nl << "#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug"; // COMPILERBUG C.restoreIndent(); - C << nl << (base ? fixKwd(base->name()) : (isLocal ? "LocalException" : "UserException")) << call; + C << nl << (base ? fixKwd(base->name()) : string(isLocal ? "LocalException" : "UserException")) << call; C.zeroIndent(); C << nl << "#else"; C.restoreIndent(); - C << nl << (base ? fixKwd(base->scoped()) : (isLocal ? "::Ice::LocalException" : "::Ice::UserException")) << call; + C << nl << (base ? fixKwd(base->scoped()) : string(isLocal ? "::Ice::LocalException" : "::Ice::UserException")) + << call; C.zeroIndent(); C << nl << "#endif"; C.restoreIndent(); @@ -3698,8 +3699,9 @@ Slice::Gen::ObjectVisitor::emitGCInsertCode(const TypePtr& p, const string& pref } C << eb; } - else if(StructPtr s = StructPtr::dynamicCast(p)) + else if(StructPtr::dynamicCast(p)) { + StructPtr s = StructPtr::dynamicCast(p); DataMemberList dml = s->dataMembers(); for(DataMemberList::const_iterator i = dml.begin(); i != dml.end(); ++i) { @@ -3709,8 +3711,9 @@ Slice::Gen::ObjectVisitor::emitGCInsertCode(const TypePtr& p, const string& pref } } } - else if(DictionaryPtr d = DictionaryPtr::dynamicCast(p)) + else if(DictionaryPtr::dynamicCast(p)) { + DictionaryPtr d = DictionaryPtr::dynamicCast(p); string scoped = fixKwd(d->scoped()); ostringstream tmp; tmp << "_i" << level; @@ -3723,8 +3726,9 @@ Slice::Gen::ObjectVisitor::emitGCInsertCode(const TypePtr& p, const string& pref C << eb; C << eb; } - else if(SequencePtr s = SequencePtr::dynamicCast(p)) + else if(SequencePtr::dynamicCast(p)) { + SequencePtr s = SequencePtr::dynamicCast(p); string scoped = fixKwd(s->scoped()); ostringstream tmp; tmp << "_i" << level; @@ -3769,8 +3773,9 @@ Slice::Gen::ObjectVisitor::emitGCClearCode(const TypePtr& p, const string& prefi C << eb; C << eb; } - else if(StructPtr s = StructPtr::dynamicCast(p)) + else if(StructPtr::dynamicCast(p)) { + StructPtr s = StructPtr::dynamicCast(p); DataMemberList dml = s->dataMembers(); for(DataMemberList::const_iterator i = dml.begin(); i != dml.end(); ++i) { @@ -3780,8 +3785,9 @@ Slice::Gen::ObjectVisitor::emitGCClearCode(const TypePtr& p, const string& prefi } } } - else if(DictionaryPtr d = DictionaryPtr::dynamicCast(p)) + else if(DictionaryPtr::dynamicCast(p)) { + DictionaryPtr d = DictionaryPtr::dynamicCast(p); string scoped = fixKwd(d->scoped()); ostringstream tmp; tmp << "_i" << level; @@ -3794,8 +3800,9 @@ Slice::Gen::ObjectVisitor::emitGCClearCode(const TypePtr& p, const string& prefi C << eb; C << eb; } - else if(SequencePtr s = SequencePtr::dynamicCast(p)) + else if(SequencePtr::dynamicCast(p)) { + SequencePtr s = SequencePtr::dynamicCast(p); string scoped = fixKwd(s->scoped()); ostringstream tmp; tmp << "_i" << level; @@ -3916,11 +3923,11 @@ Slice::Gen::ObjectVisitor::emitUpcall(const ClassDefPtr& base, const string& cal C.zeroIndent(); C << nl << "#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug"; // COMPILERBUG C.restoreIndent(); - C << nl << (base ? fixKwd(base->name()) : "Object") << call; + C << nl << (base ? fixKwd(base->name()) : string("Object")) << call; C.zeroIndent(); C << nl << "#else"; C.restoreIndent(); - C << nl << (base ? fixKwd(base->scoped()) : "::Ice::Object") << call; + C << nl << (base ? fixKwd(base->scoped()) : string("::Ice::Object")) << call; C.zeroIndent(); C << nl << "#endif"; C.restoreIndent(); @@ -4974,7 +4981,7 @@ Slice::Gen::AsyncImplVisitor::visitOperation(const OperationPtr& p) C << sp << nl << "IceAsync" << classScopedAMD << '_' << name << "::" << classNameAMD << '_' << name << "(::IceInternal::Incoming& in) :"; C.inc(); - C << nl << "IncomingAsync(in)"; + C << nl << "::IceInternal::IncomingAsync(in)"; C.dec(); C << sb; C << eb; diff --git a/cpp/src/slice2cpp/Main.cpp b/cpp/src/slice2cpp/Main.cpp index 7a59173d5e4..645bce922dd 100644 --- a/cpp/src/slice2cpp/Main.cpp +++ b/cpp/src/slice2cpp/Main.cpp @@ -84,7 +84,7 @@ main(int argc, char* argv[]) vector<string> args; try { - args = opts.parse(argc, argv); + args = opts.parse(argc, (const char**)argv); } catch(const IceUtil::Options::BadOpt& e) { diff --git a/cpp/src/slice2cpp/Makefile.mak b/cpp/src/slice2cpp/Makefile.mak new file mode 100644 index 00000000000..382009e1c51 --- /dev/null +++ b/cpp/src/slice2cpp/Makefile.mak @@ -0,0 +1,32 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = ..\.. + +NAME = $(top_srcdir)\bin\slice2cpp.exe + +TARGETS = $(NAME) + +OBJS = Gen.o \ + Main.o + +SRCS = $(OBJS:.o=.cpp) + +!include $(top_srcdir)/config/Make.rules.mak + +CPPFLAGS = -I. $(CPPFLAGS) + +$(NAME): $(OBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(OBJS), $@,, slice$(LIBSUFFIX).lib $(BASELIBS) + +install:: all + copy $(NAME) $(install_bindir) + +!include .depend diff --git a/cpp/src/slice2cppe/Gen.cpp b/cpp/src/slice2cppe/Gen.cpp index b0c818c3975..88f02188172 100644 --- a/cpp/src/slice2cppe/Gen.cpp +++ b/cpp/src/slice2cppe/Gen.cpp @@ -1186,11 +1186,11 @@ Slice::Gen::TypesVisitor::emitUpcall(const ExceptionPtr& base, const string& cal C.zeroIndent(); C << nl << "#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug"; // COMPILERBUG C.restoreIndent(); - C << nl << (base ? fixKwd(base->name()) : (isLocal ? "LocalException" : "UserException")) << call; + C << nl << (base ? fixKwd(base->name()) : string(isLocal ? "LocalException" : "UserException")) << call; C.zeroIndent(); C << nl << "#else"; C.restoreIndent(); - C << nl << (base ? fixKwd(base->scoped()) : (isLocal ? "::Ice::LocalException" : "::Ice::UserException")) << call; + C << nl << (base ? fixKwd(base->scoped()) : string(isLocal ? "::Ice::LocalException" : "::Ice::UserException")) << call; C.zeroIndent(); C << nl << "#endif"; C.restoreIndent(); @@ -2447,11 +2447,11 @@ Slice::Gen::ObjectVisitor::emitUpcall(const ClassDefPtr& base, const string& cal C.zeroIndent(); C << nl << "#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug"; // COMPILERBUG C.restoreIndent(); - C << nl << (base ? fixKwd(base->name()) : "Object") << call; + C << nl << (base ? fixKwd(base->name()) : string("Object")) << call; C.zeroIndent(); C << nl << "#else"; C.restoreIndent(); - C << nl << (base ? fixKwd(base->scoped()) : "::Ice::Object") << call; + C << nl << (base ? fixKwd(base->scoped()) : string("::Ice::Object")) << call; C.zeroIndent(); C << nl << "#endif"; C.restoreIndent(); diff --git a/cpp/src/slice2cppe/Main.cpp b/cpp/src/slice2cppe/Main.cpp index 125e72f43ab..3d0f7a69850 100644 --- a/cpp/src/slice2cppe/Main.cpp +++ b/cpp/src/slice2cppe/Main.cpp @@ -78,7 +78,7 @@ main(int argc, char* argv[]) vector<string> args; try { - args = opts.parse(argc, argv); + args = opts.parse(argc, (const char**)argv); } catch(const IceUtil::Options::BadOpt& e) { diff --git a/cpp/src/slice2cppe/Makefile.mak b/cpp/src/slice2cppe/Makefile.mak new file mode 100644 index 00000000000..12d1fa48ff4 --- /dev/null +++ b/cpp/src/slice2cppe/Makefile.mak @@ -0,0 +1,32 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = ..\.. + +NAME = $(top_srcdir)\bin\slice2cppe.exe + +TARGETS = $(NAME) + +OBJS = Gen.o \ + Main.o + +SRCS = $(OBJS:.o=.cpp) + +!include $(top_srcdir)/config/Make.rules.mak + +CPPFLAGS = -I. $(CPPFLAGS) + +$(NAME): $(OBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(OBJS), $@,, slice$(LIBSUFFIX).lib $(BASELIBS) + +install:: all + copy $(NAME) $(install_bindir) + +!include .depend diff --git a/cpp/src/slice2cs/Gen.cpp b/cpp/src/slice2cs/Gen.cpp index 12a6642fee5..7680bb8aecf 100755 --- a/cpp/src/slice2cs/Gen.cpp +++ b/cpp/src/slice2cs/Gen.cpp @@ -4147,7 +4147,7 @@ Slice::Gen::DelegateMVisitor::visitClassDefStart(const ClassDefPtr& p) _out << nl << retS << " ret__;"; ContainedPtr contained = ContainedPtr::dynamicCast(ret); _out << nl << "IceInternal.ParamPatcher ret___PP = new IceInternal.ParamPatcher(typeof(" - << retS << "), \"" << (contained? contained->scoped() : "::Ice::Object") << "\");"; + << retS << "), \"" << (contained? contained->scoped() : string("::Ice::Object")) << "\");"; _out << nl << "is__.readObject(ret___PP);"; } else diff --git a/cpp/src/slice2cs/Main.cpp b/cpp/src/slice2cs/Main.cpp index 4c42f058052..ec201f48641 100644 --- a/cpp/src/slice2cs/Main.cpp +++ b/cpp/src/slice2cs/Main.cpp @@ -78,7 +78,7 @@ main(int argc, char* argv[]) vector<string> args; try { - args = opts.parse(argc, argv); + args = opts.parse(argc, (const char**)argv); } catch(const IceUtil::Options::BadOpt& e) { diff --git a/cpp/src/slice2cs/Makefile.mak b/cpp/src/slice2cs/Makefile.mak new file mode 100644 index 00000000000..bd5bb52c94b --- /dev/null +++ b/cpp/src/slice2cs/Makefile.mak @@ -0,0 +1,32 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = ..\.. + +NAME = $(top_srcdir)\bin\slice2cs.exe + +TARGETS = $(NAME) + +OBJS = Gen.o \ + Main.o + +SRCS = $(OBJS:.o=.cpp) + +!include $(top_srcdir)/config/Make.rules.mak + +CPPFLAGS = -I. $(CPPFLAGS) + +$(NAME): $(OBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(OBJS), $@,, slice$(LIBSUFFIX).lib $(BASELIBS) + +install:: all + copy $(NAME) $(install_bindir) + +!include .depend diff --git a/cpp/src/slice2docbook/Gen.cpp b/cpp/src/slice2docbook/Gen.cpp index 4d4a595f2a1..6d9cf83478b 100644 --- a/cpp/src/slice2docbook/Gen.cpp +++ b/cpp/src/slice2docbook/Gen.cpp @@ -11,6 +11,10 @@ #include <IceUtil/Functional.h> #include <Gen.h> +#ifdef __BCPLUSPLUS__ +# include <iterator> +#endif + using namespace std; using namespace Slice; using namespace IceUtil; @@ -513,7 +517,7 @@ Slice::Gen::visitClassDefStart(const ClassDefPtr& p) O << nl << "<synopsis>"; printMetaData(*q); TypePtr returnType = (*q)->returnType(); - O << (returnType ? toString(returnType, p) : "<type>void</type>") << " <function>" << (*q)->name() + O << (returnType ? toString(returnType, p) : string("<type>void</type>")) << " <function>" << (*q)->name() << "</function>("; O.inc(); ParamDeclList paramList = (*q)->parameters(); diff --git a/cpp/src/slice2docbook/Main.cpp b/cpp/src/slice2docbook/Main.cpp index cbce4b99090..228ed36ff16 100644 --- a/cpp/src/slice2docbook/Main.cpp +++ b/cpp/src/slice2docbook/Main.cpp @@ -73,7 +73,7 @@ main(int argc, char* argv[]) vector<string> args; try { - args = opts.parse(argc, argv); + args = opts.parse(argc, (const char**)argv); } catch(const IceUtil::Options::BadOpt& e) { diff --git a/cpp/src/slice2docbook/Makefile.mak b/cpp/src/slice2docbook/Makefile.mak new file mode 100644 index 00000000000..8fd8b7870aa --- /dev/null +++ b/cpp/src/slice2docbook/Makefile.mak @@ -0,0 +1,32 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = ..\.. + +NAME = $(top_srcdir)\bin\slice2docbook.exe + +TARGETS = $(NAME) + +OBJS = Gen.o \ + Main.o + +SRCS = $(OBJS:.o=.cpp) + +!include $(top_srcdir)/config/Make.rules.mak + +CPPFLAGS = -I. $(CPPFLAGS) + +$(NAME): $(OBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(OBJS), $@,, slice$(LIBSUFFIX).lib $(BASELIBS) + +install:: all + copy $(NAME) $(install_bindir) + +!include .depend diff --git a/cpp/src/slice2freeze/Main.cpp b/cpp/src/slice2freeze/Main.cpp index 8c051ecdb55..12e31fd74aa 100644 --- a/cpp/src/slice2freeze/Main.cpp +++ b/cpp/src/slice2freeze/Main.cpp @@ -457,7 +457,7 @@ writeDictWithIndicesH(const string& name, const Dict& dict, << capitalizedMembers[i] << "(" << inputTypeToString(indexTypes[i].type, false, indexTypes[i].metaData) << ") const;"; - string countFunction = dict.indices[i].member.empty() ? "valueCount" + string countFunction = dict.indices[i].member.empty() ? string("valueCount") : dict.indices[i].member + "Count"; H << nl << "int " << countFunction @@ -745,7 +745,7 @@ writeDictWithIndicesC(const string& name, const string& absolute, const Dict& di << "(__index), upperBoundFor" << capitalizedMembers[i] << "(__index));"; C << eb; - string countFunction = dict.indices[i].member.empty() ? "valueCount" + string countFunction = dict.indices[i].member.empty() ? string("valueCount") : dict.indices[i].member + "Count"; C << sp << nl << "int" @@ -1213,7 +1213,7 @@ main(int argc, char* argv[]) vector<string> args; try { - args = opts.parse(argc, argv); + args = opts.parse(argc, (const char**)argv); } catch(const IceUtil::Options::BadOpt& e) { diff --git a/cpp/src/slice2freeze/Makefile.mak b/cpp/src/slice2freeze/Makefile.mak new file mode 100644 index 00000000000..40c04e02d1f --- /dev/null +++ b/cpp/src/slice2freeze/Makefile.mak @@ -0,0 +1,31 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = ..\.. + +NAME = $(top_srcdir)\bin\slice2freeze.exe + +TARGETS = $(NAME) + +OBJS = Main.o + +SRCS = $(OBJS:.o=.cpp) + +!include $(top_srcdir)/config/Make.rules.mak + +CPPFLAGS = -I. $(CPPFLAGS) + +$(NAME): $(OBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(OBJS), $@,, slice$(LIBSUFFIX).lib $(BASELIBS) + +install:: all + copy $(NAME) $(install_bindir) + +!include .depend diff --git a/cpp/src/slice2freezej/Main.cpp b/cpp/src/slice2freezej/Main.cpp index 7efb1e5aeb1..70d31cc442f 100644 --- a/cpp/src/slice2freezej/Main.cpp +++ b/cpp/src/slice2freezej/Main.cpp @@ -11,6 +11,10 @@ #include <Slice/Preprocessor.h> #include <Slice/JavaUtil.h> +#ifdef __BCPLUSPLUS__ +# include <iterator> +#endif + using namespace std; using namespace Slice; using namespace IceUtil; @@ -421,7 +425,7 @@ FreezeGenerator::generate(UnitPtr& u, const Dict& dict) out << eb; string countMethod = dict.indices[i].member.empty() ? - "valueCount" : dict.indices[i].member + "Count"; + string("valueCount") : dict.indices[i].member + "Count"; out << sp << nl << "public int"; out << nl << countMethod << "(" << typeToString(indexTypes[i], TypeModeIn) << " __index)"; @@ -1103,7 +1107,7 @@ main(int argc, char* argv[]) vector<string> args; try { - args = opts.parse(argc, argv); + args = opts.parse(argc, (const char**)argv); } catch(const IceUtil::Options::BadOpt& e) { diff --git a/cpp/src/slice2freezej/Makefile.mak b/cpp/src/slice2freezej/Makefile.mak new file mode 100644 index 00000000000..e0bcf11123d --- /dev/null +++ b/cpp/src/slice2freezej/Makefile.mak @@ -0,0 +1,31 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = ..\.. + +NAME = $(top_srcdir)\bin\slice2freezej.exe + +TARGETS = $(NAME) + +OBJS = Main.o + +SRCS = $(OBJS:.o=.cpp) + +!include $(top_srcdir)/config/Make.rules.mak + +CPPFLAGS = -I. $(CPPFLAGS) + +$(NAME): $(OBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(OBJS), $@,, slice$(LIBSUFFIX).lib $(BASELIBS) + +install:: all + copy $(NAME) $(install_bindir) + +!include .depend diff --git a/cpp/src/slice2java/Gen.cpp b/cpp/src/slice2java/Gen.cpp index 16792718e7f..335e41439ee 100644 --- a/cpp/src/slice2java/Gen.cpp +++ b/cpp/src/slice2java/Gen.cpp @@ -1365,7 +1365,7 @@ Slice::Gen::TieVisitor::visitClassDefStart(const ClassDefPtr& p) } out << sp; - out << nl << "public " << (hasAMD ? "void" : retS) << nl << opName << spar << params; + out << nl << "public " << (hasAMD ? string("void") : retS) << nl << opName << spar << params; if(!p->isLocal()) { out << "Ice.Current __current"; diff --git a/cpp/src/slice2java/Main.cpp b/cpp/src/slice2java/Main.cpp index efa0aab8be1..4b65540c5f4 100644 --- a/cpp/src/slice2java/Main.cpp +++ b/cpp/src/slice2java/Main.cpp @@ -11,6 +11,10 @@ #include <Slice/Preprocessor.h> #include <Gen.h> +#ifdef __BCPLUSPLUS__ +# include <iterator> +#endif + using namespace std; using namespace Slice; @@ -81,7 +85,7 @@ main(int argc, char* argv[]) vector<string>args; try { - args = opts.parse(argc, argv); + args = opts.parse(argc, (const char**)argv); } catch(const IceUtil::Options::BadOpt& e) { diff --git a/cpp/src/slice2java/Makefile.mak b/cpp/src/slice2java/Makefile.mak new file mode 100644 index 00000000000..ef6811248df --- /dev/null +++ b/cpp/src/slice2java/Makefile.mak @@ -0,0 +1,32 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = ..\.. + +NAME = $(top_srcdir)\bin\slice2java.exe + +TARGETS = $(NAME) + +OBJS = Gen.o \ + Main.o + +SRCS = $(OBJS:.o=.cpp) + +!include $(top_srcdir)/config/Make.rules.mak + +CPPFLAGS = -I. $(CPPFLAGS) + +$(NAME): $(OBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(OBJS), $@,, slice$(LIBSUFFIX).lib $(BASELIBS) + +install:: all + copy $(NAME) $(install_bindir) + +!include .depend diff --git a/cpp/src/slice2javae/Main.cpp b/cpp/src/slice2javae/Main.cpp index 3cace01643f..b9c05a9f0d7 100644 --- a/cpp/src/slice2javae/Main.cpp +++ b/cpp/src/slice2javae/Main.cpp @@ -72,7 +72,7 @@ main(int argc, char* argv[]) vector<string>args; try { - args = opts.parse(argc, argv); + args = opts.parse(argc, (const char**)argv); } catch(const IceUtil::Options::BadOpt& e) { diff --git a/cpp/src/slice2javae/Makefile.mak b/cpp/src/slice2javae/Makefile.mak new file mode 100644 index 00000000000..fdf5cdf8ecc --- /dev/null +++ b/cpp/src/slice2javae/Makefile.mak @@ -0,0 +1,32 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = ..\.. + +NAME = $(top_srcdir)\bin\slice2javae.exe + +TARGETS = $(NAME) + +OBJS = Gen.o \ + Main.o + +SRCS = $(OBJS:.o=.cpp) + +!include $(top_srcdir)/config/Make.rules.mak + +CPPFLAGS = -I. $(CPPFLAGS) + +$(NAME): $(OBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(OBJS), $@,, slice$(LIBSUFFIX).lib $(BASELIBS) + +install:: all + copy $(NAME) $(install_bindir) + +!include .depend diff --git a/cpp/src/slice2py/Main.cpp b/cpp/src/slice2py/Main.cpp index 5b625547355..921448ba32b 100644 --- a/cpp/src/slice2py/Main.cpp +++ b/cpp/src/slice2py/Main.cpp @@ -415,7 +415,7 @@ main(int argc, char* argv[]) vector<string> args; try { - args = opts.parse(argc, argv); + args = opts.parse(argc, (const char**)argv); } catch(const IceUtil::Options::BadOpt& e) { diff --git a/cpp/src/slice2py/Makefile.mak b/cpp/src/slice2py/Makefile.mak new file mode 100644 index 00000000000..ace0362ff91 --- /dev/null +++ b/cpp/src/slice2py/Makefile.mak @@ -0,0 +1,31 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = ..\.. + +NAME = $(top_srcdir)\bin\slice2py.exe + +TARGETS = $(NAME) + +OBJS = Main.o + +SRCS = $(OBJS:.o=.cpp) + +!include $(top_srcdir)/config/Make.rules.mak + +CPPFLAGS = -I. $(CPPFLAGS) + +$(NAME): $(OBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(OBJS), $@,, slice$(LIBSUFFIX).lib $(BASELIBS) + +install:: all + copy $(NAME) $(install_bindir) + +!include .depend diff --git a/cpp/src/slice2vb/Gen.cpp b/cpp/src/slice2vb/Gen.cpp index ed0a1a92632..59b868efe27 100755 --- a/cpp/src/slice2vb/Gen.cpp +++ b/cpp/src/slice2vb/Gen.cpp @@ -4595,7 +4595,7 @@ Slice::Gen::DelegateMVisitor::visitClassDefStart(const ClassDefPtr& p) ContainedPtr contained = ContainedPtr::dynamicCast(ret); _out << nl << "Dim ret__ As " << retS << " = Nothing"; _out << nl << "Dim ret___PP As IceInternal.ParamPatcher = New IceInternal.ParamPatcher(GetType(" - << retS << "), \"" << (contained ? contained->scoped() : "::Ice::Object") << "\")"; + << retS << "), \"" << (contained ? contained->scoped() : string("::Ice::Object")) << "\")"; _out << nl << "is__.readObject(ret___PP)"; } else diff --git a/cpp/src/slice2vb/Main.cpp b/cpp/src/slice2vb/Main.cpp index 60d7591057b..42f42d57f46 100644 --- a/cpp/src/slice2vb/Main.cpp +++ b/cpp/src/slice2vb/Main.cpp @@ -78,7 +78,7 @@ main(int argc, char* argv[]) vector<string>args; try { - args = opts.parse(argc, argv); + args = opts.parse(argc, (const char**)argv); } catch(const IceUtil::Options::BadOpt& e) { diff --git a/cpp/src/slice2vb/Makefile.mak b/cpp/src/slice2vb/Makefile.mak new file mode 100644 index 00000000000..8fd3bc341d6 --- /dev/null +++ b/cpp/src/slice2vb/Makefile.mak @@ -0,0 +1,32 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = ..\.. + +NAME = $(top_srcdir)\bin\slice2vb.exe + +TARGETS = $(NAME) + +OBJS = Gen.o \ + Main.o + +SRCS = $(OBJS:.o=.cpp) + +!include $(top_srcdir)/config/Make.rules.mak + +CPPFLAGS = -I. $(CPPFLAGS) + +$(NAME): $(OBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(OBJS), $@,, slice$(LIBSUFFIX).lib $(BASELIBS) + +install:: all + copy $(NAME) $(install_bindir) + +!include .depend diff --git a/cpp/test/Freeze/Makefile.mak b/cpp/test/Freeze/Makefile.mak new file mode 100644 index 00000000000..99683d4b25a --- /dev/null +++ b/cpp/test/Freeze/Makefile.mak @@ -0,0 +1,22 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = ..\.. + +!include $(top_srcdir)\config\Make.rules.mak + +SUBDIRS = dbmap \ + complex \ + evictor \ + oldevictor + +$(EVERYTHING):: + @for %i in ( $(SUBDIRS) ) do \ + @echo "making $@ in %i" & \ + cmd /c "cd %i & $(MAKE) -f Makefile.mak $@" diff --git a/cpp/test/Freeze/complex/Makefile.mak b/cpp/test/Freeze/complex/Makefile.mak new file mode 100644 index 00000000000..aab63f49105 --- /dev/null +++ b/cpp/test/Freeze/complex/Makefile.mak @@ -0,0 +1,67 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = ..\..\.. + +CLIENT = client.exe + +TARGETS = $(CLIENT) + +OBJS = ComplexDict.o \ + Complex.o \ + Grammar.o \ + Scanner.o \ + Parser.o \ + Client.o + +SRCS = $(OBJS:.o=.cpp) + +!include $(top_srcdir)\config\Make.rules.mak + +CPPFLAGS = -I. -I../../include $(CPPFLAGS) + +$(CLIENT): $(OBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(OBJS), $@,, $(LIBS) freeze$(LIBSUFFIX).lib + +ComplexDict.h ComplexDict.cpp: Complex.ice $(SLICE2FREEZE) + del /q ComplexDict.h ComplexDict.cpp + $(SLICE2FREEZE) -I$(slicedir) --dict Complex::ComplexDict,Complex::Key,Complex::Node ComplexDict Complex.ice + +Complex.cpp Complex.h: Complex.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) $(SLICE2CPPFLAGS) Complex.ice + +Scanner.cpp : Scanner.l + flex $(FLEXFLAGS) Scanner.l + del /q $@ + echo #include "IceUtil/Config.h" > Scanner.cpp + type lex.yy.c >> Scanner.cpp + del /q lex.yy.c + +Grammar.cpp Grammar.h: Grammar.y + del /q Grammar.h Grammar.cpp + bison -dvt Grammar.y + move Grammar.tab.c Grammar.cpp + move Grammar.tab.h Grammar.h + del /q Grammar.output + +clean:: + del /q ComplexDict.h ComplexDict.cpp + +clean:: + del /q Complex.cpp Complex.h + +clean:: + del /q Grammar.cpp Grammar.h + del /q Scanner.cpp + +clean:: + del /q db\test db\log.* + +!include .depend diff --git a/cpp/test/Freeze/complex/Parser.h b/cpp/test/Freeze/complex/Parser.h index 99b5875ac10..dae4e2bf479 100644 --- a/cpp/test/Freeze/complex/Parser.h +++ b/cpp/test/Freeze/complex/Parser.h @@ -14,11 +14,11 @@ #ifdef _WIN32 # include <io.h> -# define isatty _isatty -# define fileno _fileno -// '_isatty' : inconsistent dll linkage. dllexport assumed. # ifdef _MSC_VER -# pragma warning( disable : 4273 ) +# define isatty _isatty +# define fileno _fileno +// '_isatty' : inconsistent dll linkage. dllexport assumed. +# pragma warning( disable : 4273 ) # endif #endif diff --git a/cpp/test/Freeze/complex/Scanner.l b/cpp/test/Freeze/complex/Scanner.l index a7be0518e90..ceda73fc60f 100644 --- a/cpp/test/Freeze/complex/Scanner.l +++ b/cpp/test/Freeze/complex/Scanner.l @@ -34,6 +34,7 @@ NL [\n] DIGIT [0-9] %option noyywrap +%option never-interactive %% diff --git a/cpp/test/Freeze/dbmap/Makefile.mak b/cpp/test/Freeze/dbmap/Makefile.mak new file mode 100644 index 00000000000..b2f95f452b4 --- /dev/null +++ b/cpp/test/Freeze/dbmap/Makefile.mak @@ -0,0 +1,59 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = ..\..\.. + +CLIENT = client.exe + +TARGETS = $(CLIENT) + +OBJS = Client.o \ + ByteIntMap.o \ + IntIdentityMap.o \ + IntIdentityMapWithIndex.o \ + SortedMap.o \ + WstringWstringMap.o + +SRCS = $(OBJS:.o=.cpp) + +!include $(top_srcdir)\config\Make.rules.mak + +CPPFLAGS = -I. -I..\..\include $(CPPFLAGS) + +$(CLIENT): $(OBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(OBJS), $@,, $(LIBS) freeze$(LIBSUFFIX).lib + +ByteIntMap.h ByteIntMap.cpp: $(SLICE2FREEZE) + del /q ByteIntMap.h ByteIntMap.cpp + $(SLICE2FREEZE) --dict Test::ByteIntMap,byte,int --dict-index Test::ByteIntMap ByteIntMap + +IntIdentityMap.h IntIdentityMap.cpp: $(SLICE2FREEZE) + del /q IntIdentityMap.h IntIdentityMap.cpp + $(SLICE2FREEZE) --ice $(SLICE2CPPFLAGS) --dict Test::IntIdentityMap,int,Ice::Identity IntIdentityMap $(slicedir)\Ice\Identity.ice + +IntIdentityMapWithIndex.h IntIdentityMapWithIndex.cpp: $(SLICE2FREEZE) + del /q IntIdentityMapWithIndex.h IntIdentityMapWithIndex.cpp + $(SLICE2FREEZE) --ice $(SLICE2CPPFLAGS) --dict Test::IntIdentityMapWithIndex,int,Ice::Identity --dict-index Test::IntIdentityMapWithIndex,category IntIdentityMapWithIndex $(slicedir)\Ice\Identity.ice + +SortedMap.h SortedMap.cpp: $(SLICE2FREEZE) + del /q SortedMap.h SortedMap.cpp + $(SLICE2FREEZE) --ice $(SLICE2CPPFLAGS) --dict Test::SortedMap,int,Ice::Identity,sort SortedMap --dict-index "Test::SortedMap,category,sort,std::greater<std::string>" $(slicedir)\Ice\Identity.ice + +WstringWstringMap.h WstringWstringMap.cpp: $(SLICE2FREEZE) + del /q WstringWstringMap.h WstringWstringMap.cpp + $(SLICE2FREEZE) --dict Test::WstringWstringMap,[\"cpp:type:wstring\"]string,[\"cpp:type:wstring\"]string --dict-index Test::WstringWstringMap WstringWstringMap + +clean:: + del /q ByteIntMap.h ByteIntMap.cpp IntIdentityMap.h IntIdentityMap.cpp IntIdentityMapWithIndex.h IntIdentityMapWithIndex.cpp SortedMap.h SortedMap.cpp WstringWstringMap.h WstringWstringMap.cpp + +clean:: + del /q db\binary db\binary.* db\intIdentity db\intIdentity.* db\__catalog db\log.* + +!include .depend diff --git a/cpp/test/Freeze/evictor/Makefile.mak b/cpp/test/Freeze/evictor/Makefile.mak new file mode 100644 index 00000000000..037a32ec16f --- /dev/null +++ b/cpp/test/Freeze/evictor/Makefile.mak @@ -0,0 +1,49 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = ..\..\.. + +CLIENT = client.exe +SERVER = server.exe + +TARGETS = $(CLIENT) $(SERVER) + +OBJS = Test.o + +COBJS = Client.o + +SOBJS = TestI.o \ + Server.o + +SRCS = $(OBJS:.o=.cpp) \ + $(COBJS:.o=.cpp) \ + $(SOBJS:.o=.cpp) + +!include $(top_srcdir)/config/Make.rules.mak + +CPPFLAGS = -I. -I../../include $(CPPFLAGS) + +$(CLIENT): $(OBJS) $(COBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(OBJS) $(COBJS), $@,, $(LIBS) + +$(SERVER): $(OBJS) $(SOBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(OBJS) $(SOBJS), $@,, $(LIBS) freeze$(LIBSUFFIX).lib + +Test.cpp Test.h: Test.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) $(SLICE2CPPFLAGS) Test.ice + +clean:: + del /q Test.cpp Test.h + +clean:: + del /q db\Test db\log.* + +!include .depend diff --git a/cpp/test/Freeze/evictor/TestI.cpp b/cpp/test/Freeze/evictor/TestI.cpp index 81dfc619407..7c8fbcb90b0 100644 --- a/cpp/test/Freeze/evictor/TestI.cpp +++ b/cpp/test/Freeze/evictor/TestI.cpp @@ -62,7 +62,7 @@ Test::ServantI::init(const RemoteEvictorIPtr& remoteEvictor, const Freeze::Evict Int Test::ServantI::getValue(const Current&) const { - Lock sync(*this); + Mutex::Lock sync(*this); return value; } @@ -70,7 +70,7 @@ Int Test::ServantI::slowGetValue(const Current&) const { IceUtil::ThreadControl::sleep(IceUtil::Time::seconds(1)); - Lock sync(*this); + Mutex::Lock sync(*this); return value; } @@ -79,7 +79,7 @@ Test::ServantI::slowGetValue_async(const AMD_Servant_slowGetValuePtr& cb, const Current&) const { IceUtil::ThreadControl::sleep(IceUtil::Time::seconds(1)); - Lock sync(*this); + Mutex::Lock sync(*this); (new DelayedResponse(cb, value))->start().detach(); } @@ -87,7 +87,7 @@ Test::ServantI::slowGetValue_async(const AMD_Servant_slowGetValuePtr& cb, void Test::ServantI::setValue(Int val, const Current&) { - Lock sync(*this); + Mutex::Lock sync(*this); value = val; } @@ -95,7 +95,7 @@ Test::ServantI::setValue(Int val, const Current&) void Test::ServantI::setValueAsync_async(const AMD_Servant_setValueAsyncPtr& __cb, Int value, const Current&) { - Lock sync(*this); + Mutex::Lock sync(*this); _setValueAsyncCB = __cb; _setValueAsyncValue = value; } @@ -105,7 +105,7 @@ Test::ServantI::releaseAsync(const Current& current) const { if(_setValueAsyncCB) { - Lock sync(*this); + Mutex::Lock sync(*this); const_cast<Int&>(value) = _setValueAsyncValue; _setValueAsyncCB->ice_response(); const_cast<AMD_Servant_setValueAsyncPtr&>(_setValueAsyncCB) = 0; @@ -144,14 +144,14 @@ Test::ServantI::removeFacet(const string& name, const Current& current) const Ice::Int Test::ServantI::getTransientValue(const Current& current) const { - Lock sync(*this); + Mutex::Lock sync(*this); return _transientValue; } void Test::ServantI::setTransientValue(Ice::Int val, const Current& current) { - Lock sync(*this); + Mutex::Lock sync(*this); _transientValue = val; } @@ -202,14 +202,14 @@ Test::FacetI::FacetI(const RemoteEvictorIPtr& remoteEvictor, const Freeze::Evict string Test::FacetI::getData(const Current&) const { - Lock sync(*this); + Mutex::Lock sync(*this); return data; } void Test::FacetI::setData(const string& d, const Current&) { - Lock sync(*this); + Mutex::Lock sync(*this); data = d; } diff --git a/cpp/test/Freeze/oldevictor/Makefile.mak b/cpp/test/Freeze/oldevictor/Makefile.mak new file mode 100644 index 00000000000..037a32ec16f --- /dev/null +++ b/cpp/test/Freeze/oldevictor/Makefile.mak @@ -0,0 +1,49 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = ..\..\.. + +CLIENT = client.exe +SERVER = server.exe + +TARGETS = $(CLIENT) $(SERVER) + +OBJS = Test.o + +COBJS = Client.o + +SOBJS = TestI.o \ + Server.o + +SRCS = $(OBJS:.o=.cpp) \ + $(COBJS:.o=.cpp) \ + $(SOBJS:.o=.cpp) + +!include $(top_srcdir)/config/Make.rules.mak + +CPPFLAGS = -I. -I../../include $(CPPFLAGS) + +$(CLIENT): $(OBJS) $(COBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(OBJS) $(COBJS), $@,, $(LIBS) + +$(SERVER): $(OBJS) $(SOBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(OBJS) $(SOBJS), $@,, $(LIBS) freeze$(LIBSUFFIX).lib + +Test.cpp Test.h: Test.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) $(SLICE2CPPFLAGS) Test.ice + +clean:: + del /q Test.cpp Test.h + +clean:: + del /q db\Test db\log.* + +!include .depend diff --git a/cpp/test/Freeze/oldevictor/TestI.cpp b/cpp/test/Freeze/oldevictor/TestI.cpp index 81dfc619407..7c8fbcb90b0 100644 --- a/cpp/test/Freeze/oldevictor/TestI.cpp +++ b/cpp/test/Freeze/oldevictor/TestI.cpp @@ -62,7 +62,7 @@ Test::ServantI::init(const RemoteEvictorIPtr& remoteEvictor, const Freeze::Evict Int Test::ServantI::getValue(const Current&) const { - Lock sync(*this); + Mutex::Lock sync(*this); return value; } @@ -70,7 +70,7 @@ Int Test::ServantI::slowGetValue(const Current&) const { IceUtil::ThreadControl::sleep(IceUtil::Time::seconds(1)); - Lock sync(*this); + Mutex::Lock sync(*this); return value; } @@ -79,7 +79,7 @@ Test::ServantI::slowGetValue_async(const AMD_Servant_slowGetValuePtr& cb, const Current&) const { IceUtil::ThreadControl::sleep(IceUtil::Time::seconds(1)); - Lock sync(*this); + Mutex::Lock sync(*this); (new DelayedResponse(cb, value))->start().detach(); } @@ -87,7 +87,7 @@ Test::ServantI::slowGetValue_async(const AMD_Servant_slowGetValuePtr& cb, void Test::ServantI::setValue(Int val, const Current&) { - Lock sync(*this); + Mutex::Lock sync(*this); value = val; } @@ -95,7 +95,7 @@ Test::ServantI::setValue(Int val, const Current&) void Test::ServantI::setValueAsync_async(const AMD_Servant_setValueAsyncPtr& __cb, Int value, const Current&) { - Lock sync(*this); + Mutex::Lock sync(*this); _setValueAsyncCB = __cb; _setValueAsyncValue = value; } @@ -105,7 +105,7 @@ Test::ServantI::releaseAsync(const Current& current) const { if(_setValueAsyncCB) { - Lock sync(*this); + Mutex::Lock sync(*this); const_cast<Int&>(value) = _setValueAsyncValue; _setValueAsyncCB->ice_response(); const_cast<AMD_Servant_setValueAsyncPtr&>(_setValueAsyncCB) = 0; @@ -144,14 +144,14 @@ Test::ServantI::removeFacet(const string& name, const Current& current) const Ice::Int Test::ServantI::getTransientValue(const Current& current) const { - Lock sync(*this); + Mutex::Lock sync(*this); return _transientValue; } void Test::ServantI::setTransientValue(Ice::Int val, const Current& current) { - Lock sync(*this); + Mutex::Lock sync(*this); _transientValue = val; } @@ -202,14 +202,14 @@ Test::FacetI::FacetI(const RemoteEvictorIPtr& remoteEvictor, const Freeze::Evict string Test::FacetI::getData(const Current&) const { - Lock sync(*this); + Mutex::Lock sync(*this); return data; } void Test::FacetI::setData(const string& d, const Current&) { - Lock sync(*this); + Mutex::Lock sync(*this); data = d; } diff --git a/cpp/test/FreezeScript/Makefile.mak b/cpp/test/FreezeScript/Makefile.mak new file mode 100644 index 00000000000..41d291c26c5 --- /dev/null +++ b/cpp/test/FreezeScript/Makefile.mak @@ -0,0 +1,19 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = ..\.. + +!include $(top_srcdir)\config\Make.rules.mak + +SUBDIRS = dbmap evictor + +$(EVERYTHING):: + @for %i in ( $(SUBDIRS) ) do \ + @echo "making $@ in %i" & \ + cmd /c "cd %i & $(MAKE) -f Makefile.mak $@" diff --git a/cpp/test/FreezeScript/dbmap/Makefile.mak b/cpp/test/FreezeScript/dbmap/Makefile.mak new file mode 100644 index 00000000000..a0308ad5d4e --- /dev/null +++ b/cpp/test/FreezeScript/dbmap/Makefile.mak @@ -0,0 +1,48 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = ..\..\.. + +CLIENT = makedb.exe + +TARGETS = $(CLIENT) + +OBJS = TestOld.o \ + makedb.o \ + IntSMap.o + +SRCS = $(OBJS:.o=.cpp) + +SLICE_SRCS = TestOld.ice + +!include $(top_srcdir)/config/Make.rules.mak + +CPPFLAGS = -I. $(CPPFLAGS) + +$(CLIENT): $(OBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(OBJS), $@,, $(LIBS) freeze$(LIBSUFFIX).lib + +IntSMap.h IntSMap.cpp: $(SLICE2FREEZE) + del /q IntSMap.h IntSMap.cpp + $(SLICE2FREEZE) --dict IntSMap,int,::Test::S IntSMap TestOld.ice + +TestOld.cpp TestOld.h: TestOld.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) $(SLICE2CPPFLAGS) TestOld.ice + +clean:: + del /q IntSMap.h IntSMap.cpp + +clean:: + del /q TestOld.cpp TestOld.h + +clean:: + del /q db\*.db db\log.* db\__catalog + +!include .depend diff --git a/cpp/test/FreezeScript/evictor/Makefile.mak b/cpp/test/FreezeScript/evictor/Makefile.mak new file mode 100644 index 00000000000..345ce95e0b3 --- /dev/null +++ b/cpp/test/FreezeScript/evictor/Makefile.mak @@ -0,0 +1,40 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = ..\..\.. + +CLIENT = makedb.exe + +TARGETS = $(CLIENT) + +OBJS = TestOld.o \ + makedb.o + +SRCS = $(OBJS:.o=.cpp) + +SLICE_SRCS = TestOld.ice + +!include $(top_srcdir)/config/Make.rules.mak + +CPPFLAGS = -I. $(CPPFLAGS) + +$(CLIENT): $(OBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(OBJS), $@,, $(LIBS) freeze$(LIBSUFFIX).lib + +TestOld.cpp TestOld.h: TestOld.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) $(SLICE2CPPFLAGS) TestOld.ice + +clean:: + del /q TestOld.cpp TestOld.h + +clean:: + del /q db\*.db db\log.* db\__catalog + +!include .depend diff --git a/cpp/test/Glacier2/Makefile.mak b/cpp/test/Glacier2/Makefile.mak new file mode 100644 index 00000000000..ae68f563e55 --- /dev/null +++ b/cpp/test/Glacier2/Makefile.mak @@ -0,0 +1,24 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = ..\.. + +!include $(top_srcdir)\config\Make.rules.mak + +SUBDIRS = router \ + attack \ + filters \ + addressFilter \ + sessionControl \ + ssl + +$(EVERYTHING):: + @for %i in ( $(SUBDIRS) ) do \ + @echo "making $@ in %i" & \ + cmd /c "cd %i & $(MAKE) -f Makefile.mak $@" diff --git a/cpp/test/Glacier2/addressFilter/Makefile.mak b/cpp/test/Glacier2/addressFilter/Makefile.mak new file mode 100644 index 00000000000..0f28ec1a5d3 --- /dev/null +++ b/cpp/test/Glacier2/addressFilter/Makefile.mak @@ -0,0 +1,46 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = ..\..\.. + +CLIENT = client.exe +SERVER = server.exe + +TARGETS = $(CLIENT) $(SERVER) + +OBJS = Backend.o \ + BackendI.o + +COBJS = Client.o + +SOBJS = Server.o + +SRCS = $(OBJS:.o=.cpp) \ + $(COBJS:.o=.cpp) \ + $(SOBJS:.o=.cpp) + +!include $(top_srcdir)/config/Make.rules.mak + +CPPFLAGS = -I. -I../../include $(CPPFLAGS) + +$(CLIENT): $(OBJS) $(COBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(OBJS) $(COBJS), $@,, $(LIBS) glacier2$(LIBSUFFIX).lib + +$(SERVER): $(OBJS) $(SOBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(OBJS) $(SOBJS), $@,, $(LIBS) + +Backend.cpp Backend.h: Backend.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) $(SLICE2CPPFLAGS) Backend.ice + +clean:: + del /q Backend.cpp Backend.h + +!include .depend diff --git a/cpp/test/Glacier2/attack/Makefile.mak b/cpp/test/Glacier2/attack/Makefile.mak new file mode 100644 index 00000000000..0f28ec1a5d3 --- /dev/null +++ b/cpp/test/Glacier2/attack/Makefile.mak @@ -0,0 +1,46 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = ..\..\.. + +CLIENT = client.exe +SERVER = server.exe + +TARGETS = $(CLIENT) $(SERVER) + +OBJS = Backend.o \ + BackendI.o + +COBJS = Client.o + +SOBJS = Server.o + +SRCS = $(OBJS:.o=.cpp) \ + $(COBJS:.o=.cpp) \ + $(SOBJS:.o=.cpp) + +!include $(top_srcdir)/config/Make.rules.mak + +CPPFLAGS = -I. -I../../include $(CPPFLAGS) + +$(CLIENT): $(OBJS) $(COBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(OBJS) $(COBJS), $@,, $(LIBS) glacier2$(LIBSUFFIX).lib + +$(SERVER): $(OBJS) $(SOBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(OBJS) $(SOBJS), $@,, $(LIBS) + +Backend.cpp Backend.h: Backend.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) $(SLICE2CPPFLAGS) Backend.ice + +clean:: + del /q Backend.cpp Backend.h + +!include .depend diff --git a/cpp/test/Glacier2/filters/Makefile.mak b/cpp/test/Glacier2/filters/Makefile.mak new file mode 100644 index 00000000000..878f7ee2977 --- /dev/null +++ b/cpp/test/Glacier2/filters/Makefile.mak @@ -0,0 +1,47 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = ..\..\.. + +CLIENT = client.exe +SERVER = server.exe + +TARGETS = $(CLIENT) $(SERVER) + +COBJS = Client.o \ + Test.o + +SOBJS = Server.o \ + Test.o \ + SessionI.o \ + BackendI.o \ + TestControllerI.o + +SRCS = $(COBJS:.o=.cpp) \ + $(SOBJS:.o=.cpp) + +!include $(top_srcdir)/config/Make.rules.mak + +CPPFLAGS = -I. -I../../include $(CPPFLAGS) + +$(CLIENT): $(COBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(COBJS), $@,, $(LIBS) glacier2$(LIBSUFFIX).lib + +$(SERVER): $(SOBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(SOBJS), $@,, $(LIBS) $(top_srcdir)\lib\glacier2$(LIBSUFFIX).lib + +Test.cpp Test.h: Test.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) $(SLICE2CPPFLAGS) Test.ice + +clean:: + del /q Test.cpp Test.h + +!include .depend diff --git a/cpp/test/Glacier2/router/Makefile.mak b/cpp/test/Glacier2/router/Makefile.mak new file mode 100644 index 00000000000..434f19cd362 --- /dev/null +++ b/cpp/test/Glacier2/router/Makefile.mak @@ -0,0 +1,46 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = ..\..\.. + +CLIENT = client.exe +SERVER = server.exe + +TARGETS = $(CLIENT) $(SERVER) + +OBJS = Callback.o \ + CallbackI.o + +COBJS = Client.o + +SOBJS = Server.o + +SRCS = $(OBJS:.o=.cpp) \ + $(COBJS:.o=.cpp) \ + $(SOBJS:.o=.cpp) + +!include $(top_srcdir)/config/Make.rules.mak + +CPPFLAGS = -I. -I../../include $(CPPFLAGS) + +$(CLIENT): $(OBJS) $(COBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(OBJS) $(COBJS), $@,, $(LIBS) glacier2$(LIBSUFFIX).lib + +$(SERVER): $(OBJS) $(SOBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(OBJS) $(SOBJS), $@,, $(LIBS) + +Callback.cpp Callback.h: Callback.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) $(SLICE2CPPFLAGS) Callback.ice + +clean:: + del /q Callback.cpp Callback.h + +!include .depend diff --git a/cpp/test/Glacier2/sessionControl/Makefile.mak b/cpp/test/Glacier2/sessionControl/Makefile.mak new file mode 100644 index 00000000000..79f19d140e3 --- /dev/null +++ b/cpp/test/Glacier2/sessionControl/Makefile.mak @@ -0,0 +1,45 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = ..\..\.. + +CLIENT = client.exe +SERVER = server.exe + +TARGETS = $(CLIENT) $(SERVER) + +COBJS = Client.o \ + Session.o + +SOBJS = Server.o \ + Session.o \ + SessionI.o + +SRCS = $(COBJS:.o=.cpp) \ + $(SOBJS:.o=.cpp) + +!include $(top_srcdir)/config/Make.rules.mak + +CPPFLAGS = -I. -I../../include $(CPPFLAGS) + +$(CLIENT): $(COBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(COBJS), $@,, $(LIBS) glacier2$(LIBSUFFIX).lib + +$(SERVER): $(SOBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(SOBJS), $@,, $(LIBS) $(top_srcdir)\lib\glacier2$(LIBSUFFIX).lib + +Session.cpp Session.h: Session.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) $(SLICE2CPPFLAGS) Session.ice + +clean:: + del /q Session.cpp Session.h + +!include .depend diff --git a/cpp/test/Glacier2/ssl/Makefile.mak b/cpp/test/Glacier2/ssl/Makefile.mak new file mode 100644 index 00000000000..831d7f86604 --- /dev/null +++ b/cpp/test/Glacier2/ssl/Makefile.mak @@ -0,0 +1,36 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = ..\..\.. + +CLIENT = client.exe +SERVER = server.exe + +TARGETS = $(CLIENT) $(SERVER) + +COBJS = Client.o + +SOBJS = Server.o + +SRCS = $(COBJS:.o=.cpp) \ + $(SOBJS:.o=.cpp) + +!include $(top_srcdir)/config/Make.rules.mak + +CPPFLAGS = -I. -I../../include $(CPPFLAGS) + +$(CLIENT): $(COBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(COBJS), $@,, $(LIBS) glacier2$(LIBSUFFIX).lib + +$(SERVER): $(SOBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(SOBJS), $@,, $(LIBS) glacier2$(LIBSUFFIX).lib $(OPENSSL_LIBS) icessl$(LIBSUFFIX).lib + +!include .depend diff --git a/cpp/test/Ice/Makefile.mak b/cpp/test/Ice/Makefile.mak new file mode 100644 index 00000000000..2dc2a722479 --- /dev/null +++ b/cpp/test/Ice/Makefile.mak @@ -0,0 +1,35 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = ..\.. + +!include $(top_srcdir)\config\Make.rules.mak + +SUBDIRS = operations \ + exceptions \ + inheritance \ + facets \ + objects \ + faultTolerance \ + location \ + adapterDeactivation \ + slicing \ + gc \ + checksum \ + stream \ + hold \ + custom \ + binding \ + retry \ + timeout + +$(EVERYTHING):: + @for %i in ( $(SUBDIRS) ) do \ + @echo "making $@ in %i" & \ + cmd /c "cd %i & $(MAKE) -f Makefile.mak $@" diff --git a/cpp/test/Ice/adapterDeactivation/Makefile.mak b/cpp/test/Ice/adapterDeactivation/Makefile.mak new file mode 100644 index 00000000000..110b95903c4 --- /dev/null +++ b/cpp/test/Ice/adapterDeactivation/Makefile.mak @@ -0,0 +1,59 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = ..\..\.. + +CLIENT = client.exe +SERVER = server.exe +COLLOCATED = collocated.exe + +TARGETS = $(CLIENT) $(SERVER) $(COLLOCATED) + +COBJS = Test.o \ + Client.o \ + AllTests.o + +SOBJS = Test.o \ + TestI.o \ + ServantLocatorI.o \ + Server.o + +COLOBJS = Test.o \ + TestI.o \ + ServantLocatorI.o \ + Collocated.o \ + AllTests.o + +SRCS = $(COBJS:.o=.cpp) \ + $(SOBJS:.o=.cpp) \ + $(COLOBJS:.o=.cpp) + +!include $(top_srcdir)/config/Make.rules.mak + +CPPFLAGS = -I. -I../../include $(CPPFLAGS) + +$(CLIENT): $(COBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(COBJS), $@,, $(LIBS) + +$(SERVER): $(SOBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(SOBJS), $@,, $(LIBS) + +$(COLLOCATED): $(COLOBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(COLOBJS), $@,, $(LIBS) + +Test.cpp Test.h: Test.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) $(SLICE2CPPFLAGS) Test.ice + +clean:: + del /q Test.cpp Test.h + +!include .depend diff --git a/cpp/test/Ice/binding/Makefile.mak b/cpp/test/Ice/binding/Makefile.mak new file mode 100644 index 00000000000..e4734adf576 --- /dev/null +++ b/cpp/test/Ice/binding/Makefile.mak @@ -0,0 +1,46 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = ..\..\.. + +CLIENT = client.exe +SERVER = server.exe + +TARGETS = $(CLIENT) $(SERVER) + +COBJS = Test.o \ + Client.o \ + AllTests.o + +SOBJS = Test.o \ + TestI.o \ + Server.o + +SRCS = $(COBJS:.o=.cpp) \ + $(SOBJS:.o=.cpp) + +!include $(top_srcdir)/config/Make.rules.mak + +CPPFLAGS = -I. -I../../include $(CPPFLAGS) + +$(CLIENT): $(COBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(COBJS), $@,, $(LIBS) + +$(SERVER): $(SOBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(SOBJS), $@,, $(LIBS) + +Test.cpp Test.h: Test.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) $(SLICE2CPPFLAGS) Test.ice + +clean:: + del /q Test.cpp Test.h + +!include .depend diff --git a/cpp/test/Ice/checksum/Makefile.mak b/cpp/test/Ice/checksum/Makefile.mak new file mode 100644 index 00000000000..5d0641eb206 --- /dev/null +++ b/cpp/test/Ice/checksum/Makefile.mak @@ -0,0 +1,20 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = ..\..\.. + +!include $(top_srcdir)\config\Make.rules.mak + +SUBDIRS = client \ + server + +$(EVERYTHING):: + @for %i in ( $(SUBDIRS) ) do \ + @echo "making $@ in %i" & \ + cmd /c "cd %i & $(MAKE) -f Makefile.mak $@" diff --git a/cpp/test/Ice/checksum/client/Makefile.mak b/cpp/test/Ice/checksum/client/Makefile.mak new file mode 100644 index 00000000000..4b0d7889aa3 --- /dev/null +++ b/cpp/test/Ice/checksum/client/Makefile.mak @@ -0,0 +1,41 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = ..\..\..\.. + +CLIENT = client.exe + +TARGETS = $(CLIENT) + +COBJS = Test.o \ + Types.o \ + Client.o \ + AllTests.o + +SRCS = $(COBJS:.o=.cpp) + +!include $(top_srcdir)/config/Make.rules.mak + +CPPFLAGS = -I. -I../../../include $(CPPFLAGS) + +$(CLIENT): $(COBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(COBJS), $@,, $(LIBS) + +Test.cpp Test.h: Test.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) --checksum $(SLICE2CPPFLAGS) Test.ice + +Types.cpp Types.h: Types.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) --checksum $(SLICE2CPPFLAGS) Types.ice + +clean:: + del /q Test.cpp Test.h + del /q Types.cpp Types.h + +!include .depend diff --git a/cpp/test/Ice/checksum/server/Makefile.mak b/cpp/test/Ice/checksum/server/Makefile.mak new file mode 100644 index 00000000000..08ad0a48dd7 --- /dev/null +++ b/cpp/test/Ice/checksum/server/Makefile.mak @@ -0,0 +1,41 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = ..\..\..\.. + +SERVER = server.exe + +TARGETS = $(SERVER) + +SOBJS = Test.o \ + Types.o \ + TestI.o \ + Server.o + +SRCS = $(SOBJS:.o=.cpp) + +!include $(top_srcdir)/config/Make.rules.mak + +CPPFLAGS = -I. -I../../../include $(CPPFLAGS) + +$(SERVER): $(SOBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(SOBJS), $@,, $(LIBS) + +Test.cpp Test.h: Test.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) --checksum $(SLICE2CPPFLAGS) Test.ice + +Types.cpp Types.h: Types.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) --checksum $(SLICE2CPPFLAGS) Types.ice + +clean:: + del /q Test.cpp Test.h + del /q Types.cpp Types.h + +!include .depend diff --git a/cpp/test/Ice/custom/Makefile.mak b/cpp/test/Ice/custom/Makefile.mak new file mode 100644 index 00000000000..848a621f980 --- /dev/null +++ b/cpp/test/Ice/custom/Makefile.mak @@ -0,0 +1,94 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = ..\..\.. + +CLIENT = client.exe +SERVER = server.exe +SERVERAMD = serveramd.exe +COLLOCATED = collocated.exe + +TARGETS = $(CLIENT) $(SERVER) $(SERVERAMD) $(COLLOCATED) + +COBJS = Test.o \ + Wstring.o \ + Client.o \ + AllTests.o \ + MyByteSeq.o \ + StringConverterI.o + +SOBJS = Test.o \ + Wstring.o \ + TestI.o \ + WstringI.o \ + Server.o \ + MyByteSeq.o \ + StringConverterI.o + +SAMDOBJS = TestAMD.o \ + TestAMDI.o \ + WstringAMD.o \ + WstringAMDI.o \ + ServerAMD.o \ + MyByteSeq.o \ + StringConverterI.o + +COLOBJS = Test.o \ + Wstring.o \ + TestI.o \ + WstringI.o \ + Collocated.o \ + AllTests.o \ + MyByteSeq.o \ + StringConverterI.o + +SRCS = $(COBJS:.o=.cpp) \ + $(SOBJS:.o=.cpp) \ + $(SAMDOBJS:.o=.cpp) \ + $(COLOBJS:.o=.cpp) + +!include $(top_srcdir)/config/Make.rules.mak + +CPPFLAGS = -I. -I../../include $(CPPFLAGS) + +$(CLIENT): $(COBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(COBJS), $@,, $(LIBS) + +$(SERVER): $(SOBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(SOBJS), $@,, $(LIBS) + +$(SERVERAMD): $(SAMDOBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(SAMDOBJS), $@,, $(LIBS) + +$(COLLOCATED): $(COLOBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(COLOBJS), $@,, $(LIBS) + +Test.cpp Test.h: Test.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) --stream $(SLICE2CPPFLAGS) Test.ice + +TestAMD.cpp TestAMD.h: TestAMD.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) --stream $(SLICE2CPPFLAGS) TestAMD.ice + +Wstring.cpp Wstring.h: Wstring.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) $(SLICE2CPPFLAGS) Wstring.ice + +WstringAMD.cpp WstringAMD.h: WstringAMD.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) $(SLICE2CPPFLAGS) WstringAMD.ice + +clean:: + del /q Test.cpp Test.h + del /q TestAMD.cpp TestAMD.h + del /q Wstring.cpp Wstring.h + del /q WstringAMD.cpp WstringAMD.h + +!include .depend diff --git a/cpp/test/Ice/exceptions/Makefile.mak b/cpp/test/Ice/exceptions/Makefile.mak new file mode 100644 index 00000000000..ab78d0d1979 --- /dev/null +++ b/cpp/test/Ice/exceptions/Makefile.mak @@ -0,0 +1,71 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = ..\..\.. + +CLIENT = client.exe +SERVER = server.exe +SERVERAMD = serveramd.exe +COLLOCATED = collocated.exe + +TARGETS = $(CLIENT) $(SERVER) $(SERVERAMD) $(COLLOCATED) + +COBJS = Test.o \ + Client.o \ + AllTests.o + +SOBJS = Test.o \ + TestI.o \ + Server.o + +SAMDOBJS = TestAMD.o \ + TestAMDI.o \ + ServerAMD.o + +COLOBJS = Test.o \ + TestI.o \ + Collocated.o \ + AllTests.o + +SRCS = $(COBJS:.o=.cpp) \ + $(SOBJS:.o=.cpp) \ + $(SAMDOBJS:.o=.cpp) \ + $(COLOBJS:.o=.cpp) + +!include $(top_srcdir)/config/Make.rules.mak + +CPPFLAGS = -I. -I../../include $(CPPFLAGS) + +$(CLIENT): $(COBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(COBJS), $@,, $(LIBS) + +$(SERVER): $(SOBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(SOBJS), $@,, $(LIBS) + +$(SERVERAMD): $(SAMDOBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(SAMDOBJS), $@,, $(LIBS) + +$(COLLOCATED): $(COLOBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(COLOBJS), $@,, $(LIBS) + +Test.cpp Test.h: Test.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) $(SLICE2CPPFLAGS) Test.ice + +TestAMD.cpp TestAMD.h: TestAMD.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) $(SLICE2CPPFLAGS) TestAMD.ice + +clean:: + del /q Test.cpp Test.h + del /q TestAMD.cpp TestAMD.h + +!include .depend diff --git a/cpp/test/Ice/facets/Makefile.mak b/cpp/test/Ice/facets/Makefile.mak new file mode 100644 index 00000000000..1179b3226ef --- /dev/null +++ b/cpp/test/Ice/facets/Makefile.mak @@ -0,0 +1,57 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = ..\..\.. + +CLIENT = client.exe +SERVER = server.exe +COLLOCATED = collocated.exe + +TARGETS = $(CLIENT) $(SERVER) $(COLLOCATED) + +COBJS = Test.o \ + Client.o \ + AllTests.o + +SOBJS = Test.o \ + TestI.o \ + Server.o + +COLOBJS = Test.o \ + TestI.o \ + Collocated.o \ + AllTests.o + +SRCS = $(COBJS:.o=.cpp) \ + $(SOBJS:.o=.cpp) \ + $(COLOBJS:.o=.cpp) + +!include $(top_srcdir)/config/Make.rules.mak + +CPPFLAGS = -I. -I../../include $(CPPFLAGS) + +$(CLIENT): $(COBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(COBJS), $@,, $(LIBS) + +$(SERVER): $(SOBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(SOBJS), $@,, $(LIBS) + +$(COLLOCATED): $(COLOBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(COLOBJS), $@,, $(LIBS) + +Test.cpp Test.h: Test.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) $(SLICE2CPPFLAGS) Test.ice + +clean:: + del /q Test.cpp Test.h + +!include .depend diff --git a/cpp/test/Ice/faultTolerance/AllTests.cpp b/cpp/test/Ice/faultTolerance/AllTests.cpp index 2efe542995d..98ca68a3dab 100644 --- a/cpp/test/Ice/faultTolerance/AllTests.cpp +++ b/cpp/test/Ice/faultTolerance/AllTests.cpp @@ -132,7 +132,7 @@ public: typedef IceUtil::Handle<AMI_Test_abortI> AMI_Test_abortIPtr; -class AMI_Test_idempotentAbortI : public AMI_TestIntf_idempotentAbort, public AMI_Test_abortI +class AMI_Test_idempotentAbortI : public AMI_TestIntf_idempotentAbort, public CallbackBase { virtual void ice_response() { @@ -141,7 +141,22 @@ class AMI_Test_idempotentAbortI : public AMI_TestIntf_idempotentAbort, public AM virtual void ice_exception(const Ice::Exception& ex) { - AMI_Test_abortI::ice_exception(ex); + try + { + ex.ice_throw(); + } + catch(const Ice::ConnectionLostException&) + { + } + catch(const Ice::ConnectFailedException&) + { + } + catch(Ice::Exception& ex) + { + cout << ex << endl; + test(false); + } + called(); } }; diff --git a/cpp/test/Ice/faultTolerance/Makefile.mak b/cpp/test/Ice/faultTolerance/Makefile.mak new file mode 100644 index 00000000000..e4734adf576 --- /dev/null +++ b/cpp/test/Ice/faultTolerance/Makefile.mak @@ -0,0 +1,46 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = ..\..\.. + +CLIENT = client.exe +SERVER = server.exe + +TARGETS = $(CLIENT) $(SERVER) + +COBJS = Test.o \ + Client.o \ + AllTests.o + +SOBJS = Test.o \ + TestI.o \ + Server.o + +SRCS = $(COBJS:.o=.cpp) \ + $(SOBJS:.o=.cpp) + +!include $(top_srcdir)/config/Make.rules.mak + +CPPFLAGS = -I. -I../../include $(CPPFLAGS) + +$(CLIENT): $(COBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(COBJS), $@,, $(LIBS) + +$(SERVER): $(SOBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(SOBJS), $@,, $(LIBS) + +Test.cpp Test.h: Test.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) $(SLICE2CPPFLAGS) Test.ice + +clean:: + del /q Test.cpp Test.h + +!include .depend diff --git a/cpp/test/Ice/faultTolerance/TestI.cpp b/cpp/test/Ice/faultTolerance/TestI.cpp index 0e0d1f1709b..c19f2504db1 100644 --- a/cpp/test/Ice/faultTolerance/TestI.cpp +++ b/cpp/test/Ice/faultTolerance/TestI.cpp @@ -36,7 +36,7 @@ TestI::idempotentAbort(const Ice::Current&) Ice::Int TestI::pid(const Ice::Current&) { -#ifdef _WIN32 +#ifdef _MSC_VER return _getpid(); #else return getpid(); diff --git a/cpp/test/Ice/faultTolerance/run.py b/cpp/test/Ice/faultTolerance/run.py index c192a537ef9..bdbe9a34d01 100755 --- a/cpp/test/Ice/faultTolerance/run.py +++ b/cpp/test/Ice/faultTolerance/run.py @@ -39,6 +39,7 @@ for i in range(0, num): ports = "" for i in range(0, num): ports = "%s %d" % (ports, base + i) + print "starting client...", clientPipe = os.popen(client + TestUtil.clientOptions + " " + ports + " 2>&1") print "ok" diff --git a/cpp/test/Ice/gc/Makefile.mak b/cpp/test/Ice/gc/Makefile.mak new file mode 100644 index 00000000000..5c2fb982476 --- /dev/null +++ b/cpp/test/Ice/gc/Makefile.mak @@ -0,0 +1,38 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = ..\..\.. + +CLIENT = client.exe + +TARGETS = $(CLIENT) + +COBJS = Test.o \ + Client.o + +SRCS = $(COBJS:.o=.cpp) + +!include $(top_srcdir)/config/Make.rules.mak + +CPPFLAGS = -I. -I../../include $(CPPFLAGS) + +$(CLIENT): $(COBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(COBJS), $@,, $(LIBS) + +Test.cpp Test.h: Test.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) $(SLICE2CPPFLAGS) Test.ice + +clean:: + del /q Test.cpp Test.h + +clean:: + del /q seed + +!include .depend diff --git a/cpp/test/Ice/hold/Makefile.mak b/cpp/test/Ice/hold/Makefile.mak new file mode 100644 index 00000000000..e4734adf576 --- /dev/null +++ b/cpp/test/Ice/hold/Makefile.mak @@ -0,0 +1,46 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = ..\..\.. + +CLIENT = client.exe +SERVER = server.exe + +TARGETS = $(CLIENT) $(SERVER) + +COBJS = Test.o \ + Client.o \ + AllTests.o + +SOBJS = Test.o \ + TestI.o \ + Server.o + +SRCS = $(COBJS:.o=.cpp) \ + $(SOBJS:.o=.cpp) + +!include $(top_srcdir)/config/Make.rules.mak + +CPPFLAGS = -I. -I../../include $(CPPFLAGS) + +$(CLIENT): $(COBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(COBJS), $@,, $(LIBS) + +$(SERVER): $(SOBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(SOBJS), $@,, $(LIBS) + +Test.cpp Test.h: Test.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) $(SLICE2CPPFLAGS) Test.ice + +clean:: + del /q Test.cpp Test.h + +!include .depend diff --git a/cpp/test/Ice/inheritance/Makefile.mak b/cpp/test/Ice/inheritance/Makefile.mak new file mode 100644 index 00000000000..1179b3226ef --- /dev/null +++ b/cpp/test/Ice/inheritance/Makefile.mak @@ -0,0 +1,57 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = ..\..\.. + +CLIENT = client.exe +SERVER = server.exe +COLLOCATED = collocated.exe + +TARGETS = $(CLIENT) $(SERVER) $(COLLOCATED) + +COBJS = Test.o \ + Client.o \ + AllTests.o + +SOBJS = Test.o \ + TestI.o \ + Server.o + +COLOBJS = Test.o \ + TestI.o \ + Collocated.o \ + AllTests.o + +SRCS = $(COBJS:.o=.cpp) \ + $(SOBJS:.o=.cpp) \ + $(COLOBJS:.o=.cpp) + +!include $(top_srcdir)/config/Make.rules.mak + +CPPFLAGS = -I. -I../../include $(CPPFLAGS) + +$(CLIENT): $(COBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(COBJS), $@,, $(LIBS) + +$(SERVER): $(SOBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(SOBJS), $@,, $(LIBS) + +$(COLLOCATED): $(COLOBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(COLOBJS), $@,, $(LIBS) + +Test.cpp Test.h: Test.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) $(SLICE2CPPFLAGS) Test.ice + +clean:: + del /q Test.cpp Test.h + +!include .depend diff --git a/cpp/test/Ice/location/Makefile.mak b/cpp/test/Ice/location/Makefile.mak new file mode 100644 index 00000000000..434a58d868b --- /dev/null +++ b/cpp/test/Ice/location/Makefile.mak @@ -0,0 +1,47 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = ..\..\.. + +CLIENT = client.exe +SERVER = server.exe + +TARGETS = $(CLIENT) $(SERVER) + +COBJS = Test.o \ + Client.o \ + AllTests.o + +SOBJS = Test.o \ + TestI.o \ + ServerLocator.o \ + Server.o + +SRCS = $(COBJS:.o=.cpp) \ + $(SOBJS:.o=.cpp) + +!include $(top_srcdir)/config/Make.rules.mak + +CPPFLAGS = -I. -I../../include $(CPPFLAGS) + +$(CLIENT): $(COBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(COBJS), $@,, $(LIBS) + +$(SERVER): $(SOBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(SOBJS), $@,, $(LIBS) + +Test.cpp Test.h: Test.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) $(SLICE2CPPFLAGS) Test.ice + +clean:: + del /q Test.cpp Test.h + +!include .depend diff --git a/cpp/test/Ice/objects/Makefile.mak b/cpp/test/Ice/objects/Makefile.mak new file mode 100644 index 00000000000..3f0d3fbb213 --- /dev/null +++ b/cpp/test/Ice/objects/Makefile.mak @@ -0,0 +1,58 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = ..\..\.. + +CLIENT = client.exe +SERVER = server.exe +COLLOCATED = collocated.exe + +TARGETS = $(CLIENT) $(SERVER) $(COLLOCATED) + +COBJS = Test.o \ + TestI.o \ + Client.o \ + AllTests.o + +SOBJS = Test.o \ + TestI.o \ + Server.o + +COLOBJS = Test.o \ + TestI.o \ + Collocated.o \ + AllTests.o + +SRCS = $(COBJS:.o=.cpp) \ + $(SOBJS:.o=.cpp) \ + $(COLOBJS:.o=.cpp) + +!include $(top_srcdir)/config/Make.rules.mak + +CPPFLAGS = -I. -I../../include $(CPPFLAGS) + +$(CLIENT): $(COBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(COBJS), $@,, $(LIBS) + +$(SERVER): $(SOBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(SOBJS), $@,, $(LIBS) + +$(COLLOCATED): $(COLOBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(COLOBJS), $@,, $(LIBS) + +Test.cpp Test.h: Test.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) --stream $(SLICE2CPPFLAGS) Test.ice + +clean:: + del /q Test.cpp Test.h + +!include .depend diff --git a/cpp/test/Ice/operations/Makefile.mak b/cpp/test/Ice/operations/Makefile.mak new file mode 100644 index 00000000000..f19334b38c8 --- /dev/null +++ b/cpp/test/Ice/operations/Makefile.mak @@ -0,0 +1,77 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = ..\..\.. + +CLIENT = client.exe +SERVER = server.exe +SERVERAMD = serveramd.exe +COLLOCATED = collocated.exe + +TARGETS = $(CLIENT) $(SERVER) $(SERVERAMD) $(COLLOCATED) + +COBJS = Test.o \ + Client.o \ + AllTests.o \ + Twoways.o \ + TwowaysAMI.o \ + BatchOneways.o + +SOBJS = Test.o \ + TestI.o \ + Server.o + +SAMDOBJS = TestAMD.o \ + TestAMDI.o \ + ServerAMD.o + +COLOBJS = Test.o \ + TestI.o \ + Collocated.o \ + AllTests.o \ + Twoways.o \ + TwowaysAMI.o \ + BatchOneways.o + +SRCS = $(COBJS:.o=.cpp) \ + $(SOBJS:.o=.cpp) \ + $(SAMDOBJS:.o=.cpp) \ + $(COLOBJS:.o=.cpp) + +!include $(top_srcdir)/config/Make.rules.mak + +CPPFLAGS = -I. -I../../include $(CPPFLAGS) + +$(CLIENT): $(COBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(COBJS), $@,, $(LIBS) + +$(SERVER): $(SOBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(SOBJS), $@,, $(LIBS) + +$(SERVERAMD): $(SAMDOBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(SAMDOBJS), $@,, $(LIBS) + +$(COLLOCATED): $(COLOBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(COLOBJS), $@,, $(LIBS) + +Test.cpp Test.h: Test.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) $(SLICE2CPPFLAGS) Test.ice + +TestAMD.cpp TestAMD.h: TestAMD.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) $(SLICE2CPPFLAGS) TestAMD.ice + +clean:: + del /q Test.cpp Test.h + del /q TestAMD.cpp TestAMD.h + +!include .depend diff --git a/cpp/test/Ice/operations/TestAMDI.cpp b/cpp/test/Ice/operations/TestAMDI.cpp index 388a56a4e6d..3afc2bc1a7f 100644 --- a/cpp/test/Ice/operations/TestAMDI.cpp +++ b/cpp/test/Ice/operations/TestAMDI.cpp @@ -11,6 +11,9 @@ #include <TestAMDI.h> #include <TestCommon.h> #include <functional> +#ifdef __BCPLUSPLUS__ +# include <iterator> +#endif class Thread_opVoid : public IceUtil::Thread { @@ -419,5 +422,9 @@ bool TestCheckedCastI::ice_isA(const std::string& s, const Ice::Current& current) const { _ctx = current.ctx; +#ifdef __BCPLUSPLUS__ + return Test::TestCheckedCast::ice_isA(s, current); +#else return TestCheckedCast::ice_isA(s, current); +#endif } diff --git a/cpp/test/Ice/operations/TestI.cpp b/cpp/test/Ice/operations/TestI.cpp index e69e296c432..b5ba645d9ab 100644 --- a/cpp/test/Ice/operations/TestI.cpp +++ b/cpp/test/Ice/operations/TestI.cpp @@ -11,6 +11,9 @@ #include <TestI.h> #include <TestCommon.h> #include <functional> +#ifdef __BCPLUSPLUS__ +# include <iterator> +#endif MyDerivedClassI::MyDerivedClassI(const Ice::ObjectAdapterPtr& adapter, const Ice::Identity& identity) : _adapter(adapter), @@ -389,5 +392,9 @@ bool TestCheckedCastI::ice_isA(const std::string& s, const Ice::Current& current) const { _ctx = current.ctx; +#ifdef __BCPLUSPLUS__ + return Test::TestCheckedCast::ice_isA(s, current); +#else return TestCheckedCast::ice_isA(s, current); +#endif } diff --git a/cpp/test/Ice/retry/Makefile.mak b/cpp/test/Ice/retry/Makefile.mak new file mode 100644 index 00000000000..e4734adf576 --- /dev/null +++ b/cpp/test/Ice/retry/Makefile.mak @@ -0,0 +1,46 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = ..\..\.. + +CLIENT = client.exe +SERVER = server.exe + +TARGETS = $(CLIENT) $(SERVER) + +COBJS = Test.o \ + Client.o \ + AllTests.o + +SOBJS = Test.o \ + TestI.o \ + Server.o + +SRCS = $(COBJS:.o=.cpp) \ + $(SOBJS:.o=.cpp) + +!include $(top_srcdir)/config/Make.rules.mak + +CPPFLAGS = -I. -I../../include $(CPPFLAGS) + +$(CLIENT): $(COBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(COBJS), $@,, $(LIBS) + +$(SERVER): $(SOBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(SOBJS), $@,, $(LIBS) + +Test.cpp Test.h: Test.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) $(SLICE2CPPFLAGS) Test.ice + +clean:: + del /q Test.cpp Test.h + +!include .depend diff --git a/cpp/test/Ice/slicing/Makefile.mak b/cpp/test/Ice/slicing/Makefile.mak new file mode 100644 index 00000000000..1a9d2b1b3fa --- /dev/null +++ b/cpp/test/Ice/slicing/Makefile.mak @@ -0,0 +1,20 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = ..\..\.. + +!include $(top_srcdir)\config\Make.rules.mak + +SUBDIRS = exceptions \ + objects + +$(EVERYTHING):: + @for %i in ( $(SUBDIRS) ) do \ + @echo "making $@ in %i" & \ + cmd /c "cd %i & $(MAKE) -f Makefile.mak $@" diff --git a/cpp/test/Ice/slicing/exceptions/Makefile.mak b/cpp/test/Ice/slicing/exceptions/Makefile.mak new file mode 100644 index 00000000000..fecec57ff91 --- /dev/null +++ b/cpp/test/Ice/slicing/exceptions/Makefile.mak @@ -0,0 +1,72 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = ..\..\..\.. + +CLIENT = client.exe +SERVER = server.exe +SERVERAMD = serveramd.exe + +TARGETS = $(CLIENT) $(SERVER) $(SERVERAMD) + +COBJS = Test.o \ + Client.o \ + AllTests.o + +SOBJS = Test.o \ + ServerPrivate.o \ + TestI.o \ + Server.o + +SAMDOBJS = TestAMD.o \ + ServerPrivateAMD.o \ + TestAMDI.o \ + ServerAMD.o + +SRCS = $(COBJS:.o=.cpp) \ + $(SOBJS:.o=.cpp) \ + $(SAMDOBJS:.o=.cpp) + +!include $(top_srcdir)/config/Make.rules.mak + +ICECPPFLAGS = -I. $(ICECPPFLAGS) + +CPPFLAGS = -I. -I../../../include $(CPPFLAGS) + +$(CLIENT): $(COBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(COBJS), $@,, $(LIBS) + +$(SERVER): $(SOBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(SOBJS), $@,, $(LIBS) + +$(SERVERAMD): $(SAMDOBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(SAMDOBJS), $@,, $(LIBS) + +Test.cpp Test.h: Test.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) $(SLICE2CPPFLAGS) Test.ice + +TestAMD.cpp TestAMD.h: TestAMD.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) $(SLICE2CPPFLAGS) TestAMD.ice + +ServerPrivate.cpp ServerPrivate.h: ServerPrivate.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) $(SLICE2CPPFLAGS) ServerPrivate.ice + +ServerPrivateAMD.cpp ServerPrivateAMD.h: ServerPrivateAMD.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) $(SLICE2CPPFLAGS) ServerPrivateAMD.ice + +clean:: + del /q Test.cpp Test.h + del /q TestAMD.cpp TestAMD.h + del /q ServerPrivate.cpp ServerPrivate.h + del /q ServerPrivateAMD.cpp ServerPrivateAMD.h + +!include .depend diff --git a/cpp/test/Ice/slicing/objects/Makefile.mak b/cpp/test/Ice/slicing/objects/Makefile.mak new file mode 100644 index 00000000000..ec2293b901d --- /dev/null +++ b/cpp/test/Ice/slicing/objects/Makefile.mak @@ -0,0 +1,84 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = ..\..\..\.. + +CLIENT = client.exe +SERVER = server.exe +SERVERAMD = serveramd.exe + +TARGETS = $(CLIENT) $(SERVER) $(SERVERAMD) + +COBJS = Test.o \ + ClientPrivate.o \ + Client.o \ + AllTests.o \ + Forward.o + +SOBJS = Test.o \ + ServerPrivate.o \ + TestI.o \ + Server.o \ + Forward.o + +SAMDOBJS = TestAMD.o \ + ServerPrivateAMD.o \ + TestAMDI.o \ + ServerAMD.o \ + Forward.o + +SRCS = $(COBJS:.o=.cpp) \ + $(SOBJS:.o=.cpp) \ + $(SAMDOBJS:.o=.cpp) + +!include $(top_srcdir)/config/Make.rules.mak + +ICECPPFLAGS = -I. $(ICECPPFLAGS) + +CPPFLAGS = -I. -I../../../include $(CPPFLAGS) + +$(CLIENT): $(COBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(COBJS), $@,, $(LIBS) + +$(SERVER): $(SOBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(SOBJS), $@,, $(LIBS) + +$(SERVERAMD): $(SAMDOBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(SAMDOBJS), $@,, $(LIBS) + +Test.cpp Test.h: Test.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) $(SLICE2CPPFLAGS) Test.ice + +TestAMD.cpp TestAMD.h: TestAMD.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) $(SLICE2CPPFLAGS) TestAMD.ice + +ClientPrivate.cpp ClientPrivate.h: ClientPrivate.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) $(SLICE2CPPFLAGS) ClientPrivate.ice + +ServerPrivate.cpp ServerPrivate.h: ServerPrivate.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) $(SLICE2CPPFLAGS) ServerPrivate.ice + +ServerPrivateAMD.cpp ServerPrivateAMD.h: ServerPrivateAMD.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) $(SLICE2CPPFLAGS) ServerPrivateAMD.ice + +Forward.cpp Forward.h: Forward.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) $(SLICE2CPPFLAGS) Forward.ice + +clean:: + del /q Test.cpp Test.h + del /q TestAMD.cpp TestAMD.h + del /q ClientPrivate.cpp ClientPrivate.h + del /q ServerPrivate.cpp ServerPrivate.h + del /q ServerPrivateAMD.cpp ServerPrivateAMD.h + del /q Forward.cpp Forward.h + +!include .depend diff --git a/cpp/test/Ice/stream/Makefile.mak b/cpp/test/Ice/stream/Makefile.mak new file mode 100644 index 00000000000..2b625125229 --- /dev/null +++ b/cpp/test/Ice/stream/Makefile.mak @@ -0,0 +1,35 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = ..\..\.. + +CLIENT = client.exe + +TARGETS = $(CLIENT) + +COBJS = Test.o \ + Client.o + +SRCS = $(COBJS:.o=.cpp) + +!include $(top_srcdir)/config/Make.rules.mak + +CPPFLAGS = -I. -I../../include $(CPPFLAGS) + +$(CLIENT): $(COBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(COBJS), $@,, $(LIBS) + +Test.cpp Test.h: Test.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) --stream $(SLICE2CPPFLAGS) Test.ice + +clean:: + del /q Test.cpp Test.h + +!include .depend diff --git a/cpp/test/Ice/timeout/Makefile.mak b/cpp/test/Ice/timeout/Makefile.mak new file mode 100644 index 00000000000..e4734adf576 --- /dev/null +++ b/cpp/test/Ice/timeout/Makefile.mak @@ -0,0 +1,46 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = ..\..\.. + +CLIENT = client.exe +SERVER = server.exe + +TARGETS = $(CLIENT) $(SERVER) + +COBJS = Test.o \ + Client.o \ + AllTests.o + +SOBJS = Test.o \ + TestI.o \ + Server.o + +SRCS = $(COBJS:.o=.cpp) \ + $(SOBJS:.o=.cpp) + +!include $(top_srcdir)/config/Make.rules.mak + +CPPFLAGS = -I. -I../../include $(CPPFLAGS) + +$(CLIENT): $(COBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(COBJS), $@,, $(LIBS) + +$(SERVER): $(SOBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(SOBJS), $@,, $(LIBS) + +Test.cpp Test.h: Test.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) $(SLICE2CPPFLAGS) Test.ice + +clean:: + del /q Test.cpp Test.h + +!include .depend diff --git a/cpp/test/IceGrid/Makefile.mak b/cpp/test/IceGrid/Makefile.mak new file mode 100644 index 00000000000..26622e00b3c --- /dev/null +++ b/cpp/test/IceGrid/Makefile.mak @@ -0,0 +1,20 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = ..\.. + +!include $(top_srcdir)/config/Make.rules.mak + + +SUBDIRS = simple deployer session update activation replication allocation + +$(EVERYTHING):: + @for %i in ( $(SUBDIRS) ) do \ + @echo "making $@ in %i" & \ + cmd /c "cd %i & $(MAKE) -f Makefile.mak $@" diff --git a/cpp/test/IceGrid/activation/Makefile.mak b/cpp/test/IceGrid/activation/Makefile.mak new file mode 100644 index 00000000000..b8a2f00b1f2 --- /dev/null +++ b/cpp/test/IceGrid/activation/Makefile.mak @@ -0,0 +1,47 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = ..\..\.. + +CLIENT = client.exe +SERVER = server.exe + +TARGETS = $(CLIENT) $(SERVER) + +COBJS = Test.o \ + Client.o \ + AllTests.o + +SOBJS = Test.o \ + TestI.o \ + Server.o + +SRCS = $(COBJS:.o=.cpp) \ + $(SOBJS:.o=.cpp) + +!include $(top_srcdir)/config/Make.rules.mak + +CPPFLAGS = -I. -I../../include $(CPPFLAGS) +LINKWITH = $(LIBS) icegrid$(LIBSUFFIX).lib glacier2$(LIBSUFFIX).lib + +$(CLIENT): $(COBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(COBJS), $@,, $(LINKWITH) + +$(SERVER): $(SOBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(SOBJS), $@,, $(LIBS) + +Test.cpp Test.h: Test.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) $(SLICE2CPPFLAGS) Test.ice + +clean:: + del /q Test.cpp Test.h + +!include .depend diff --git a/cpp/test/IceGrid/allocation/Makefile.mak b/cpp/test/IceGrid/allocation/Makefile.mak new file mode 100644 index 00000000000..b8a2f00b1f2 --- /dev/null +++ b/cpp/test/IceGrid/allocation/Makefile.mak @@ -0,0 +1,47 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = ..\..\.. + +CLIENT = client.exe +SERVER = server.exe + +TARGETS = $(CLIENT) $(SERVER) + +COBJS = Test.o \ + Client.o \ + AllTests.o + +SOBJS = Test.o \ + TestI.o \ + Server.o + +SRCS = $(COBJS:.o=.cpp) \ + $(SOBJS:.o=.cpp) + +!include $(top_srcdir)/config/Make.rules.mak + +CPPFLAGS = -I. -I../../include $(CPPFLAGS) +LINKWITH = $(LIBS) icegrid$(LIBSUFFIX).lib glacier2$(LIBSUFFIX).lib + +$(CLIENT): $(COBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(COBJS), $@,, $(LINKWITH) + +$(SERVER): $(SOBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(SOBJS), $@,, $(LIBS) + +Test.cpp Test.h: Test.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) $(SLICE2CPPFLAGS) Test.ice + +clean:: + del /q Test.cpp Test.h + +!include .depend diff --git a/cpp/test/IceGrid/deployer/Makefile.mak b/cpp/test/IceGrid/deployer/Makefile.mak new file mode 100644 index 00000000000..415c95a4ce9 --- /dev/null +++ b/cpp/test/IceGrid/deployer/Makefile.mak @@ -0,0 +1,73 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = ..\..\.. + +CLIENT = client.exe +SERVER = server.exe + +LIBNAME = testservice$(LIBSUFFIX).lib +DLLNAME = testservice$(LIBSUFFIX).dll + +TARGETS = $(CLIENT) $(SERVER) $(LIBNAME) $(DLLNAME) + +OBJS = Test.o + +COBJS = Client.o \ + AllTests.o + +SOBJS = TestI.o \ + Server.o + +SERVICE_OBJS = TestI.o \ + Service.o + +SRCS = $(OBJS:.o=.cpp) \ + $(COBJS:.o=.cpp) \ + $(SOBJS:.o=.cpp) \ + $(SERVICE_OBJS:.o=.cpp) + +!include $(top_srcdir)/config/Make.rules.mak + +CPPFLAGS = -I. -I../../include $(CPPFLAGS) +LINKWITH = $(LIBS) icebox$(LIBSUFFIX).lib + +$(LIBNAME) : $(DLLNAME) + +$(DLLNAME): $(OBJS) $(SERVICE_OBJS) + del /q $@ + $(LINK) $(LD_DLLFLAGS) $(OBJS) $(SERVICE_OBJS), $(DLLNAME),, $(LINKWITH) freeze$(LIBSUFFIX).lib + +$(CLIENT): $(OBJS) $(COBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(OBJS) $(COBJS), $@,, $(LINKWITH) icegrid$(LIBSUFFIX).lib glacier2$(LIBSUFFIX).lib + +$(SERVER): $(OBJS) $(SOBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(OBJS) $(SOBJS), $@,, $(LIBS) + +Test.cpp Test.h: Test.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) $(SLICE2CPPFLAGS) Test.ice + +clean:: + del /q Test.cpp Test.h + +!if "$(OPTIMIZE)" == "yes" + +all:: + @echo release > build.txt + +!else + +all:: + @echo debug > build.txt + +!endif + +!include .depend diff --git a/cpp/test/IceGrid/replication/Makefile.mak b/cpp/test/IceGrid/replication/Makefile.mak new file mode 100644 index 00000000000..415c95a4ce9 --- /dev/null +++ b/cpp/test/IceGrid/replication/Makefile.mak @@ -0,0 +1,73 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = ..\..\.. + +CLIENT = client.exe +SERVER = server.exe + +LIBNAME = testservice$(LIBSUFFIX).lib +DLLNAME = testservice$(LIBSUFFIX).dll + +TARGETS = $(CLIENT) $(SERVER) $(LIBNAME) $(DLLNAME) + +OBJS = Test.o + +COBJS = Client.o \ + AllTests.o + +SOBJS = TestI.o \ + Server.o + +SERVICE_OBJS = TestI.o \ + Service.o + +SRCS = $(OBJS:.o=.cpp) \ + $(COBJS:.o=.cpp) \ + $(SOBJS:.o=.cpp) \ + $(SERVICE_OBJS:.o=.cpp) + +!include $(top_srcdir)/config/Make.rules.mak + +CPPFLAGS = -I. -I../../include $(CPPFLAGS) +LINKWITH = $(LIBS) icebox$(LIBSUFFIX).lib + +$(LIBNAME) : $(DLLNAME) + +$(DLLNAME): $(OBJS) $(SERVICE_OBJS) + del /q $@ + $(LINK) $(LD_DLLFLAGS) $(OBJS) $(SERVICE_OBJS), $(DLLNAME),, $(LINKWITH) freeze$(LIBSUFFIX).lib + +$(CLIENT): $(OBJS) $(COBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(OBJS) $(COBJS), $@,, $(LINKWITH) icegrid$(LIBSUFFIX).lib glacier2$(LIBSUFFIX).lib + +$(SERVER): $(OBJS) $(SOBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(OBJS) $(SOBJS), $@,, $(LIBS) + +Test.cpp Test.h: Test.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) $(SLICE2CPPFLAGS) Test.ice + +clean:: + del /q Test.cpp Test.h + +!if "$(OPTIMIZE)" == "yes" + +all:: + @echo release > build.txt + +!else + +all:: + @echo debug > build.txt + +!endif + +!include .depend diff --git a/cpp/test/IceGrid/session/Makefile.mak b/cpp/test/IceGrid/session/Makefile.mak new file mode 100644 index 00000000000..093175becd6 --- /dev/null +++ b/cpp/test/IceGrid/session/Makefile.mak @@ -0,0 +1,38 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = ..\..\.. + +CLIENT = client.exe +SERVER = server.exe + +TARGETS = $(CLIENT) $(SERVER) + +COBJS = Client.o \ + AllTests.o + +SOBJS = Server.o + +SRCS = $(COBJS:.o=.cpp) \ + $(SOBJS:.o=.cpp) + +!include $(top_srcdir)/config/Make.rules.mak + +CPPFLAGS = -I. -I../../include $(CPPFLAGS) +LINKWITH = $(LIBS) glacier2$(LIBSUFFIX).lib + +$(CLIENT): $(COBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(COBJS), $@,, $(LINKWITH) icegrid$(LIBSUFFIX).lib + +$(SERVER): $(SOBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(SOBJS), $@,, $(LINKWITH) icessl$(LIBSUFFIX).lib + +!include .depend diff --git a/cpp/test/IceGrid/simple/Client.cpp b/cpp/test/IceGrid/simple/Client.cpp index 731a81e51e2..2d9314df5b2 100644 --- a/cpp/test/IceGrid/simple/Client.cpp +++ b/cpp/test/IceGrid/simple/Client.cpp @@ -46,6 +46,7 @@ int main(int argc, char* argv[]) { int status; + Ice::CommunicatorPtr communicator; try diff --git a/cpp/test/IceGrid/simple/Makefile.mak b/cpp/test/IceGrid/simple/Makefile.mak new file mode 100644 index 00000000000..b8a2f00b1f2 --- /dev/null +++ b/cpp/test/IceGrid/simple/Makefile.mak @@ -0,0 +1,47 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = ..\..\.. + +CLIENT = client.exe +SERVER = server.exe + +TARGETS = $(CLIENT) $(SERVER) + +COBJS = Test.o \ + Client.o \ + AllTests.o + +SOBJS = Test.o \ + TestI.o \ + Server.o + +SRCS = $(COBJS:.o=.cpp) \ + $(SOBJS:.o=.cpp) + +!include $(top_srcdir)/config/Make.rules.mak + +CPPFLAGS = -I. -I../../include $(CPPFLAGS) +LINKWITH = $(LIBS) icegrid$(LIBSUFFIX).lib glacier2$(LIBSUFFIX).lib + +$(CLIENT): $(COBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(COBJS), $@,, $(LINKWITH) + +$(SERVER): $(SOBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(SOBJS), $@,, $(LIBS) + +Test.cpp Test.h: Test.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) $(SLICE2CPPFLAGS) Test.ice + +clean:: + del /q Test.cpp Test.h + +!include .depend diff --git a/cpp/test/IceGrid/update/Makefile.mak b/cpp/test/IceGrid/update/Makefile.mak new file mode 100644 index 00000000000..b8a2f00b1f2 --- /dev/null +++ b/cpp/test/IceGrid/update/Makefile.mak @@ -0,0 +1,47 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = ..\..\.. + +CLIENT = client.exe +SERVER = server.exe + +TARGETS = $(CLIENT) $(SERVER) + +COBJS = Test.o \ + Client.o \ + AllTests.o + +SOBJS = Test.o \ + TestI.o \ + Server.o + +SRCS = $(COBJS:.o=.cpp) \ + $(SOBJS:.o=.cpp) + +!include $(top_srcdir)/config/Make.rules.mak + +CPPFLAGS = -I. -I../../include $(CPPFLAGS) +LINKWITH = $(LIBS) icegrid$(LIBSUFFIX).lib glacier2$(LIBSUFFIX).lib + +$(CLIENT): $(COBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(COBJS), $@,, $(LINKWITH) + +$(SERVER): $(SOBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(SOBJS), $@,, $(LIBS) + +Test.cpp Test.h: Test.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) $(SLICE2CPPFLAGS) Test.ice + +clean:: + del /q Test.cpp Test.h + +!include .depend diff --git a/cpp/test/IceSSL/Makefile.mak b/cpp/test/IceSSL/Makefile.mak new file mode 100644 index 00000000000..5db163ae72b --- /dev/null +++ b/cpp/test/IceSSL/Makefile.mak @@ -0,0 +1,19 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = ..\.. + +!include $(top_srcdir)/config/Make.rules.mak + +SUBDIRS = configuration + +$(EVERYTHING):: + @for %i in ( $(SUBDIRS) ) do \ + @echo "making $@ in %i" & \ + cmd /c "cd %i & $(MAKE) -f Makefile.mak $@" diff --git a/cpp/test/IceSSL/configuration/Makefile.mak b/cpp/test/IceSSL/configuration/Makefile.mak new file mode 100644 index 00000000000..0c6922711b2 --- /dev/null +++ b/cpp/test/IceSSL/configuration/Makefile.mak @@ -0,0 +1,46 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = ..\..\.. + +CLIENT = client.exe +SERVER = server.exe + +TARGETS = $(CLIENT) $(SERVER) + +COBJS = Test.o \ + Client.o \ + AllTests.o + +SOBJS = Test.o \ + TestI.o \ + Server.o + +SRCS = $(COBJS:.o=.cpp) \ + $(SOBJS:.o=.cpp) + +!include $(top_srcdir)/config/Make.rules.mak + +CPPFLAGS = -I. -I../../include $(CPPFLAGS) + +$(CLIENT): $(COBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(COBJS), $@,, $(LIBS) icessl$(LIBSUFFIX).lib + +$(SERVER): $(SOBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(SOBJS), $@,, $(LIBS) icessl$(LIBSUFFIX).lib + +Test.cpp Test.h: Test.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) $(SLICE2CPPFLAGS) Test.ice + +clean:: + del /q Test.cpp Test.h + +!include .depend diff --git a/cpp/test/IceStorm/Makefile.mak b/cpp/test/IceStorm/Makefile.mak new file mode 100644 index 00000000000..4512390f5eb --- /dev/null +++ b/cpp/test/IceStorm/Makefile.mak @@ -0,0 +1,21 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = ..\.. + +!include $(top_srcdir)\config\Make.rules.mak + +SUBDIRS = single \ + federation + #federation2 - nothing to do + +$(EVERYTHING):: + @for %i in ( $(SUBDIRS) ) do \ + @echo "making $@ in %i" & \ + cmd /c "cd %i & $(MAKE) -f Makefile.mak $@" diff --git a/cpp/test/IceStorm/federation/Makefile.mak b/cpp/test/IceStorm/federation/Makefile.mak new file mode 100644 index 00000000000..c47a5379bc2 --- /dev/null +++ b/cpp/test/IceStorm/federation/Makefile.mak @@ -0,0 +1,61 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = ..\..\.. + +PUBLISHER = publisher.exe +SUBSCRIBER = subscriber.exe + +TARGETS = $(PUBLISHER) $(SUBSCRIBER) + +OBJS = Event.o + +POBJS = Publisher.o + +SOBJS = Subscriber.o + +SRCS = $(OBJS:.o=.cpp) \ + $(POBJS:.o=.cpp) \ + $(SOBJS:.o=.cpp) + + +!include $(top_srcdir)/config/Make.rules.mak + +CPPFLAGS = -I. -I../../include $(CPPFLAGS) +LIBS = icestorm$(LIBSUFFIX).lib $(LIBS) + +$(PUBLISHER): $(OBJS) $(POBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(OBJS) $(POBJS), $@,, $(LIBS) + +$(SUBSCRIBER): $(OBJS) $(SOBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(OBJS) $(SOBJS), $@,, $(LIBS) + +Event.cpp Event.h: Event.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) $(SLICE2CPPFLAGS) Event.ice + +clean:: + del /q Event.cpp Event.h + +!if "$(OPTIMIZE)" == "yes" + +all:: + @echo release > build.txt + +!else + +all:: + @echo debug > build.txt +!endif + +clean:: + del /q db\topicmanager db\log.* + +!include .depend diff --git a/cpp/test/IceStorm/single/Makefile.mak b/cpp/test/IceStorm/single/Makefile.mak new file mode 100644 index 00000000000..52212941858 --- /dev/null +++ b/cpp/test/IceStorm/single/Makefile.mak @@ -0,0 +1,62 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = ..\..\.. + +PUBLISHER = publisher.exe +SUBSCRIBER = subscriber.exe + +TARGETS = $(PUBLISHER) $(SUBSCRIBER) + +OBJS = Single.o + +POBJS = Publisher.o + +SOBJS = Subscriber.o + +SRCS = $(OBJS:.o=.cpp) \ + $(POBJS:.o=.cpp) \ + $(SOBJS:.o=.cpp) + + +!include $(top_srcdir)/config/Make.rules.mak + +CPPFLAGS = -I. -I../../include $(CPPFLAGS) +LIBS = icestorm$(LIBSUFFIX).lib $(LIBS) + +$(PUBLISHER): $(OBJS) $(POBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(OBJS) $(POBJS), $@,, $(LIBS) + +$(SUBSCRIBER): $(OBJS) $(SOBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(OBJS) $(SOBJS), $@,, $(LIBS) + +Single.cpp Single.h: Single.ice $(SLICE2CPP) $(SLICEPARSERLIB) + $(SLICE2CPP) $(SLICE2CPPFLAGS) Single.ice + +clean:: + del /q Single.cpp Single.h + +!if "$(OPTIMIZE)" == "yes" + +all:: + @echo release > build.txt + +!else + +all:: + @echo debug > build.txt + +!endif + +clean:: + del /q db\topicmanager db\log.* + +!include .depend diff --git a/cpp/test/IceUtil/Makefile.mak b/cpp/test/IceUtil/Makefile.mak new file mode 100644 index 00000000000..13838651002 --- /dev/null +++ b/cpp/test/IceUtil/Makefile.mak @@ -0,0 +1,23 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = ..\.. + +!include $(top_srcdir)\config\Make.rules.mak + +SUBDIRS = thread \ + unicode \ + inputUtil \ + uuid \ + ctrlCHandler + +$(EVERYTHING):: + @for %i in ( $(SUBDIRS) ) do \ + @echo "making $@ in %i" & \ + cmd /c "cd %i & $(MAKE) -f Makefile.mak $@" diff --git a/cpp/test/IceUtil/ctrlCHandler/Makefile.mak b/cpp/test/IceUtil/ctrlCHandler/Makefile.mak new file mode 100644 index 00000000000..1e27b13947c --- /dev/null +++ b/cpp/test/IceUtil/ctrlCHandler/Makefile.mak @@ -0,0 +1,29 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = ..\..\.. + +CLIENT = client.exe + +TARGETS = $(CLIENT) + +OBJS = Client.o + + +SRCS = $(OBJS:.o=.cpp) + +!include $(top_srcdir)/config/Make.rules.mak + +CPPFLAGS = -I. -I../../include $(CPPFLAGS) + +$(CLIENT): $(OBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(OBJS), $@,, $(BASELIBS) + +!include .depend diff --git a/cpp/test/IceUtil/inputUtil/Client.cpp b/cpp/test/IceUtil/inputUtil/Client.cpp index 550d47581be..c7dc4808002 100644 --- a/cpp/test/IceUtil/inputUtil/Client.cpp +++ b/cpp/test/IceUtil/inputUtil/Client.cpp @@ -19,7 +19,10 @@ using namespace std; #define WS " \f\n\r\t\v" -#if defined(_MSC_VER) +#if defined(__BCPLUSPLUS__) +Int64 Int64Min = -9223372036854775808i64; +Int64 Int64Max = 9223372036854775807i64; +#elif defined(_MSC_VER) const Int64 Int64Min = -9223372036854775808i64; const Int64 Int64Max = 9223372036854775807i64; #elif defined(ICE_64) diff --git a/cpp/test/IceUtil/inputUtil/Makefile.mak b/cpp/test/IceUtil/inputUtil/Makefile.mak new file mode 100644 index 00000000000..1e27b13947c --- /dev/null +++ b/cpp/test/IceUtil/inputUtil/Makefile.mak @@ -0,0 +1,29 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = ..\..\.. + +CLIENT = client.exe + +TARGETS = $(CLIENT) + +OBJS = Client.o + + +SRCS = $(OBJS:.o=.cpp) + +!include $(top_srcdir)/config/Make.rules.mak + +CPPFLAGS = -I. -I../../include $(CPPFLAGS) + +$(CLIENT): $(OBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(OBJS), $@,, $(BASELIBS) + +!include .depend diff --git a/cpp/test/IceUtil/thread/Makefile.mak b/cpp/test/IceUtil/thread/Makefile.mak new file mode 100644 index 00000000000..af8fa776d8a --- /dev/null +++ b/cpp/test/IceUtil/thread/Makefile.mak @@ -0,0 +1,41 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = ..\..\.. + +CLIENT = client.exe + +TARGETS = $(CLIENT) + +OBJS = TestBase.o \ + CreateTest.o \ + AliveTest.o \ + StartTest.o \ + RWRecMutexTest.o \ + RecMutexTest.o \ + StaticMutexTest.o \ + MutexTest.o \ + MonitorMutexTest.o \ + MonitorRecMutexTest.o \ + CountDownLatchTest.o \ + TestSuite.o \ + Client.o + + +SRCS = $(OBJS:.o=.cpp) + +!include $(top_srcdir)/config/Make.rules.mak + +CPPFLAGS = -I. -I../../include $(CPPFLAGS) + +$(CLIENT): $(OBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(OBJS), $@,, $(BASELIBS) + +!include .depend diff --git a/cpp/test/IceUtil/unicode/Makefile.mak b/cpp/test/IceUtil/unicode/Makefile.mak new file mode 100644 index 00000000000..1e27b13947c --- /dev/null +++ b/cpp/test/IceUtil/unicode/Makefile.mak @@ -0,0 +1,29 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = ..\..\.. + +CLIENT = client.exe + +TARGETS = $(CLIENT) + +OBJS = Client.o + + +SRCS = $(OBJS:.o=.cpp) + +!include $(top_srcdir)/config/Make.rules.mak + +CPPFLAGS = -I. -I../../include $(CPPFLAGS) + +$(CLIENT): $(OBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(OBJS), $@,, $(BASELIBS) + +!include .depend diff --git a/cpp/test/IceUtil/uuid/Makefile.mak b/cpp/test/IceUtil/uuid/Makefile.mak new file mode 100644 index 00000000000..1e27b13947c --- /dev/null +++ b/cpp/test/IceUtil/uuid/Makefile.mak @@ -0,0 +1,29 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = ..\..\.. + +CLIENT = client.exe + +TARGETS = $(CLIENT) + +OBJS = Client.o + + +SRCS = $(OBJS:.o=.cpp) + +!include $(top_srcdir)/config/Make.rules.mak + +CPPFLAGS = -I. -I../../include $(CPPFLAGS) + +$(CLIENT): $(OBJS) + del /q $@ + $(LINK) $(LD_EXEFLAGS) $(OBJS), $@,, $(BASELIBS) + +!include .depend diff --git a/cpp/test/Makefile.mak b/cpp/test/Makefile.mak new file mode 100644 index 00000000000..56ec96d43ab --- /dev/null +++ b/cpp/test/Makefile.mak @@ -0,0 +1,26 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 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. +# +# ********************************************************************** + +top_srcdir = .. + +!include $(top_srcdir)/config/Make.rules.mak + +SUBDIRS = IceUtil \ + Ice \ + IceSSL \ + Glacier2 \ + Freeze \ + IceStorm \ + FreezeScript \ + IceGrid + +$(EVERYTHING):: + @for %i in ( $(SUBDIRS) ) do \ + @echo "making $@ in %i" & \ + cmd /c "cd %i & $(MAKE) -f Makefile.mak $@" |