From 96c87b5868d7f01320923fae307870538501acd5 Mon Sep 17 00:00:00 2001 From: Jose Date: Thu, 19 Jul 2012 16:39:19 +0200 Subject: ICE-4782 Generate "#pragma once" for include-guards in generated C++ header files. --- cpp/src/slice2cpp/Gen.cpp | 25 ++++--------------------- 1 file changed, 4 insertions(+), 21 deletions(-) (limited to 'cpp/src/slice2cpp/Gen.cpp') diff --git a/cpp/src/slice2cpp/Gen.cpp b/cpp/src/slice2cpp/Gen.cpp index f9cf0ecfd32..0d662a1c1f5 100644 --- a/cpp/src/slice2cpp/Gen.cpp +++ b/cpp/src/slice2cpp/Gen.cpp @@ -184,12 +184,12 @@ Slice::Gen::Gen(const string& base, const string& headerExtension, const string& Slice::Gen::~Gen() { - H << "\n\n#endif\n"; + H << '\n'; C << '\n'; if(_impl) { - implH << "\n\n#endif\n"; + implH << '\n'; implC << '\n'; } } @@ -250,15 +250,7 @@ Slice::Gen::generate(const UnitPtr& p) } FileTracker::instance()->addFile(fileImplC); - string s = fileImplH; - if(_include.size()) - { - s = _include + '/' + s; - } - transform(s.begin(), s.end(), s.begin(), ToIfdef()); - implH << "#ifndef __" << s << "__"; - implH << "\n#define __" << s << "__"; - implH << '\n'; + implH << "#pragma once\n"; } string fileH = _base + "." + _headerExtension; @@ -292,16 +284,7 @@ Slice::Gen::generate(const UnitPtr& p) printHeader(C); printGeneratedHeader(C, _base + ".ice"); - - string s = fileH; - if(_include.size()) - { - s = _include + '/' + s; - } - transform(s.begin(), s.end(), s.begin(), ToIfdef()); - H << "\n#ifndef __" << s << "__"; - H << "\n#define __" << s << "__"; - H << '\n'; + H << "#pragma once\n"; validateMetaData(p); -- cgit v1.2.3 From d0994b8115bc70f04b772d21365703a3a106587d Mon Sep 17 00:00:00 2001 From: Jose Date: Thu, 19 Jul 2012 18:26:38 +0200 Subject: Remove BCC support --- .gitignore | 4 +- cpp/allTests.py | 22 +-- cpp/config/Make.rules.bcc | 56 -------- cpp/config/Make.rules.mak | 19 +-- cpp/demo/Freeze/bench/Client.cpp | 8 +- cpp/demo/Freeze/casino/BankI.h | 2 +- cpp/demo/Freeze/casino/BetResolver.h | 2 +- cpp/demo/Freeze/casino/Server.cpp | 2 +- cpp/demo/Freeze/customEvictor/CurrentDatabase.cpp | 2 +- cpp/include/Ice/Handle.h | 19 --- cpp/include/Ice/ProxyHandle.h | 11 -- cpp/include/Ice/Stream.h | 21 --- cpp/include/IceUtil/AbstractMutex.h | 6 - cpp/include/IceUtil/Cache.h | 4 +- cpp/include/IceUtil/Config.h | 28 +--- cpp/include/IceUtil/FileUtil.h | 2 +- cpp/include/IceUtil/Handle.h | 19 --- cpp/include/Slice/Preprocessor.h | 3 - cpp/src/Freeze/EvictorI.h | 6 +- cpp/src/Freeze/ObjectStore.h | 7 - cpp/src/Freeze/SharedDbEnv.cpp | 4 - cpp/src/FreezeScript/DumpDB.cpp | 3 +- cpp/src/FreezeScript/transformdb.cpp | 3 +- cpp/src/Glacier2/Glacier2Router.cpp | 3 +- cpp/src/Ice/ConnectionRequestHandler.cpp | 14 +- cpp/src/Ice/DLLMain.cpp | 7 - cpp/src/Ice/DynamicLibrary.cpp | 5 - cpp/src/Ice/Makefile.mak | 8 -- cpp/src/Ice/Service.cpp | 9 -- cpp/src/Ice/ThreadPool.h | 2 +- cpp/src/IceBox/Admin.cpp | 3 +- cpp/src/IceBox/Service.cpp | 3 +- cpp/src/IceGrid/Client.cpp | 3 +- cpp/src/IceGrid/IceGridNode.cpp | 3 +- cpp/src/IceGrid/IceGridRegistry.cpp | 3 +- cpp/src/IcePatch2/Calc.cpp | 3 +- cpp/src/IcePatch2/Client.cpp | 3 +- cpp/src/IcePatch2/Server.cpp | 10 -- cpp/src/IcePatch2Lib/Util.cpp | 156 +--------------------- cpp/src/IceStorm/Admin.cpp | 3 +- cpp/src/IceStorm/FreezeDB/Migrate.cpp | 3 +- cpp/src/IceUtil/FileUtil.cpp | 4 - cpp/src/IceUtil/InputUtil.cpp | 4 +- cpp/src/IceUtil/Time.cpp | 10 -- cpp/src/IceXML/Parser.cpp | 4 - cpp/src/Slice/Util.cpp | 4 - cpp/src/iceserviceinstall/Install.cpp | 10 -- cpp/src/slice2cpp/Gen.cpp | 12 -- cpp/test/Ice/Makefile.mak | 2 +- cpp/test/Ice/info/Makefile.mak | 1 + cpp/test/IceGrid/distribution/run.py | 6 +- cpp/test/IceGrid/fileLock/run.py | 2 +- cpp/test/IceStorm/federation2/run.py | 6 +- cpp/test/IceStorm/stress/run.py | 6 +- cpp/test/IceUtil/inputUtil/Client.cpp | 5 +- cpp/test/IceUtil/unicode/Client.cpp | 11 +- cpp/test/Makefile.mak | 4 +- cpp/test/include/TestCommon.h | 74 +++++----- demoscript/Util.py | 4 +- distribution/bin/makemsi.py | 18 +-- distribution/src/common/Make.rules.mak | 13 +- distribution/src/common/README.DEMOS.txt | 57 ++------ perf/src/Ice/raw/cpp/Client.cpp | 8 -- perf/src/Ice/raw/cpp/Server.cpp | 8 -- scripts/IceGridAdmin.py | 4 +- scripts/IceStormUtil.py | 2 +- scripts/TestUtil.py | 18 +-- 67 files changed, 129 insertions(+), 662 deletions(-) delete mode 100644 cpp/config/Make.rules.bcc (limited to 'cpp/src/slice2cpp/Gen.cpp') diff --git a/.gitignore b/.gitignore index b4f491a3dd6..69830991607 100644 --- a/.gitignore +++ b/.gitignore @@ -59,4 +59,6 @@ vcproj .DS_Store cpp/SDKs cpp/demo/ipch -cpp/demo/Debug \ No newline at end of file +cpp/demo/Debug + +cpp/test/IceBox/configuration/build.txt \ No newline at end of file diff --git a/cpp/allTests.py b/cpp/allTests.py index 046dfe586ce..095a203853b 100755 --- a/cpp/allTests.py +++ b/cpp/allTests.py @@ -35,7 +35,7 @@ tests = [ ("Slice/errorDetection", ["once"]), ("Slice/keyword", ["once"]), ("Slice/structure", ["once"]), - ("Ice/properties", ["once", "novc6", "nobcc"]), + ("Ice/properties", ["once", "novc6"]), ("Ice/proxy", ["core"]), ("Ice/operations", ["core"]), ("Ice/exceptions", ["core"]), @@ -67,7 +67,7 @@ tests = [ ("Ice/defaultValue", ["core"]), ("Ice/invoke", ["core", "novc6"]), ("IceSSL/configuration", ["once", "novalgrind"]), # valgrind doesn't work well with openssl - ("IceBox/configuration", ["core", "noipv6", "nobcc", "novc6"]), + ("IceBox/configuration", ["core", "noipv6", "novc6"]), ("Freeze/dbmap", ["once", "novc6"]), ("Freeze/complex", ["once", "novc6"]), ("Freeze/evictor", ["core", "novc6"]), @@ -82,15 +82,15 @@ tests = [ ("FreezeScript/dbmap", ["once", "novc6"]), ("FreezeScript/evictor", ["once", "novc6"]), ("IceGrid/simple", ["service", "novc6"]), - ("IceGrid/fileLock", ["service", "nobcc", "novc6"]), - ("IceGrid/deployer", ["service", "nobcc", "novc6"]), - ("IceGrid/session", ["service", "nobcc", "novc6"]), - ("IceGrid/update", ["service", "nobcc", "novc6"]), - ("IceGrid/activation", ["service", "nobcc", "novc6"]), - ("IceGrid/replicaGroup", ["service", "nobcc", "novc6"]), - ("IceGrid/replication", ["service", "nobcc", "novc6"]), - ("IceGrid/allocation", ["service", "nobcc", "novc6"]), - ("IceGrid/distribution", ["service", "nobcc", "novc6"]), + ("IceGrid/fileLock", ["service", "novc6"]), + ("IceGrid/deployer", ["service", "novc6"]), + ("IceGrid/session", ["service", "novc6"]), + ("IceGrid/update", ["service", "novc6"]), + ("IceGrid/activation", ["service", "novc6"]), + ("IceGrid/replicaGroup", ["service", "novc6"]), + ("IceGrid/replication", ["service", "novc6"]), + ("IceGrid/allocation", ["service", "novc6"]), + ("IceGrid/distribution", ["service", "novc6"]), ("IceGrid/admin", ["service", "novc6"]), ("Glacier2/router", ["service", "novc6"]), ("Glacier2/attack", ["service", "novc6"]), diff --git a/cpp/config/Make.rules.bcc b/cpp/config/Make.rules.bcc deleted file mode 100644 index 7e8afe8a0a9..00000000000 --- a/cpp/config/Make.rules.bcc +++ /dev/null @@ -1,56 +0,0 @@ -# ********************************************************************** -# -# Copyright (c) 2003-2012 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. -# -# The following warnings are suppressed when building Ice: -# -# -w-par: W8057 - Parameter is never used -# -w-lvc: W8031 - Temporary used for parameter -# -w-rch: W8066 - Unreachable code -# -# Ice and Ice applications must be built with multi-threaded support (-tWM) -# and linked with the multi-threaded runtime library (cw32mti.lib). -# - -CXX = bcc32.exe -CC = bcc32.exe -LINK = ilink32.exe -RC = brc32.exe - -BASE = -b -PREOUT = , -PRELIBS = ,, -PRELIBPATH = -L - -SETARGV = wildargs.obj - -CPPFLAGS = $(CPPFLAGS) -q -w-par -w-lvc -w-rch -vi- -tWM -c -DNO_STRICT;_NO_VCL;_RTLDLL - -!if "$(OPTIMIZE)" == "yes" -CPPFLAGS = $(CPPFLAGS) -O2 -k- -DNDEBUG -!else -CPPFLAGS = $(CPPFLAGS) -Od -v -k -D_DEBUG -!endif - -LDFLAGS = $(LDFLAGS) -L"$(BDS)\lib" -q -Gn -v -x - -LD_DLLFLAGS = $(LDFLAGS) -Gi -Tpd c0d32.obj -LD_EXEFLAGS = $(LDFLAGS) -Tpe c0x32.obj - -ICE_OS_LIBS = cw32mti.lib import32.lib - -BASELIBS = iceutil$(LIBSUFFIX).lib $(ICE_OS_LIBS) -LIBS = ice$(LIBSUFFIX).lib $(BASELIBS) - -BZIP2_LIBS = libbz2.lib -DB_LIBS = libdb48.lib -MCPP_LIBS = mcpp.lib -ICONV_LIB = libiconv-bcc.lib diff --git a/cpp/config/Make.rules.mak b/cpp/config/Make.rules.mak index 7173648c14f..3b5b419c8a6 100755 --- a/cpp/config/Make.rules.mak +++ b/cpp/config/Make.rules.mak @@ -28,7 +28,7 @@ prefix = C:\Ice-$(VERSION) # # Specify your C++ compiler. Supported values are: -# VC60, VC90, VC90_EXPRESS, VC100, VC100_EXPRESS, BCC2010, VC110, VC110_EXPRESS +# VC60, VC90, VC90_EXPRESS, VC100, VC100_EXPRESS, VC110, VC110_EXPRESS # !if "$(CPP_COMPILER)" == "" CPP_COMPILER = VC90 @@ -97,13 +97,10 @@ SETARGV = setargv.obj # # Compiler specific definitions # -!if "$(CPP_COMPILER)" == "BCC2010" -BCPLUSPLUS = yes -!include $(top_srcdir)/config/Make.rules.bcc -!elseif "$(CPP_COMPILER)" == "VC60" || \ +!if "$(CPP_COMPILER)" == "VC60" || \ "$(CPP_COMPILER)" == "VC90" || "$(CPP_COMPILER)" == "VC90_EXPRESS" || \ "$(CPP_COMPILER)" == "VC100" || "$(CPP_COMPILER)" == "VC100_EXPRESS" || \ - "$(CPP_COMPILER)" == "VC110" || "$(CPP_COMPILER)" == "VC110_EXPRESS" + "$(CPP_COMPILER)" == "VC110" || "$(CPP_COMPILER)" == "VC110_EXPRESS" !include $(top_srcdir)/config/Make.rules.msvc ! else !error Invalid setting for CPP_COMPILER: $(CPP_COMPILER) @@ -113,9 +110,7 @@ BCPLUSPLUS = yes !error CPP_COMPILER: $(CPP_COMPILER) not supported to build Ice for WinRT !endif -!if "$(CPP_COMPILER)" == "BCC2010" -libsuff = \bcc10 -!elseif "$(CPP_COMPILER)" == "VC60" +!if "$(CPP_COMPILER)" == "VC60" libsuff = \vc6 UNIQUE_DLL_NAMES = yes !elseif "$(CPP_COMPILER)" == "VC100" || "$(CPP_COMPILER)" == "VC100_EXPRESS" @@ -146,11 +141,9 @@ COMPSUFFIX = vc60_ !elseif "$(CPP_COMPILER)" == "VC90" || "$(CPP_COMPILER)" == "VC90_EXPRESS" COMPSUFFIX = vc90_ !elseif "$(CPP_COMPILER)" == "VC100" || "$(CPP_COMPILER)" == "VC100_EXPRESS" -COMPSUFFIX = vc100_ +COMPSUFFIX = vc100_ !elseif "$(CPP_COMPILER)" == "VC110" || "$(CPP_COMPILER)" == "VC110_EXPRESS" COMPSUFFIX = vc110_ -!elseif "$(CPP_COMPILER)" == "BCC2010" -COMPSUFFIX = bcc10_ !endif !endif @@ -301,4 +294,4 @@ clean:: install:: -depend:: \ No newline at end of file +depend:: diff --git a/cpp/demo/Freeze/bench/Client.cpp b/cpp/demo/Freeze/bench/Client.cpp index b86979edd16..2b20779bcf4 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(__BCPLUSPLUS__) || (defined(_MSC_VER) && (_MSC_VER < 1310)) +#if (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(__BCPLUSPLUS__) || (defined(_MSC_VER) && (_MSC_VER < 1310)) +#if (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(__BCPLUSPLUS__) || (defined(_MSC_VER) && (_MSC_VER < 1310)) +#if (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(__BCPLUSPLUS__) || (defined(_MSC_VER) && (_MSC_VER < 1310)) +#if (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/casino/BankI.h b/cpp/demo/Freeze/casino/BankI.h index ad0e3ba899a..99cd3d6126f 100644 --- a/cpp/demo/Freeze/casino/BankI.h +++ b/cpp/demo/Freeze/casino/BankI.h @@ -54,7 +54,7 @@ private: std::vector getBets(const Ice::ObjectAdapterPtr&) const; -#if (defined(_MSC_VER) && (_MSC_VER < 1300)) || defined(__BCPLUSPLUS__) +#if (defined(_MSC_VER) && (_MSC_VER < 1300)) // // Some compilers don't let local classes access private data members // diff --git a/cpp/demo/Freeze/casino/BetResolver.h b/cpp/demo/Freeze/casino/BetResolver.h index cd441ed2718..5c05b2e44a8 100644 --- a/cpp/demo/Freeze/casino/BetResolver.h +++ b/cpp/demo/Freeze/casino/BetResolver.h @@ -30,7 +30,7 @@ public: int getBetCount() const; -#if (!defined(_MSC_VER) || (_MSC_VER >= 1300)) && (!defined(__BCPLUSPLUS__)) +#if (!defined(_MSC_VER) || (_MSC_VER >= 1300)) // // Some compilers don't let local classes access private members // diff --git a/cpp/demo/Freeze/casino/Server.cpp b/cpp/demo/Freeze/casino/Server.cpp index f84b4b6bca2..d8f1a937d08 100644 --- a/cpp/demo/Freeze/casino/Server.cpp +++ b/cpp/demo/Freeze/casino/Server.cpp @@ -30,7 +30,7 @@ private: map createTypeMap(const string&); const string _envName; -#if (defined(_MSC_VER) && (_MSC_VER < 1300)) || defined(__BCPLUSPLUS__) +#if (defined(_MSC_VER) && (_MSC_VER < 1300)) // // Some compilers don't let local classes access private data members // diff --git a/cpp/demo/Freeze/customEvictor/CurrentDatabase.cpp b/cpp/demo/Freeze/customEvictor/CurrentDatabase.cpp index 7d4c613ab60..2800b3991cc 100644 --- a/cpp/demo/Freeze/customEvictor/CurrentDatabase.cpp +++ b/cpp/demo/Freeze/customEvictor/CurrentDatabase.cpp @@ -18,7 +18,7 @@ using namespace IceUtil; // can only create and destroy one CurrentDatabase per process run. // -#if defined(_MSC_VER) || defined(__BCPLUSPLUS__) +#ifdef _MSC_VER #define __thread __declspec(thread) #endif diff --git a/cpp/include/Ice/Handle.h b/cpp/include/Ice/Handle.h index 7ee19c57c6a..1d1703d36c7 100644 --- a/cpp/include/Ice/Handle.h +++ b/cpp/include/Ice/Handle.h @@ -35,17 +35,6 @@ template class Handle : public ::IceUtil::HandleBase { public: - -#if defined(__BCPLUSPLUS__) && (__BCPLUSPLUS__ >= 0x0600) - // - // C++Builder 2009 does not allow setting Ptr to 0. - // - Handle(int p) - { - assert(p == 0); - this->_ptr = 0; - } -#endif Handle(T* p = 0) { @@ -182,21 +171,13 @@ public: template static Handle dynamicCast(const ::IceUtil::HandleBase& r) { -#ifdef __BCPLUSPLUS__ - return Handle(dynamic_cast(r._ptr)); -#else return Handle(dynamic_cast(r._ptr)); -#endif } template static Handle dynamicCast(Y* p) { -#ifdef __BCPLUSPLUS__ - return Handle(dynamic_cast(p)); -#else return Handle(dynamic_cast(p)); -#endif } void __clearHandleUnsafe() diff --git a/cpp/include/Ice/ProxyHandle.h b/cpp/include/Ice/ProxyHandle.h index 8a271c7e834..b23958d26d5 100644 --- a/cpp/include/Ice/ProxyHandle.h +++ b/cpp/include/Ice/ProxyHandle.h @@ -113,17 +113,6 @@ template class ProxyHandle : public ::IceUtil::HandleBase { public: - -#if defined(__BCPLUSPLUS__) && (__BCPLUSPLUS__ >= 0x0600) - // - // C++Builder 2009 does not allow setting Prx to 0. - // - ProxyHandle(int p) - { - assert(p == 0); - this->_ptr = 0; - } -#endif ProxyHandle(T* p = 0) { diff --git a/cpp/include/Ice/Stream.h b/cpp/include/Ice/Stream.h index 839ce185b62..e44bb1f31af 100644 --- a/cpp/include/Ice/Stream.h +++ b/cpp/include/Ice/Stream.h @@ -36,9 +36,7 @@ enum StreamTraitType StreamTraitTypeShortEnum, // Enums with up to 32767 enumerators StreamTraitTypeIntEnum, // Enums with more than 32767 enumerators StreamTraitTypeSequence, -#ifndef __BCPLUSPLUS__ // COMPILERFIX: See StreamTrait> comment below StreamTraitTypeSequenceBool, -#endif StreamTraitTypeDictionary, StreamTraitTypeUserException, StreamTraitTypeUnknown @@ -72,17 +70,12 @@ struct StreamTrait< ::std::vector > // sequences (see StreamReader::read // implementation below) // -// COMPILERFIX: BCC2010 doesn't allow use of full specialization over -// partial specialization. -// -#ifndef __BCPLUSPLUS__ template<> struct StreamTrait< ::std::vector > { static const StreamTraitType type = StreamTraitTypeSequenceBool; static const int minWireSize = 1; }; -#endif template<> struct StreamTrait @@ -260,18 +253,6 @@ public: virtual void sliceObjects(bool) = 0; - // - // COMPILERFIX: BCC2010 doesn't allow use of full specialization over - // partial specialization. - // -#ifdef __BCPLUSPLUS__ - void - read(::std::_Vb_reference v) - { - v = readBool(); - } -#endif - ICE_DEPRECATED_API virtual bool readBool() = 0; ICE_DEPRECATED_API virtual Byte readByte() = 0; ICE_DEPRECATED_API virtual Short readShort() = 0; @@ -650,7 +631,6 @@ struct StreamReader } }; -#ifndef __BCPLUSPLUS__ // COMPILERFIX: See StreamTrait> comment above template<> // StreamWriter specialization for sequences of bool struct StreamWriter { @@ -685,7 +665,6 @@ struct StreamReader } } }; -#endif template<> // StreamWriter specialization for dictionaries. struct StreamWriter diff --git a/cpp/include/IceUtil/AbstractMutex.h b/cpp/include/IceUtil/AbstractMutex.h index 8b757cfa771..c0805160a1e 100644 --- a/cpp/include/IceUtil/AbstractMutex.h +++ b/cpp/include/IceUtil/AbstractMutex.h @@ -35,10 +35,8 @@ class AbstractMutexI : public AbstractMutex, public T { public: -#ifndef __BCPLUSPLUS__ typedef LockT Lock; typedef TryLockT TryLock; -#endif virtual void lock() const { @@ -64,10 +62,8 @@ class AbstractMutexReadI : public AbstractMutex, public T { public: -#ifndef __BCPLUSPLUS__ typedef LockT Lock; typedef TryLockT TryLock; -#endif virtual void lock() const { @@ -93,10 +89,8 @@ class AbstractMutexWriteI : public AbstractMutex, public T { public: -#ifndef __BCPLUSPLUS__ typedef LockT Lock; typedef TryLockT TryLock; -#endif virtual void lock() const { diff --git a/cpp/include/IceUtil/Cache.h b/cpp/include/IceUtil/Cache.h index b0fd325522b..31d6e7cc460 100644 --- a/cpp/include/IceUtil/Cache.h +++ b/cpp/include/IceUtil/Cache.h @@ -174,7 +174,7 @@ Cache::pin(const Key& key, const Handle& obj) std::pair ir = #endif -#if defined(_MSC_VER) +#ifdef _MSC_VER _map.insert(CacheMap::value_type(key, CacheValue(obj))); #else _map.insert(typename CacheMap::value_type(key, CacheValue(obj))); @@ -228,7 +228,7 @@ Cache::pinImpl(const Key& key, const Handle& newObj) std::pair ir = #endif -#if defined(_MSC_VER) || defined(__BCPLUSPLUS__) +#if defined(_MSC_VER) _map.insert(CacheMap::value_type(key, CacheValue(0))); #else _map.insert(typename CacheMap::value_type(key, CacheValue(0))); diff --git a/cpp/include/IceUtil/Config.h b/cpp/include/IceUtil/Config.h index 64d101366c3..d6e89cdf7fe 100644 --- a/cpp/include/IceUtil/Config.h +++ b/cpp/include/IceUtil/Config.h @@ -65,7 +65,7 @@ // // TODO: more macros to support IBM Visual Age _Export syntax as well. // -#if defined(__BCPLUSPLUS__) || (defined(_MSC_VER) && !defined(ICE_STATIC_LIBS)) || \ +#if (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) @@ -102,7 +102,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) && !defined(__BCPLUSPLUS__) +#if !defined(NDEBUG) && !defined(_STLP_DEBUG) && !defined(__INTEL_COMPILER) # define _STLP_DEBUG #endif @@ -198,7 +198,7 @@ private: // // Int64 typedef // -#if defined(__BCPLUSPLUS__) || defined(_MSC_VER) +#ifdef _MSC_VER // // On Windows, long is always 32-bit // @@ -214,7 +214,7 @@ typedef long long Int64; // // ICE_INT64: macro for Int64 literal values // -#if defined(__BCPLUSPLUS__) || defined(_MSC_VER) +#if defined(_MSC_VER) # define ICE_INT64(n) n##i64 #elif defined(ICE_64) # define ICE_INT64(n) n##L @@ -228,23 +228,3 @@ typedef long long Int64; #define ICE_STRING_VERSION "3.4.2" // "A.B.C", with A=major, B=minor, C=patch #define ICE_INT_VERSION 30402 // AABBCC, with AA=major, BB=minor, CC=patch -#if defined(__BCPLUSPLUS__) && (__BCPLUSPLUS__ >= 0x0600) -// -// Dummy class used in work around for bug in C++Builder 2009 -// http://qc.embarcadero/wc/qcmain.aspx?d=71611 -// -namespace IceUtil -{ - -class DummyBCC -{ -public: - - ~DummyBCC() - { - } -}; - -} -#endif - diff --git a/cpp/include/IceUtil/FileUtil.h b/cpp/include/IceUtil/FileUtil.h index cad934ca36c..666ea5ec6a7 100644 --- a/cpp/include/IceUtil/FileUtil.h +++ b/cpp/include/IceUtil/FileUtil.h @@ -38,7 +38,7 @@ ICE_UTIL_API bool directoryExists(const std::string&); #ifdef _WIN32 -#if defined(__BCPLUSPLUS__) || (defined(_MSC_VER) && (_MSC_VER < 1300)) +#if (defined(_MSC_VER) && (_MSC_VER < 1300)) typedef struct _stat structstat; #else typedef struct _stat64i32 structstat; diff --git a/cpp/include/IceUtil/Handle.h b/cpp/include/IceUtil/Handle.h index a57dd25b04a..8e75db3bae4 100644 --- a/cpp/include/IceUtil/Handle.h +++ b/cpp/include/IceUtil/Handle.h @@ -146,17 +146,6 @@ template class Handle : public HandleBase { public: - -#if defined(__BCPLUSPLUS__) && (__BCPLUSPLUS__ >= 0x0600) - // - // C++Builder 2009 does not allow setting Ptr to 0. - // - Handle(int p) - { - assert(p == 0); - this->_ptr = 0; - } -#endif Handle(T* p = 0) { @@ -261,21 +250,13 @@ public: template static Handle dynamicCast(const HandleBase& r) { -#ifdef __BCPLUSPLUS__ - return Handle(dynamic_cast(r._ptr)); -#else return Handle(dynamic_cast(r._ptr)); -#endif } template static Handle dynamicCast(Y* p) { -#ifdef __BCPLUSPLUS__ - return Handle(dynamic_cast(p)); -#else return Handle(dynamic_cast(p)); -#endif } }; diff --git a/cpp/include/Slice/Preprocessor.h b/cpp/include/Slice/Preprocessor.h index 444ee12d967..ee58e8f312c 100644 --- a/cpp/include/Slice/Preprocessor.h +++ b/cpp/include/Slice/Preprocessor.h @@ -12,9 +12,6 @@ #include #include #include -#ifdef __BCPLUSPLUS__ -# include -#endif #ifndef SLICE_API # ifdef SLICE_API_EXPORTS diff --git a/cpp/src/Freeze/EvictorI.h b/cpp/src/Freeze/EvictorI.h index 671603d106b..bbfae83a260 100755 --- a/cpp/src/Freeze/EvictorI.h +++ b/cpp/src/Freeze/EvictorI.h @@ -217,7 +217,7 @@ protected: } ObjectStore* store = new ObjectStore(facet, facetType,_createDb, this, storeIndices, populateEmptyIndices); -#if defined(__BCPLUSPLUS__) || (defined(_MSC_VER) && (_MSC_VER < 1300)) +#if (defined(_MSC_VER) && (_MSC_VER < 1300)) _storeMap.insert(StoreMap::value_type(facet, store)); #else _storeMap.insert(typename StoreMap::value_type(facet, store)); @@ -232,7 +232,7 @@ protected: { facet = ""; } -#if defined(__BCPLUSPLUS__) || (defined(_MSC_VER) && (_MSC_VER < 1300)) +#if (defined(_MSC_VER) && (_MSC_VER < 1300)) std::pair ir = _storeMap.insert(StoreMap::value_type(facet, 0)); #elif (defined(_MSC_VER) && (_MSC_VER >= 1600)) @@ -278,7 +278,7 @@ protected: } os = new ObjectStore(facet, facetType, true, this); -#if defined(__BCPLUSPLUS__) || (defined(_MSC_VER) && (_MSC_VER < 1300)) +#if (defined(_MSC_VER) && (_MSC_VER < 1300)) _storeMap.insert(StoreMap::value_type(facet, os)); #else _storeMap.insert(typename StoreMap::value_type(facet, os)); diff --git a/cpp/src/Freeze/ObjectStore.h b/cpp/src/Freeze/ObjectStore.h index 2a3739379de..189edfe0017 100644 --- a/cpp/src/Freeze/ObjectStore.h +++ b/cpp/src/Freeze/ObjectStore.h @@ -93,14 +93,7 @@ class ObjectStore : public ObjectStoreBase, public IceUtil::Cache Cache; diff --git a/cpp/src/Freeze/SharedDbEnv.cpp b/cpp/src/Freeze/SharedDbEnv.cpp index 9765aefd56d..8da91a02793 100644 --- a/cpp/src/Freeze/SharedDbEnv.cpp +++ b/cpp/src/Freeze/SharedDbEnv.cpp @@ -89,10 +89,8 @@ dbErrCallback(const char* prefix, char* msg) out << "DbEnv \"" << env->getEnvName() << "\": " << msg; } -#ifndef __BCPLUSPLUS__ // COMPILERFIX namespace { -#endif Mutex* mapMutex = 0; Mutex* refCountMutex = 0; @@ -119,9 +117,7 @@ public: Init init; -#ifndef __BCPLUSPLUS__ // COMPILERFIX } -#endif typedef map SharedDbEnvMap; SharedDbEnvMap* sharedDbEnvMap; diff --git a/cpp/src/FreezeScript/DumpDB.cpp b/cpp/src/FreezeScript/DumpDB.cpp index 13d8e1554bf..5472b1d50a8 100755 --- a/cpp/src/FreezeScript/DumpDB.cpp +++ b/cpp/src/FreezeScript/DumpDB.cpp @@ -629,8 +629,7 @@ run(const Ice::StringSeq& originalArgs, const Ice::CommunicatorPtr& communicator return status; } -//COMPILERFIX: Borland C++ 2010 doesn't support wmain for console applications. -#if defined(_WIN32 ) && !defined(__BCPLUSPLUS__) +#ifdef _WIN32 int wmain(int argc, wchar_t* argv[]) diff --git a/cpp/src/FreezeScript/transformdb.cpp b/cpp/src/FreezeScript/transformdb.cpp index 7d8573fe09d..6a6bd5fe7f5 100755 --- a/cpp/src/FreezeScript/transformdb.cpp +++ b/cpp/src/FreezeScript/transformdb.cpp @@ -928,8 +928,7 @@ run(const Ice::StringSeq& originalArgs, const Ice::CommunicatorPtr& communicator return status; } -//COMPILERFIX: Borland C++ 2010 doesn't support wmain for console applications. -#if defined(_WIN32 ) && !defined(__BCPLUSPLUS__) +#ifdef _WIN32 int wmain(int argc, wchar_t* argv[]) diff --git a/cpp/src/Glacier2/Glacier2Router.cpp b/cpp/src/Glacier2/Glacier2Router.cpp index b5d38c7c642..93af7ddb963 100644 --- a/cpp/src/Glacier2/Glacier2Router.cpp +++ b/cpp/src/Glacier2/Glacier2Router.cpp @@ -612,8 +612,7 @@ Glacier2::RouterService::usage(const string& appName) print("Usage: " + appName + " [options]\n" + options); } -//COMPILERFIX: Borland C++ 2010 doesn't support wmain for console applications. -#if defined(_WIN32 ) && !defined(__BCPLUSPLUS__) +#ifdef _WIN32 int wmain(int argc, wchar_t* argv[]) diff --git a/cpp/src/Ice/ConnectionRequestHandler.cpp b/cpp/src/Ice/ConnectionRequestHandler.cpp index 9a4c75122c0..d7571419139 100644 --- a/cpp/src/Ice/ConnectionRequestHandler.cpp +++ b/cpp/src/Ice/ConnectionRequestHandler.cpp @@ -21,19 +21,7 @@ using namespace IceInternal; ConnectionRequestHandler::ConnectionRequestHandler(const ReferencePtr& reference, const Ice::ObjectPrx& proxy) : RequestHandler(reference) { -// COMPILERFIX: Without the catch/rethrow C++Builder 2007 can get access violations. -#ifdef __BCPLUSPLUS__ - try - { -#endif - _connection = _reference->getConnection(_compress); -#ifdef __BCPLUSPLUS__ - } - catch(const Ice::LocalException&) - { - throw; - } -#endif + _connection = _reference->getConnection(_compress); RouterInfoPtr ri = reference->getRouterInfo(); if(ri) { diff --git a/cpp/src/Ice/DLLMain.cpp b/cpp/src/Ice/DLLMain.cpp index f45db86139a..7a67e55e6d6 100644 --- a/cpp/src/Ice/DLLMain.cpp +++ b/cpp/src/Ice/DLLMain.cpp @@ -16,10 +16,6 @@ extern "C" { BOOL WINAPI -#ifdef __BCPLUSPLUS__ -DllMain(HINSTANCE hDLL, DWORD reason, LPVOID reserved) -{ -#else ice_DLL_Main(HINSTANCE hDLL, DWORD reason, LPVOID reserved) { // @@ -32,7 +28,6 @@ ice_DLL_Main(HINSTANCE hDLL, DWORD reason, LPVOID reserved) return FALSE; } } -#endif if(reason == DLL_PROCESS_ATTACH) { @@ -43,7 +38,6 @@ ice_DLL_Main(HINSTANCE hDLL, DWORD reason, LPVOID reserved) Ice::ImplicitContextI::cleanupThread(); } -#ifndef __BCPLUSPLUS__ // // During DETACH, we must call _CRT_INIT last. // @@ -54,7 +48,6 @@ ice_DLL_Main(HINSTANCE hDLL, DWORD reason, LPVOID reserved) return FALSE; } } -#endif return TRUE; } diff --git a/cpp/src/Ice/DynamicLibrary.cpp b/cpp/src/Ice/DynamicLibrary.cpp index 15c9007cb9b..5b690df5f2b 100644 --- a/cpp/src/Ice/DynamicLibrary.cpp +++ b/cpp/src/Ice/DynamicLibrary.cpp @@ -213,12 +213,7 @@ IceInternal::DynamicLibrary::getSymbol(const string& name) { assert(_hnd != 0); #ifdef _WIN32 -# ifdef __BCPLUSPLUS__ - string newName = "_" + name; - symbol_type result = GetProcAddress(_hnd, newName.c_str()); -# else symbol_type result = GetProcAddress(_hnd, name.c_str()); -# endif #else symbol_type result = dlsym(_hnd, name.c_str()); #endif diff --git a/cpp/src/Ice/Makefile.mak b/cpp/src/Ice/Makefile.mak index b6410234852..9ca40c2236e 100644 --- a/cpp/src/Ice/Makefile.mak +++ b/cpp/src/Ice/Makefile.mak @@ -157,14 +157,6 @@ Ice.res: EventLoggerMsg.rc #EventLoggerMsg.h EventLoggerMsg.rc: EventLoggerMsg.mc # mc EventLoggerMsg.mc -!if "$(CPP_COMPILER)" == "BCC2010" & "$(OPTIMIZE)" == "yes" -# -# Tests fail if GC.cpp is built with optimizations enabled -# -GC.obj: GC.cpp - $(CXX) /c $(CPPFLAGS) $(CXXFLAGS) -Od GC.cpp -!endif - clean:: -del /q BuiltinSequences.cpp $(HDIR)\BuiltinSequences.h -del /q CommunicatorF.cpp $(HDIR)\CommunicatorF.h diff --git a/cpp/src/Ice/Service.cpp b/cpp/src/Ice/Service.cpp index 3a47db215e1..3c5c8df8f85 100644 --- a/cpp/src/Ice/Service.cpp +++ b/cpp/src/Ice/Service.cpp @@ -852,16 +852,7 @@ Ice::Service::main(int argc, char* const argv[], const InitializationData& initi int Ice::Service::main(int& argc, wchar_t* argv[], const InitializationData& initializationData) { -#ifdef __BCPLUSPLUS__ // COMPILER FIX - // - // BCC doesn't see the main overload if we don't create the temp args object here. - // - Ice::StringSeq args = Ice::argsToStringSeq(argc, argv, initializationData.stringConverter); - return main(args, initializationData); -#else return main(Ice::argsToStringSeq(argc, argv, initializationData.stringConverter), initializationData); -#endif - } #endif diff --git a/cpp/src/Ice/ThreadPool.h b/cpp/src/Ice/ThreadPool.h index a3deceff4c2..5d45363a494 100644 --- a/cpp/src/Ice/ThreadPool.h +++ b/cpp/src/Ice/ThreadPool.h @@ -337,7 +337,7 @@ public: // of the event handler. We need to lock the event handler here to call // finishMessage. // -#if defined(__BCPLUSPLUS__) || (defined(_MSC_VER) && (_MSC_VER < 1300)) +#if (defined(_MSC_VER) && (_MSC_VER < 1300)) IceUtil::LockT sync(_mutex); #else IceUtil::LockT sync(_mutex); diff --git a/cpp/src/IceBox/Admin.cpp b/cpp/src/IceBox/Admin.cpp index 875ad497aef..89d8512c663 100644 --- a/cpp/src/IceBox/Admin.cpp +++ b/cpp/src/IceBox/Admin.cpp @@ -23,8 +23,7 @@ public: virtual int run(int, char*[]); }; -//COMPILERFIX: Borland C++ 2010 doesn't support wmain for console applications. -#if defined(_WIN32 ) && !defined(__BCPLUSPLUS__) +#ifdef _WIN32 int wmain(int argc, wchar_t* argv[]) diff --git a/cpp/src/IceBox/Service.cpp b/cpp/src/IceBox/Service.cpp index 0bf9dcf6b08..5f04478359d 100644 --- a/cpp/src/IceBox/Service.cpp +++ b/cpp/src/IceBox/Service.cpp @@ -136,8 +136,7 @@ IceBox::IceBoxService::usage(const string& appName) print("Usage: " + appName + " [options]\n" + options); } -//COMPILERFIX: Borland C++ 2010 doesn't support wmain for console applications. -#if defined(_WIN32 ) && !defined(__BCPLUSPLUS__) +#ifdef _WIN32 int wmain(int argc, wchar_t* argv[]) diff --git a/cpp/src/IceGrid/Client.cpp b/cpp/src/IceGrid/Client.cpp index 7b32674b6fe..1b38c97dfbe 100644 --- a/cpp/src/IceGrid/Client.cpp +++ b/cpp/src/IceGrid/Client.cpp @@ -183,8 +183,7 @@ interruptCallback(int signal) } } -//COMPILERFIX: Borland C++ 2010 doesn't support wmain for console applications. -#if defined(_WIN32 ) && !defined(__BCPLUSPLUS__) +#ifdef _WIN32 int wmain(int argc, wchar_t* argv[]) diff --git a/cpp/src/IceGrid/IceGridNode.cpp b/cpp/src/IceGrid/IceGridNode.cpp index 91d1345ecfd..0c26b17ceda 100644 --- a/cpp/src/IceGrid/IceGridNode.cpp +++ b/cpp/src/IceGrid/IceGridNode.cpp @@ -833,8 +833,7 @@ NodeService::usage(const string& appName) print("Usage: " + appName + " [options]\n" + options); } -//COMPILERFIX: Borland C++ 2010 doesn't support wmain for console applications. -#if defined(_WIN32 ) && !defined(__BCPLUSPLUS__) +#ifdef _WIN32 int wmain(int argc, wchar_t* argv[]) diff --git a/cpp/src/IceGrid/IceGridRegistry.cpp b/cpp/src/IceGrid/IceGridRegistry.cpp index 979e6a9331a..5bb1e4374dd 100644 --- a/cpp/src/IceGrid/IceGridRegistry.cpp +++ b/cpp/src/IceGrid/IceGridRegistry.cpp @@ -201,8 +201,7 @@ RegistryService::usage(const string& appName) print("Usage: " + appName + " [options]\n" + options); } -//COMPILERFIX: Borland C++ 2010 doesn't support wmain for console applications. -#if defined(_WIN32 ) && !defined(__BCPLUSPLUS__) +#ifdef _WIN32 int wmain(int argc, wchar_t* argv[]) diff --git a/cpp/src/IcePatch2/Calc.cpp b/cpp/src/IcePatch2/Calc.cpp index e6c4c470e6e..549a07f2659 100755 --- a/cpp/src/IcePatch2/Calc.cpp +++ b/cpp/src/IcePatch2/Calc.cpp @@ -111,8 +111,7 @@ usage(const string& appName) ; } -//COMPILERFIX: Borland C++ 2010 doesn't support wmain for console applications. -#if defined(_WIN32 ) && !defined(__BCPLUSPLUS__) +#ifdef _WIN32 int wmain(int argc, wchar_t* argv[]) diff --git a/cpp/src/IcePatch2/Client.cpp b/cpp/src/IcePatch2/Client.cpp index 4fdad194b8a..e8ea78897b2 100644 --- a/cpp/src/IcePatch2/Client.cpp +++ b/cpp/src/IcePatch2/Client.cpp @@ -326,8 +326,7 @@ Client::usage(const string& appName) cerr << options << endl; } -//COMPILERFIX: Borland C++ 2010 doesn't support wmain for console applications. -#if defined(_WIN32 ) && !defined(__BCPLUSPLUS__) +#ifdef _WIN32 int wmain(int argc, wchar_t* argv[]) diff --git a/cpp/src/IcePatch2/Server.cpp b/cpp/src/IcePatch2/Server.cpp index b7a871719fd..7bdc7376629 100644 --- a/cpp/src/IcePatch2/Server.cpp +++ b/cpp/src/IcePatch2/Server.cpp @@ -213,18 +213,8 @@ IcePatch2::PatcherService::usage(const string& appName) #ifdef _WIN32 -//COMPILERFIX: Borland C++ 2010 doesn't support wmain for console applications. -#ifdef __BCCPLUSPLUS__ - -int -main(int argc, char* argv[]) - -#else - int wmain(int argc, wchar_t* argv[]) - -#endif { IcePatch2::PatcherService svc; int status = EXIT_FAILURE; diff --git a/cpp/src/IcePatch2Lib/Util.cpp b/cpp/src/IcePatch2Lib/Util.cpp index ad3cfc797eb..3f5713be7c1 100755 --- a/cpp/src/IcePatch2Lib/Util.cpp +++ b/cpp/src/IcePatch2Lib/Util.cpp @@ -492,51 +492,13 @@ IcePatch2::readDirectory(const string& pa) StringSeq result; const wstring fs = IceUtil::stringToWstring(simplify(path + "/*")); -# 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" + IceUtilInternal::lastErrorToString(); - } - - - while(true) - { - string name = IceUtil::wstringToString(data.ff_name); - assert(!name.empty()); - - if(name != ".." && name != ".") - { - result.push_back(name); - } - - if(_wfindnext(&data) == -1) - { - if(errno == ENOENT) - { - break; - } - - string ex = "cannot read directory `" + path + "':\n" + IceUtilInternal::lastErrorToString(); - _wfindclose(&data); - throw ex; - } - } - - _wfindclose(&data); -# else struct _wfinddata_t data; -# if defined(_MSC_VER) && (_MSC_VER < 1300) +# if defined(_MSC_VER) && (_MSC_VER < 1300) long h = _wfindfirst(fs.c_str(), &data); -# else +# else intptr_t h = _wfindfirst(fs.c_str(), &data); -# endif +# endif if(h == -1) { throw "cannot read directory `" + path + "':\n" + IceUtilInternal::lastErrorToString(); @@ -566,7 +528,6 @@ IcePatch2::readDirectory(const string& pa) } _findclose(h); -# endif sort(result.begin(), result.end()); return result; @@ -729,54 +690,6 @@ IcePatch2::decompressFile(const string& pa) throw "cannot open `" + pathBZ2 + "' for reading:\n" + IceUtilInternal::lastErrorToString(); } -#ifdef __BCPLUSPLUS__ - // - // The BZ2_bzReadOpen/BZ2_bzRead/BZ2_bzReadClose functions fail with BCC - // - IceUtilInternal::structstat buf; - if(IceUtilInternal::stat(pathBZ2, &buf) == -1) - { - throw "cannot stat `" + pathBZ2 + "':\n" + IceUtilInternal::lastErrorToString(); - } - - ByteSeq compressedBytes(buf.st_size); - if(fread(&compressedBytes[0], buf.st_size, 1, stdioFileBZ2) != 1) - { - throw "cannot read from `" + pathBZ2 + "':\n" + IceUtilInternal::lastErrorToString(); - } - - ByteSeq uncompressedBytes; - unsigned int uncompressedLen = buf.st_size * 2; - while(true) - { - uncompressedBytes.resize(uncompressedLen); - int bzError = BZ2_bzBuffToBuffDecompress(&uncompressedBytes[0], &uncompressedLen, &compressedBytes[0], - buf.st_size, 0, 0); - if(bzError == BZ_OK) - { - break; - } - else if(bzError == BZ_OUTBUFF_FULL) - { - uncompressedLen *= 2; - continue; - } - else - { - string ex = "BZ2_bzBuffToBuffDecompress failed"; - if(bzError == BZ_IO_ERROR) - { - ex += string(": ") + IceUtilInternal::lastErrorToString(); - } - throw ex; - } - } - - if(fwrite(&uncompressedBytes[0], uncompressedLen, 1, fp) != 1) - { - throw "cannot write to `" + path + "':\n" + IceUtilInternal::lastErrorToString(); - } -#else bzFile = BZ2_bzReadOpen(&bzError, stdioFileBZ2, 0, 0, 0, 0); if(bzError != BZ_OK) { @@ -830,7 +743,6 @@ IcePatch2::decompressFile(const string& pa) } throw ex; } -#endif } catch(...) { @@ -1021,66 +933,12 @@ getFileInfoSeqInt(const string& basePath, const string& relPath, int compress, G if(buf.st_size != 0) { -#ifdef __BCPLUSPLUS__ - // - // The BZ2_bzWriteOpen/BZ2_bzWrite/BZ2_bzWriteClose functions fail with BCC - // - if(doCompress) - { - int fd = IceUtilInternal::open(path.c_str(), O_BINARY|O_RDONLY); - if(fd == -1) - { - throw "cannot open `" + path + "' for reading:\n" + IceUtilInternal::lastErrorToString(); - } - - ByteSeq uncompressedBytes(buf.st_size); - - if(read(fd, &uncompressedBytes[0], buf.st_size) == -1) - { - close(fd); - throw "cannot read from `" + path + "':\n" + IceUtilInternal::lastErrorToString(); - } - - unsigned int compressedLen = buf.st_size * 1.01 + 600; - ByteSeq compressedBytes(compressedLen); - - int bzError = BZ2_bzBuffToBuffCompress(&compressedBytes[0], &compressedLen, - &uncompressedBytes[0], buf.st_size, 5, 0, 0); - if(bzError != BZ_OK) - { - string ex = "BZ2_bzBuffToBuffCompress failed"; - if(bzError == BZ_IO_ERROR) - { - ex += string(": ") + IceUtilInternal::lastErrorToString(); - } - close(fd); - throw ex; - } - close(fd); - - const string pathBZ2Temp = path + ".bz2temp"; - - FILE* stdioFile = IceUtilInternal::fopen(pathBZ2Temp, "wb"); - if(fwrite(&compressedBytes[0], compressedLen, 1, stdioFile) != 1) - { - fclose(stdioFile); - throw "cannot write to `" + pathBZ2Temp + "':\n" + IceUtilInternal::lastErrorToString(); - } - fclose(stdioFile); - - rename(pathBZ2Temp, pathBZ2); - - info.size = compressedLen; - } -#endif - int fd = IceUtilInternal::open(path.c_str(), O_BINARY|O_RDONLY); if(fd == -1) { throw "cannot open `" + path + "' for reading:\n" + IceUtilInternal::lastErrorToString(); } -#ifndef __BCPLUSPLUS__ const string pathBZ2Temp = path + ".bz2temp"; FILE* stdioFile = 0; int bzError = 0; @@ -1107,7 +965,6 @@ getFileInfoSeqInt(const string& basePath, const string& relPath, int compress, G throw ex; } } -#endif unsigned int bytesLeft = static_cast(buf.st_size); while(bytesLeft > 0) @@ -1121,18 +978,16 @@ getFileInfoSeqInt(const string& basePath, const string& relPath, int compress, G #endif == -1) { -#ifndef __BCPLUSPLUS__ if(doCompress) { fclose(stdioFile); } -#endif + IceUtilInternal::close(fd); throw "cannot read from `" + path + "':\n" + IceUtilInternal::lastErrorToString(); } bytesLeft -= static_cast(bytes.size()); -#ifndef __BCPLUSPLUS__ if(doCompress) { BZ2_bzWrite(&bzError, bzFile, const_cast(&bytes[0]), static_cast(bytes.size())); @@ -1149,14 +1004,12 @@ getFileInfoSeqInt(const string& basePath, const string& relPath, int compress, G throw ex; } } -#endif SHA1_Update(&ctx, reinterpret_cast(&bytes[0]), bytes.size()); } IceUtilInternal::close(fd); -#ifndef __BCPLUSPLUS__ if(doCompress) { BZ2_bzWriteClose(&bzError, bzFile, 0, 0, 0); @@ -1182,7 +1035,6 @@ getFileInfoSeqInt(const string& basePath, const string& relPath, int compress, G info.size = static_cast(bufBZ2.st_size); } -#endif } SHA1_Final(reinterpret_cast(&bytesSHA[0]), &ctx); diff --git a/cpp/src/IceStorm/Admin.cpp b/cpp/src/IceStorm/Admin.cpp index 0cd2197dfc6..b0b5a0eb7c4 100644 --- a/cpp/src/IceStorm/Admin.cpp +++ b/cpp/src/IceStorm/Admin.cpp @@ -25,8 +25,7 @@ public: virtual int run(int, char*[]); }; -//COMPILERFIX: Borland C++ 2010 doesn't support wmain for console applications. -#if defined(_WIN32 ) && !defined(__BCPLUSPLUS__) +#ifdef _WIN32 int wmain(int argc, wchar_t* argv[]) diff --git a/cpp/src/IceStorm/FreezeDB/Migrate.cpp b/cpp/src/IceStorm/FreezeDB/Migrate.cpp index 8647eff1353..0cc861b0339 100644 --- a/cpp/src/IceStorm/FreezeDB/Migrate.cpp +++ b/cpp/src/IceStorm/FreezeDB/Migrate.cpp @@ -34,8 +34,7 @@ private: void v31migrate(const Freeze::ConnectionPtr&, SubscriberMap&); }; -//COMPILERFIX: Borland C++ 2010 doesn't support wmain for console applications. -#if defined(_WIN32 ) && !defined(__BCPLUSPLUS__) +#ifdef _WIN32 int wmain(int argc, wchar_t* argv[]) diff --git a/cpp/src/IceUtil/FileUtil.cpp b/cpp/src/IceUtil/FileUtil.cpp index 2ecc670051f..0888ff8281c 100644 --- a/cpp/src/IceUtil/FileUtil.cpp +++ b/cpp/src/IceUtil/FileUtil.cpp @@ -22,10 +22,6 @@ # include #endif -#ifdef __BCPLUSPLUS__ -# include -#endif - using namespace std; // diff --git a/cpp/src/IceUtil/InputUtil.cpp b/cpp/src/IceUtil/InputUtil.cpp index 530d6dfe494..1b29658afbe 100644 --- a/cpp/src/IceUtil/InputUtil.cpp +++ b/cpp/src/IceUtil/InputUtil.cpp @@ -25,7 +25,7 @@ using namespace IceUtil; namespace IceUtilInternal { -#if defined(__BCPLUSPLUS__) || (defined(_MSC_VER) && (_MSC_VER < 1300)) +#if (defined(_MSC_VER) && (_MSC_VER < 1300)) // // The VC60 runtime does not include _strtoi64, so we provide our own implementation // @@ -177,7 +177,7 @@ Int64 strToInt64(const char* s, char** endptr, int base) { #if defined(_WIN32) -# if defined(__BCPLUSPLUS__) || (defined(_MSC_VER) && (_MSC_VER < 1300)) +# if (defined(_MSC_VER) && (_MSC_VER < 1300)) return strToInt64Impl(s, endptr, base); # else return _strtoi64(s, endptr, base); diff --git a/cpp/src/IceUtil/Time.cpp b/cpp/src/IceUtil/Time.cpp index b830d32412c..585335191e8 100644 --- a/cpp/src/IceUtil/Time.cpp +++ b/cpp/src/IceUtil/Time.cpp @@ -95,13 +95,8 @@ IceUtil::Time::now(Clock clock) if(clock == Realtime) { #ifdef _WIN32 -# if defined(_MSC_VER) struct _timeb tb; _ftime(&tb); -# elif defined(__BCPLUSPLUS__) - struct timeb tb; - ftime(&tb); -# endif return Time(static_cast(tb.time) * ICE_INT64(1000000) + tb.millitm * 1000); #else struct timeval tv; @@ -128,13 +123,8 @@ IceUtil::Time::now(Clock clock) } else { -# if defined(_MSC_VER) struct _timeb tb; _ftime(&tb); -# elif defined(__BCPLUSPLUS__) - struct timeb tb; - ftime(&tb); -# endif return Time(static_cast(tb.time) * ICE_INT64(1000000) + tb.millitm * 1000); } #elif defined(__hpux) diff --git a/cpp/src/IceXML/Parser.cpp b/cpp/src/IceXML/Parser.cpp index a95287489db..d72164c5c5c 100644 --- a/cpp/src/IceXML/Parser.cpp +++ b/cpp/src/IceXML/Parser.cpp @@ -44,11 +44,7 @@ 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; diff --git a/cpp/src/Slice/Util.cpp b/cpp/src/Slice/Util.cpp index 3afb6a29eb5..c8d98fc400f 100644 --- a/cpp/src/Slice/Util.cpp +++ b/cpp/src/Slice/Util.cpp @@ -15,10 +15,6 @@ #include // For readlink() -#ifdef __BCPLUSPLUS__ -# include -#endif - using namespace std; using namespace Slice; diff --git a/cpp/src/iceserviceinstall/Install.cpp b/cpp/src/iceserviceinstall/Install.cpp index 2656f7e607a..2c360418ea1 100644 --- a/cpp/src/iceserviceinstall/Install.cpp +++ b/cpp/src/iceserviceinstall/Install.cpp @@ -34,18 +34,8 @@ private: bool _pause; }; -//COMPILERFIX: Borland C++ 2010 doesn't support wmain for console applications. -#ifdef __BCPLUSPLUS__ - -int -main(int argc, char* argv[]) - -#else - int wmain(int argc, wchar_t* argv[]) - -#endif { Install app; InitializationData id; diff --git a/cpp/src/slice2cpp/Gen.cpp b/cpp/src/slice2cpp/Gen.cpp index 0d662a1c1f5..084a08944a8 100644 --- a/cpp/src/slice2cpp/Gen.cpp +++ b/cpp/src/slice2cpp/Gen.cpp @@ -6530,18 +6530,6 @@ Slice::Gen::AsyncImplVisitor::visitOperation(const OperationPtr& p) H << nl << "// COMPILERFIX: The using directive avoid compiler warnings with -Woverloaded-virtual"; H << nl << "using ::IceInternal::IncomingAsync::ice_exception;"; H << nl << "virtual void ice_exception(const ::std::exception&);"; - - H.zeroIndent(); - H << nl << "#if defined(__BCPLUSPLUS__)"; - H.restoreIndent(); - H << nl << "// COMPILERFIX: Avoid compiler warnings with C++Builder 2010"; - H << nl << "virtual void ice_exception()"; - H << sb; - H << nl << "::IceInternal::IncomingAsync::ice_exception();"; - H << eb; - H.zeroIndent(); - H << nl << "#endif"; - H.restoreIndent(); } H << eb << ';'; diff --git a/cpp/test/Ice/Makefile.mak b/cpp/test/Ice/Makefile.mak index 4b61e7d7d66..12a0b8186de 100644 --- a/cpp/test/Ice/Makefile.mak +++ b/cpp/test/Ice/Makefile.mak @@ -38,7 +38,7 @@ SUBDIRS = $(SUBDIRS) \ checksum \ stringConverter \ background \ - threadPoolPriority + threadPoolPriority \ custom \ properties \ servantLocator \ diff --git a/cpp/test/Ice/info/Makefile.mak b/cpp/test/Ice/info/Makefile.mak index e13d2019e6b..683d8b5d0b8 100644 --- a/cpp/test/Ice/info/Makefile.mak +++ b/cpp/test/Ice/info/Makefile.mak @@ -40,6 +40,7 @@ CPPFLAGS = -I. -I../../include $(CPPFLAGS) -DWIN32_LEAN_AND_MEAN !if "$(WINRT)" != "yes" LD_TESTFLAGS = $(LD_EXEFLAGS) $(SETARGV) +LIBS = $(LIBS) icessl$(LIBSUFFIX).lib !else LD_TESTFLAGS = $(LD_DLLFLAGS) /export:dllMain !endif diff --git a/cpp/test/IceGrid/distribution/run.py b/cpp/test/IceGrid/distribution/run.py index 5bd5a77abd1..53b01e90a9c 100755 --- a/cpp/test/IceGrid/distribution/run.py +++ b/cpp/test/IceGrid/distribution/run.py @@ -21,11 +21,7 @@ sys.path.append(os.path.join(path[0], "scripts")) import TestUtil, IceGridAdmin def icepatch2Calc(datadir, dirname): - icePatch2Calc = "" - if TestUtil.isBCC2010(): - icePatch2Calc = os.path.join(TestUtil.getServiceDir(), "icepatch2calc") - else: - icePatch2Calc = os.path.join(TestUtil.getCppBinDir(), "icepatch2calc") + icePatch2Calc = os.path.join(TestUtil.getCppBinDir(), "icepatch2calc") commandProc = TestUtil.spawn('"%s" "%s"' % (icePatch2Calc, os.path.join(datadir, dirname))) commandProc.waitTestSuccess() diff --git a/cpp/test/IceGrid/fileLock/run.py b/cpp/test/IceGrid/fileLock/run.py index b3eaad29b32..2b75cd0d533 100755 --- a/cpp/test/IceGrid/fileLock/run.py +++ b/cpp/test/IceGrid/fileLock/run.py @@ -27,7 +27,7 @@ IceGridAdmin.nreplicas = 0 def runIceGridRegistry(): iceGrid = "" - if TestUtil.isBCC2010() or TestUtil.isVC6(): + if TestUtil.isVC6(): iceGrid = os.path.join(TestUtil.getServiceDir(), "icegridregistry") else: iceGrid = os.path.join(TestUtil.getCppBinDir(), "icegridregistry") diff --git a/cpp/test/IceStorm/federation2/run.py b/cpp/test/IceStorm/federation2/run.py index 96a89fb70b0..02439681c4f 100755 --- a/cpp/test/IceStorm/federation2/run.py +++ b/cpp/test/IceStorm/federation2/run.py @@ -20,11 +20,7 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil, IceStormUtil, Expect -iceStormAdmin = "" -if TestUtil.isBCC2010(): - iceStormAdmin = os.path.join(TestUtil.getServiceDir(), "icestormadmin") -else: - iceStormAdmin = os.path.join(TestUtil.getCppBinDir(), "icestormadmin") +iceStormAdmin = os.path.join(TestUtil.getCppBinDir(), "icestormadmin") publisher = os.path.join(os.getcwd(), "publisher") subscriber = os.path.join(os.getcwd(), "subscriber") diff --git a/cpp/test/IceStorm/stress/run.py b/cpp/test/IceStorm/stress/run.py index aa6634d1aaa..fd41399d26b 100755 --- a/cpp/test/IceStorm/stress/run.py +++ b/cpp/test/IceStorm/stress/run.py @@ -20,11 +20,7 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil, IceStormUtil -iceStormAdmin = "" -if TestUtil.isBCC2010(): - iceStormAdmin = os.path.join(TestUtil.getServiceDir(), "icestormadmin") -else: - iceStormAdmin = os.path.join(TestUtil.getCppBinDir(), "icestormadmin") +iceStormAdmin = iceStormAdmin = os.path.join(TestUtil.getServiceDir(), "icestormadmin") publisher = os.path.join(os.getcwd(), "publisher") subscriber = os.path.join(os.getcwd(), "subscriber") diff --git a/cpp/test/IceUtil/inputUtil/Client.cpp b/cpp/test/IceUtil/inputUtil/Client.cpp index 4f649c7e5ae..73543bb4a19 100644 --- a/cpp/test/IceUtil/inputUtil/Client.cpp +++ b/cpp/test/IceUtil/inputUtil/Client.cpp @@ -21,10 +21,7 @@ using namespace std; #define WS " \f\n\r\t\v" -#if defined(__BCPLUSPLUS__) -Int64 Int64Min = -9223372036854775808i64; -Int64 Int64Max = 9223372036854775807i64; -#elif defined(_MSC_VER) +#if defined(_MSC_VER) const Int64 Int64Min = -9223372036854775808i64; const Int64 Int64Max = 9223372036854775807i64; #elif defined(ICE_64) diff --git a/cpp/test/IceUtil/unicode/Client.cpp b/cpp/test/IceUtil/unicode/Client.cpp index 32425cc7454..3f703e0f7f2 100644 --- a/cpp/test/IceUtil/unicode/Client.cpp +++ b/cpp/test/IceUtil/unicode/Client.cpp @@ -23,8 +23,7 @@ using namespace std; // converts these BOMs back and forth. // -//COMPILERFIX: Borland C++ 2010 doesn't support wmain for console applications. -#if defined(_WIN32) && !defined(__BCPLUSPLUS__) +#ifdef _WIN32 int wmain(int argc, wchar_t* argv[]) @@ -41,12 +40,7 @@ main(int argc, char* argv[]) if(argc > 1) { #ifdef _WIN32 - -#ifdef __BCPLUSPLUS__ - dir = argv[1]; -#else dir = IceUtil::wstringToString(argv[1]); -#endif dir += "\\"; #else dir = argv[1]; @@ -179,7 +173,7 @@ main(int argc, char* argv[]) cout << "ok" << endl; } -#ifndef __BCPLUSPLUS__ + { cout << "testing UTF-8 filename... "; IceUtilInternal::ifstream fn(dir + "filename.txt"); @@ -251,6 +245,5 @@ main(int argc, char* argv[]) cout << "ok" << endl; } -#endif return EXIT_SUCCESS; } diff --git a/cpp/test/Makefile.mak b/cpp/test/Makefile.mak index 8a7eac2d2f8..88280361582 100644 --- a/cpp/test/Makefile.mak +++ b/cpp/test/Makefile.mak @@ -20,12 +20,12 @@ SUBDIRS = Ice SUBDIRS = IceUtil \ Slice \ Ice \ - IceSSL + IceSSL \ Glacier2 \ Freeze \ IceStorm \ FreezeScript \ - IceGrid + IceGrid \ IceBox !endif diff --git a/cpp/test/include/TestCommon.h b/cpp/test/include/TestCommon.h index 02d2adba199..c834907c00f 100644 --- a/cpp/test/include/TestCommon.h +++ b/cpp/test/include/TestCommon.h @@ -19,10 +19,6 @@ #include -#ifdef __BCPLUSPLUS__ -#include -#endif - void inline print(const std::string& msg) { @@ -168,41 +164,41 @@ int mainEntryPoint(int, char**); } -class TestFailedException : public ::Ice::LocalException -{ -public: - - TestFailedException(const char* file, int line) : - LocalException(file, line) - { - } - - TestFailedException(const char* file, int line, const ::std::string& r) : - LocalException(file, line), - reason(r) - { - } - - virtual ~TestFailedException() throw() - { - } - - virtual ::std::string ice_name() const - { - return "::TestFailedException"; - } - - virtual ::Ice::Exception* ice_clone() const - { - return new TestFailedException(*this); - } - - virtual void ice_throw() const - { - throw *this; - } - - ::std::string reason; +class TestFailedException : public ::Ice::LocalException +{ +public: + + TestFailedException(const char* file, int line) : + LocalException(file, line) + { + } + + TestFailedException(const char* file, int line, const ::std::string& r) : + LocalException(file, line), + reason(r) + { + } + + virtual ~TestFailedException() throw() + { + } + + virtual ::std::string ice_name() const + { + return "::TestFailedException"; + } + + virtual ::Ice::Exception* ice_clone() const + { + return new TestFailedException(*this); + } + + virtual void ice_throw() const + { + throw *this; + } + + ::std::string reason; }; void diff --git a/demoscript/Util.py b/demoscript/Util.py index 1e0d8c07490..0bd75b2a057 100644 --- a/demoscript/Util.py +++ b/demoscript/Util.py @@ -94,8 +94,6 @@ def configurePaths(): compiler = "" if os.environ.get("CPP_COMPILER", "") != "": compiler = os.environ["CPP_COMPILER"] - if compiler == "BCC2010": - binDir = binDir + "\\bcc10;" + binDir if compiler == "VC100" or compiler == "VC100_EXPRESS": binDir = os.path.join(binDir, "vc100") @@ -248,7 +246,7 @@ def isNoServices(): config = open(os.path.join(toplevel, "config", "Make.rules.mak"), "r") if config != None: compiler = re.search("CPP_COMPILER[\t\s]*= ([A-Z0-9]*)", config.read()).group(1) - return compiler == "BCC2010" or compiler == "VC60" + return compiler == "VC60" def getMapping(): """Determine the current mapping based on the cwd.""" diff --git a/distribution/bin/makemsi.py b/distribution/bin/makemsi.py index 2234b2aef36..e856f30d8ae 100755 --- a/distribution/bin/makemsi.py +++ b/distribution/bin/makemsi.py @@ -374,7 +374,7 @@ def main(): try: optionList, args = getopt.getopt( sys.argv[1:], "dhil:", [ "help", "clean", "skip-build", "skip-installer", "info", "debug", - "logfile", "vc60", "vc80", "vc90", "bcc2007", "bcc2009", "thirdpartyhome=", "sources=", "buildDir=", "pfxfile=", "pfxpassword="]) + "logfile", "vc60", "vc80", "vc90", "thirdpartyhome=", "sources=", "buildDir=", "pfxfile=", "pfxpassword="]) except getopt.GetoptError: usage() sys.exit(2) @@ -411,10 +411,6 @@ def main(): target = 'vc80' elif o == '--vc90': target = 'vc90' - elif o == '--bcc2007': - target = 'bcc2007' - elif o == '--bcc2009': - target = 'bcc2009' elif o == '--pfxfile': os.environ['PFX_FILE'] = a elif o == '--pfxpassword': @@ -486,11 +482,7 @@ def main(): else: defaults['installdir'] = "C:\\Ice-%s-%s" % (iceVersion, target.upper()) - if target == 'bcc2007' or target == 'bcc2009': - defaults['pdb'] = 'tds' - else: - defaults['pdb'] = 'pdb' - + defaults['pdb'] = 'pdb' defaults['OutDir'] = '' defaults['timeStampingURL'] = timeStampingURL @@ -575,12 +567,6 @@ libraries.""" if build: buildIceDists(stageDir, buildDir, iceVersion, target) - if target == "bcc2007": - setDefaultCompiler(os.path.join(buildDir, "release", "Ice-%s" % iceVersion, "cpp", "config", "Make.rules.mak"), "BCC2007") - - if target == "bcc2009": - setDefaultCompiler(os.path.join(buildDir, "release", "Ice-%s" % iceVersion, "cpp", "config", "Make.rules.mak"), "BCC2009") - # # Stage Ice! # diff --git a/distribution/src/common/Make.rules.mak b/distribution/src/common/Make.rules.mak index a922abe9857..749705c93e7 100644 --- a/distribution/src/common/Make.rules.mak +++ b/distribution/src/common/Make.rules.mak @@ -21,7 +21,7 @@ # # Specify your C++ compiler. Supported values are: -# VC90, VC90_EXPRESS, VC100, VC100_EXPRESS, BCC2010 +# VC90, VC90_EXPRESS, VC100, VC100_EXPRESS # #CPP_COMPILER = VC90 @@ -45,22 +45,15 @@ SETARGV = setargv.obj # # Compiler specific definitions # -!if "$(CPP_COMPILER)" == "BCC2010" -BCPLUSPLUS = yes -!include $(top_srcdir)/config/Make.rules.bcc -!elseif "$(CPP_COMPILER)" == "VC90" || "$(CPP_COMPILER)" == "VC90_EXPRESS" || "$(CPP_COMPILER)" == "VC100" || "$(CPP_COMPILER)" == "VC100_EXPRESS" +!if "$(CPP_COMPILER)" == "VC90" || "$(CPP_COMPILER)" == "VC90_EXPRESS" || "$(CPP_COMPILER)" == "VC100" || "$(CPP_COMPILER)" == "VC100_EXPRESS" !include $(top_srcdir)/config/Make.rules.msvc !elseif "$(CPP_COMPILER)" == "" -!error Please set CPP_COMPILER to VC90, VC90_EXPRESS, VC100, VC100_EXPRESS, or BCC2010 +!error Please set CPP_COMPILER to VC90, VC90_EXPRESS, VC100, VC100_EXPRESS !else !error Invalid setting for CPP_COMPILER: $(CPP_COMPILER) !endif -!if "$(CPP_COMPILER)" == "BCC2010" -libsuff = \bcc10 -!else libsuff = $(x64suffix) -!endif !if "$(OPTIMIZE)" != "yes" LIBSUFFIX = $(LIBSUFFIX)d diff --git a/distribution/src/common/README.DEMOS.txt b/distribution/src/common/README.DEMOS.txt index 53e3ad92afd..dbf6572f4bf 100644 --- a/distribution/src/common/README.DEMOS.txt +++ b/distribution/src/common/README.DEMOS.txt @@ -13,18 +13,17 @@ Table of Contents 1. Building and running the C++ demos (Visual Studio 2008SP1 or 2010) 2. Building and running the C++ demos (Visual C++ 2008SP1 or 2010 Express) - 3. Building and running the C++ demos (C++ Builder 2010) - 4. Building and running the .NET demos + 3. Building and running the .NET demos - Building the C# demos - Building the Visual Basic demos - Running .NET demos - SSL Notes for the .NET demos - 5. Building and running the .NET Compact Framework demo - 6. Building and running the Java demos - 7. Building and running the Android demos - 8. Running the Python demos - 9. Running the Ruby demos - 10. Building and running the PHP demos + 4. Building and running the .NET Compact Framework demo + 5. Building and running the Java demos + 6. Building and running the Android demos + 7. Running the Python demos + 8. Running the Ruby demos + 9. Building and running the PHP demos ====================================================================== @@ -88,35 +87,7 @@ another command window, type 'client' to start the client. ====================================================================== -3. Building and running the C++ demos (C++ Builder 2010) -====================================================================== - -The C++ demos are in the demo directory. - -You will need Microsoft NMAKE to build the demos. If you do not -already have NMAKE installed, you can download it as part of the -Windows Platform SDK: - - http://www.microsoft.com/downloads/details.aspx?FamilyId=E6E1C3DF-A74F-4207-8586-711EBE331CDC&displaylang=en - -Open a "RAD Studio Command Prompt" window. If you installed Ice in a -non-default location, set ICE_HOME as shown below: - - > set ICE_HOME= - -Change to the demo directory and run the following commands to build -the demos: - - > set CPP_COMPILER=BCC2010 - > nmake /f Makefile.mak - -To run a demo, change to the desired demo subdirectory and review the -README file if one is present. Type 'server' to start the server. In -another command window, type 'client' to start the client. - - -====================================================================== -4. Building and running the .NET demos +3. Building and running the .NET demos ====================================================================== Note that the Visual Studio project files require the Ice Visual @@ -177,7 +148,7 @@ remove the certificate: ====================================================================== -5. Building and running the .NET Compact Framework demo +4. Building and running the .NET Compact Framework demo ====================================================================== Note that the Visual Studio project file requires the Ice Visual @@ -196,7 +167,7 @@ instructions on starting a device emulator and deploying the program. ====================================================================== -6. Building and running the Java demos +5. Building and running the Java demos ====================================================================== The Java demos are in the demoj directory. @@ -241,7 +212,7 @@ are necessary. ====================================================================== -7. Building and running the Android demos +6. Building and running the Android demos ====================================================================== Several sample Android projects are provided in the demoj/android @@ -275,7 +246,7 @@ subdirectory for further instructions. ====================================================================== -8. Running the Python demos +7. Running the Python demos ====================================================================== The Python demos are in the demopy directory. @@ -291,7 +262,7 @@ separate command window, type 'python Client.py' to run the client. ====================================================================== -9. Running the Ruby demos +8. Running the Ruby demos ====================================================================== The Ruby demos are in the demorb directory. @@ -318,7 +289,7 @@ Then in a separate command window, start the Ruby client: ====================================================================== -10. Building and running the PHP demos +9. Building and running the PHP demos ====================================================================== PHP demos are provided in the demophp directory. diff --git a/perf/src/Ice/raw/cpp/Client.cpp b/perf/src/Ice/raw/cpp/Client.cpp index 4096deffae0..ba90ddab168 100644 --- a/perf/src/Ice/raw/cpp/Client.cpp +++ b/perf/src/Ice/raw/cpp/Client.cpp @@ -90,11 +90,7 @@ const char closeConnectionMsg = 4; const char magic[] = { 0x49, 0x63, 0x65, 0x50 }; // 'I', 'c', 'e', 'P' -#ifdef __BCPLUSPLUS__ -const char requestHdr[headerSize + sizeof(Ice::Int)] = -#else const char requestHdr[] = -#endif { magic[0], magic[1], @@ -110,11 +106,7 @@ const char requestHdr[] = 0, 0, 0, 0 // Request id (placeholder) }; -#ifdef __BCPLUSPLUS__ -const char requestBatchHdr[headerSize + sizeof(Ice::Int)] = -#else const char requestBatchHdr[] = -#endif { magic[0], magic[1], diff --git a/perf/src/Ice/raw/cpp/Server.cpp b/perf/src/Ice/raw/cpp/Server.cpp index 9ca4b1277c9..3fccab79d42 100644 --- a/perf/src/Ice/raw/cpp/Server.cpp +++ b/perf/src/Ice/raw/cpp/Server.cpp @@ -91,11 +91,7 @@ const char closeConnectionMsg = 4; const char magic[] = { 0x49, 0x63, 0x65, 0x50 }; // 'I', 'c', 'e', 'P' -#ifdef __BCPLUSPLUS__ -const char requestHdr[headerSize + sizeof(Ice::Int)] = -#else const char requestHdr[] = -#endif { magic[0], magic[1], @@ -111,11 +107,7 @@ const char requestHdr[] = 0, 0, 0, 0 // Request id (placeholder) }; -#ifdef __BCPLUSPLUS__ -const char requestBatchHdr[headerSize + sizeof(Ice::Int)] = -#else const char requestBatchHdr[] = -#endif { magic[0], magic[1], diff --git a/scripts/IceGridAdmin.py b/scripts/IceGridAdmin.py index e74c304ae6d..7d66516563c 100644 --- a/scripts/IceGridAdmin.py +++ b/scripts/IceGridAdmin.py @@ -71,7 +71,7 @@ def getDefaultLocatorProperty(): def startIceGridRegistry(testdir, dynamicRegistration = False): iceGrid = "" - if TestUtil.isBCC2010() or TestUtil.isVC6(): + if TestUtil.isVC6(): iceGrid = os.path.join(TestUtil.getServiceDir(), "icegridregistry") else: iceGrid = os.path.join(TestUtil.getCppBinDir(), "icegridregistry") @@ -155,7 +155,7 @@ def iceGridNodePropertiesOverride(): def startIceGridNode(testdir): iceGrid = "" - if TestUtil.isBCC2010() or TestUtil.isVC6(): + if TestUtil.isVC6(): iceGrid = os.path.join(TestUtil.getServiceDir(), "icegridnode") else: iceGrid = os.path.join(TestUtil.getCppBinDir(), "icegridnode") diff --git a/scripts/IceStormUtil.py b/scripts/IceStormUtil.py index a6c08ca4903..439611f4666 100644 --- a/scripts/IceStormUtil.py +++ b/scripts/IceStormUtil.py @@ -35,7 +35,7 @@ class IceStormUtil(object): self.toplevel = toplevel self.testdir = testdir self.iceBox = TestUtil.getIceBox() - if TestUtil.isBCC2010() or TestUtil.isVC6(): + if TestUtil.isVC6(): self.iceBoxAdmin = os.path.join(TestUtil.getServiceDir(), "iceboxadmin") self.iceStormAdmin = os.path.join(TestUtil.getServiceDir(), "icestormadmin") else: diff --git a/scripts/TestUtil.py b/scripts/TestUtil.py index 12ca1e94b38..d25f7434540 100755 --- a/scripts/TestUtil.py +++ b/scripts/TestUtil.py @@ -87,11 +87,6 @@ def getCppCompiler(): return compiler -def isBCC2010(): - if not isWin32(): - return False - return getCppCompiler() == "BCC2010" - def isVC6(): if not isWin32(): return False @@ -197,9 +192,6 @@ def configurePaths(): if isWin32(): libDir = getCppBinDir() - if iceHome and isBCC2010(): - addLdPath(libDir) - libDir = os.path.join(libDir, "bcc10") else: libDir = os.path.join(getIceDir("cpp"), "lib") if iceHome and x64: @@ -646,9 +638,7 @@ def getIceBox(): lang = getDefaultMapping() if lang == "cpp": iceBox = "" - if isBCC2010(): - iceBox = os.path.join(getServiceDir(), "icebox.exe") - elif isWin32(): + if isWin32(): # # Read the build.txt file from the test directory to figure out # how the IceBox service was built ("debug" vs. "release") and @@ -696,7 +686,7 @@ def getGlacier2Router(): return getIceExe("glacier2router") def getIceExe(name): - if isBCC2010() or isVC6(): + if isVC6(): return os.path.join(getServiceDir(), name) else: return os.path.join(getCppBinDir(), name) @@ -1685,10 +1675,6 @@ def runTests(start, expanded, num = 0, script = False): print("%s*** test only supported under Win32%s" % (prefix, suffix)) continue - if isBCC2010() and "nobcc" in config: - print("%s*** test not supported with C++Builder%s" % (prefix, suffix)) - continue - if isVC6() and "novc6" in config: print("%s*** test not supported with VC++ 6.0%s" % (prefix, suffix)) continue -- cgit v1.2.3 From 4f9a13928253344c0191b3116c4408c1d83604d9 Mon Sep 17 00:00:00 2001 From: Benoit Foucher Date: Mon, 6 Aug 2012 15:02:15 +0200 Subject: Removed Stream::format method, replace with startWriteEncaps parameter --- cpp/include/Ice/BasicStream.h | 15 +++---- cpp/include/Ice/Incoming.h | 3 +- cpp/include/Ice/Outgoing.h | 4 +- cpp/include/Ice/OutgoingAsync.h | 4 +- cpp/include/Ice/Stream.h | 4 +- cpp/include/Slice/CPlusPlusUtil.h | 2 +- cpp/src/Ice/BasicStream.cpp | 35 +++++++--------- cpp/src/Ice/Incoming.cpp | 16 ++++++-- cpp/src/Ice/Object.cpp | 6 +-- cpp/src/Ice/OpaqueEndpointI.cpp | 2 +- cpp/src/Ice/Proxy.cpp | 4 +- cpp/src/Ice/StreamI.cpp | 10 +---- cpp/src/Ice/StreamI.h | 4 +- cpp/src/Slice/CPlusPlusUtil.cpp | 4 +- cpp/src/slice2cpp/Gen.cpp | 48 ++++------------------ cpp/src/slice2java/Gen.cpp | 51 +++++------------------- java/src/Ice/ObjectImpl.java | 6 +-- java/src/Ice/ObjectPrxHelperBase.java | 2 +- java/src/Ice/OutputStream.java | 12 ++---- java/src/Ice/OutputStreamI.java | 10 +---- java/src/Ice/_ObjectDelM.java | 2 +- java/src/IceInternal/BasicStream.java | 45 ++++++++------------- java/src/IceInternal/EndpointFactoryManager.java | 2 +- java/src/IceInternal/Incoming.java | 2 +- java/src/IceInternal/IncomingBase.java | 12 +++++- java/src/IceInternal/OpaqueEndpointI.java | 2 +- java/src/IceInternal/Outgoing.java | 4 +- java/src/IceInternal/OutgoingAsync.java | 4 +- 28 files changed, 114 insertions(+), 201 deletions(-) (limited to 'cpp/src/slice2cpp/Gen.cpp') diff --git a/cpp/include/Ice/BasicStream.h b/cpp/include/Ice/BasicStream.h index 0ac688ab381..5871e510672 100644 --- a/cpp/include/Ice/BasicStream.h +++ b/cpp/include/Ice/BasicStream.h @@ -89,8 +89,6 @@ public: b.resize(sz); } - void format(Ice::FormatType); - void startWriteObject(const Ice::SlicedDataPtr& data) { assert(_currentWriteEncaps && _currentWriteEncaps->encoder); @@ -137,7 +135,7 @@ public: void startWriteEncaps(); - void startWriteEncaps(const Ice::EncodingVersion& encoding) + void startWriteEncaps(const Ice::EncodingVersion& encoding, Ice::FormatType format) { checkSupportedEncoding(encoding); @@ -151,6 +149,7 @@ public: _currentWriteEncaps = new WriteEncaps(); _currentWriteEncaps->previous = oldEncaps; } + _currentWriteEncaps->format = format; _currentWriteEncaps->encoding = encoding; _currentWriteEncaps->start = b.size(); @@ -965,9 +964,9 @@ private: class EncapsEncoder : private ::IceUtil::noncopyable { public: - EncapsEncoder(BasicStream* stream, WriteEncaps* encaps, Ice::FormatType format) : - _stream(stream), _encaps(encaps), _format(format), _sliceType(NoSlice), _usesClasses(false), - _objectIdIndex(0), _typeIdIndex(0) + EncapsEncoder(BasicStream* stream, WriteEncaps* encaps) : + _stream(stream), _encaps(encaps), _sliceType(NoSlice), _usesClasses(false), _objectIdIndex(0), + _typeIdIndex(0) { } @@ -1013,7 +1012,6 @@ private: BasicStream* _stream; WriteEncaps* _encaps; - const Ice::FormatType _format; // Object/exception attributes SliceType _sliceType; @@ -1092,6 +1090,7 @@ private: Container::size_type start; Ice::EncodingVersion encoding; + Ice::FormatType format; EncapsEncoder* encoder; @@ -1126,8 +1125,6 @@ private: int _startSeq; int _minSeqSize; - Ice::FormatType _format; - static const Ice::Byte FLAG_HAS_TYPE_ID_STRING; static const Ice::Byte FLAG_HAS_TYPE_ID_INDEX; static const Ice::Byte FLAG_HAS_OPTIONAL_MEMBERS; diff --git a/cpp/include/Ice/Incoming.h b/cpp/include/Ice/Incoming.h index 635ed3709b4..83a47c17b48 100644 --- a/cpp/include/Ice/Incoming.h +++ b/cpp/include/Ice/Incoming.h @@ -28,10 +28,11 @@ public: void __adopt(IncomingBase&); - BasicStream* __startWriteParams(); + BasicStream* __startWriteParams(Ice::FormatType); void __endWriteParams(bool); void __writeEmptyParams(); void __writeParamEncaps(const Ice::Byte*, Ice::Int, bool); + void __writeUserException(const Ice::UserException&, Ice::FormatType); protected: diff --git a/cpp/include/Ice/Outgoing.h b/cpp/include/Ice/Outgoing.h index 58e0dc28d66..37fdd9f248c 100644 --- a/cpp/include/Ice/Outgoing.h +++ b/cpp/include/Ice/Outgoing.h @@ -103,9 +103,9 @@ public: _is.readEncaps(encaps, sz); } - BasicStream* startWriteParams() + BasicStream* startWriteParams(Ice::FormatType format) { - _os.startWriteEncaps(_encoding); + _os.startWriteEncaps(_encoding, format); return &_os; } void endWriteParams() diff --git a/cpp/include/Ice/OutgoingAsync.h b/cpp/include/Ice/OutgoingAsync.h index ab8e59d8ea1..ff9c4e1a4fc 100644 --- a/cpp/include/Ice/OutgoingAsync.h +++ b/cpp/include/Ice/OutgoingAsync.h @@ -220,9 +220,9 @@ public: bool __send(bool); - BasicStream* __startWriteParams() + BasicStream* __startWriteParams(Ice::FormatType format) { - _os.startWriteEncaps(_encoding); + _os.startWriteEncaps(_encoding, format); return &_os; } void __endWriteParams() diff --git a/cpp/include/Ice/Stream.h b/cpp/include/Ice/Stream.h index b4b75516213..6ec33c5e2e1 100644 --- a/cpp/include/Ice/Stream.h +++ b/cpp/include/Ice/Stream.h @@ -287,8 +287,6 @@ public: virtual void writeException(const UserException&) = 0; - virtual void format(FormatType) = 0; - virtual void startObject(const SlicedDataPtr&) = 0; virtual void endObject() = 0; @@ -298,7 +296,7 @@ public: virtual void startSlice(const ::std::string&, bool) = 0; virtual void endSlice() = 0; - virtual void startEncapsulation(const Ice::EncodingVersion&) = 0; + virtual void startEncapsulation(const Ice::EncodingVersion&, FormatType) = 0; virtual void startEncapsulation() = 0; virtual void endEncapsulation() = 0; diff --git a/cpp/include/Slice/CPlusPlusUtil.h b/cpp/include/Slice/CPlusPlusUtil.h index 9febb97eb1b..dae79c161ec 100644 --- a/cpp/include/Slice/CPlusPlusUtil.h +++ b/cpp/include/Slice/CPlusPlusUtil.h @@ -39,7 +39,7 @@ SLICE_API std::string returnTypeToString(const TypePtr&, bool, const StringList& SLICE_API std::string inputTypeToString(const TypePtr&, bool, const StringList& = StringList(), int = 0); SLICE_API std::string outputTypeToString(const TypePtr&, bool, const StringList& = StringList(), int = 0); SLICE_API std::string operationModeToString(Operation::Mode); -SLICE_API std::string formatTypeToString(FormatType); +SLICE_API std::string opFormatTypeToString(const OperationPtr&); SLICE_API std::string fixKwd(const std::string&); diff --git a/cpp/src/Ice/BasicStream.cpp b/cpp/src/Ice/BasicStream.cpp index 4636813d40a..ce7c37fa025 100755 --- a/cpp/src/Ice/BasicStream.cpp +++ b/cpp/src/Ice/BasicStream.cpp @@ -97,8 +97,7 @@ IceInternal::BasicStream::BasicStream(Instance* instance, const EncodingVersion& _unlimited(unlimited), _stringConverter(instance->initializationData().stringConverter), _wstringConverter(instance->initializationData().wstringConverter), - _startSeq(-1), - _format(_instance->defaultsAndOverrides()->defaultFormat) + _startSeq(-1) { // // Initialize the encoding members of our pre-allocated encapsulations, in case @@ -164,7 +163,6 @@ IceInternal::BasicStream::swap(BasicStream& other) std::swap(_unlimited, other._unlimited); std::swap(_startSeq, other._startSeq); std::swap(_minSeqSize, other._minSeqSize); - std::swap(_format, other._format); } void @@ -188,16 +186,6 @@ IceInternal::BasicStream::resetEncaps() _preAllocatedWriteEncaps.reset(); } - -void -IceInternal::BasicStream::format(Ice::FormatType format) -{ - if(format != DefaultFormat) - { - _format = format; - } -} - void IceInternal::BasicStream::startWriteEncaps() { @@ -209,11 +197,11 @@ IceInternal::BasicStream::startWriteEncaps() if(_currentWriteEncaps) { - startWriteEncaps(_currentWriteEncaps->encoding); + startWriteEncaps(_currentWriteEncaps->encoding, _currentWriteEncaps->format); } else { - startWriteEncaps(_encoding); + startWriteEncaps(_encoding, Ice::DefaultFormat); } } @@ -1768,9 +1756,14 @@ IceInternal::BasicStream::initWriteEncaps() _currentWriteEncaps->start = b.size(); } + if(_currentWriteEncaps->format == Ice::DefaultFormat) + { + _currentWriteEncaps->format = _instance->defaultsAndOverrides()->defaultFormat; + } + if(!_currentWriteEncaps->encoder) // Lazy initialization. { - _currentWriteEncaps->encoder = new EncapsEncoder(this, _currentWriteEncaps, _format); + _currentWriteEncaps->encoder = new EncapsEncoder(this, _currentWriteEncaps); } } @@ -1792,7 +1785,7 @@ IceInternal::BasicStream::EncapsEncoder::write(const ObjectPtr& v) _stream->write(-index); _usesClasses = true; } - else if(_sliceType != NoSlice && _format == SlicedFormat) + else if(_sliceType != NoSlice && _encaps->format == SlicedFormat) { // // An object reference that appears inside a slice of an @@ -1911,7 +1904,7 @@ IceInternal::BasicStream::EncapsEncoder::startSlice(const string& typeId, bool l // Encode the slice size for the old encoding and if using the // sliced format. // - if(_encaps->encoding == Encoding_1_0 || _format == SlicedFormat) + if(_encaps->encoding == Encoding_1_0 || _encaps->format == SlicedFormat) { _sliceFlags |= FLAG_HAS_SLICE_SIZE; } @@ -1937,7 +1930,7 @@ IceInternal::BasicStream::EncapsEncoder::startSlice(const string& typeId, bool l // Encode the type ID (only in the first slice for the compact // encoding). // - if(_format == SlicedFormat || _encaps->encoding == Encoding_1_0 || _firstSlice) + if(_encaps->format == SlicedFormat || _encaps->encoding == Encoding_1_0 || _firstSlice) { // // If the type ID has already been seen, write the index @@ -2006,7 +1999,7 @@ IceInternal::BasicStream::EncapsEncoder::endSlice() if(!_indirectionTable.empty()) { assert(_encaps->encoding != Encoding_1_0); - assert(_format == SlicedFormat); + assert(_encaps->format == SlicedFormat); _sliceFlags |= FLAG_HAS_INDIRECTION_TABLE; // @@ -2126,7 +2119,7 @@ IceInternal::BasicStream::EncapsEncoder::writeSlicedData(const SlicedDataPtr& sl // using the sliced format. Otherwise, we ignore the preserved slices, which // essentially "slices" the object into the most-derived type known by the sender. // - if(_encaps->encoding == Encoding_1_0 || _format != SlicedFormat) + if(_encaps->encoding == Encoding_1_0 || _encaps->format != SlicedFormat) { return; } diff --git a/cpp/src/Ice/Incoming.cpp b/cpp/src/Ice/Incoming.cpp index 15e49a61608..34f583bb1df 100644 --- a/cpp/src/Ice/Incoming.cpp +++ b/cpp/src/Ice/Incoming.cpp @@ -80,14 +80,14 @@ IceInternal::IncomingBase::__adopt(IncomingBase& other) } BasicStream* -IncomingBase::__startWriteParams() +IncomingBase::__startWriteParams(FormatType format) { if(_response) { assert(_os.b.size() == headerSize + 4); // Reply status position. assert(_current.encoding >= Ice::Encoding_1_0); // Encoding for reply is known. _os.write(static_cast(0)); - _os.startWriteEncaps(_current.encoding); + _os.startWriteEncaps(_current.encoding, format); } // @@ -141,6 +141,14 @@ IncomingBase::__writeParamEncaps(const Byte* v, Ice::Int sz, bool ok) } } +void +IncomingBase::__writeUserException(const Ice::UserException& ex, Ice::FormatType format) +{ + ::IceInternal::BasicStream* __os = __startWriteParams(format); + __os->write(ex); + __endWriteParams(false); +} + void IceInternal::IncomingBase::__warning(const Exception& ex) const { @@ -203,7 +211,7 @@ IceInternal::IncomingBase::__servantLocatorFinished() { _os.b.resize(headerSize + 4); // Reply status position. _os.write(replyUserException); - _os.startWriteEncaps(_current.encoding); + _os.startWriteEncaps(_current.encoding, DefaultFormat); _os.write(ex); _os.endWriteEncaps(); _connection->sendResponse(&_os, _compress); @@ -567,7 +575,7 @@ IceInternal::Incoming::invoke(const ServantManagerPtr& servantManager, BasicStre if(_response) { _os.write(replyUserException); - _os.startWriteEncaps(encoding); + _os.startWriteEncaps(encoding, DefaultFormat); _os.write(ex); _os.endWriteEncaps(); _connection->sendResponse(&_os, _compress); diff --git a/cpp/src/Ice/Object.cpp b/cpp/src/Ice/Object.cpp index 875c58ed78d..39ad9df18c2 100644 --- a/cpp/src/Ice/Object.cpp +++ b/cpp/src/Ice/Object.cpp @@ -111,7 +111,7 @@ Ice::Object::___ice_isA(Incoming& __inS, const Current& __current) __is->read(__id, false); __inS.endReadParams(); bool __ret = ice_isA(__id, __current); - BasicStream* __os = __inS.__startWriteParams(); + BasicStream* __os = __inS.__startWriteParams(DefaultFormat); __os->write(__ret); __inS.__endWriteParams(true); return DispatchOK; @@ -131,7 +131,7 @@ Ice::Object::___ice_ids(Incoming& __inS, const Current& __current) { __inS.readEmptyParams(); vector __ret = ice_ids(__current); - BasicStream* __os = __inS.__startWriteParams(); + BasicStream* __os = __inS.__startWriteParams(DefaultFormat); __os->write(&__ret[0], &__ret[0] + __ret.size(), false); __inS.__endWriteParams(true); return DispatchOK; @@ -142,7 +142,7 @@ Ice::Object::___ice_id(Incoming& __inS, const Current& __current) { __inS.readEmptyParams(); string __ret = ice_id(__current); - BasicStream* __os = __inS.__startWriteParams(); + BasicStream* __os = __inS.__startWriteParams(DefaultFormat); __os->write(__ret, false); __inS.__endWriteParams(true); return DispatchOK; diff --git a/cpp/src/Ice/OpaqueEndpointI.cpp b/cpp/src/Ice/OpaqueEndpointI.cpp index 9b0eea19b0e..a3ed87efd85 100644 --- a/cpp/src/Ice/OpaqueEndpointI.cpp +++ b/cpp/src/Ice/OpaqueEndpointI.cpp @@ -196,7 +196,7 @@ void IceInternal::OpaqueEndpointI::streamWrite(BasicStream* s) const { s->write(_type); - s->startWriteEncaps(_rawEncoding); + s->startWriteEncaps(_rawEncoding, DefaultFormat); s->writeBlob(_rawBytes); s->endWriteEncaps(); } diff --git a/cpp/src/Ice/Proxy.cpp b/cpp/src/Ice/Proxy.cpp index eead1433242..33081299113 100644 --- a/cpp/src/Ice/Proxy.cpp +++ b/cpp/src/Ice/Proxy.cpp @@ -155,7 +155,7 @@ IceProxy::Ice::Object::begin_ice_isA(const string& typeId, try { __result->__prepare(ice_isA_name, Nonmutating, ctx); - IceInternal::BasicStream* __os = __result->__startWriteParams(); + IceInternal::BasicStream* __os = __result->__startWriteParams(DefaultFormat); __os->write(typeId); __result->__endWriteParams(); __result->__send(true); @@ -1461,7 +1461,7 @@ IceDelegateM::Ice::Object::ice_isA(const string& __id, const Context* context) Outgoing __og(__handler.get(), ice_isA_name, ::Ice::Nonmutating, context); try { - BasicStream* __os = __og.startWriteParams(); + BasicStream* __os = __og.startWriteParams(DefaultFormat); __os->write(__id, false); __og.endWriteParams(); } diff --git a/cpp/src/Ice/StreamI.cpp b/cpp/src/Ice/StreamI.cpp index 91c658abcf2..e1e73f94617 100644 --- a/cpp/src/Ice/StreamI.cpp +++ b/cpp/src/Ice/StreamI.cpp @@ -576,12 +576,6 @@ OutputStreamI::writeOptional(Int tag, OptionalType type) _os->writeOpt(tag, type); } -void -OutputStreamI::format(FormatType format) -{ - _os->format(format); -} - void OutputStreamI::startObject(const SlicedDataPtr& slicedData) { @@ -619,9 +613,9 @@ OutputStreamI::endSlice() } void -OutputStreamI::startEncapsulation(const EncodingVersion& version) +OutputStreamI::startEncapsulation(const EncodingVersion& version, FormatType format) { - _os->startWriteEncaps(version); + _os->startWriteEncaps(version, format); } void diff --git a/cpp/src/Ice/StreamI.h b/cpp/src/Ice/StreamI.h index 299e8a2bf02..0ccf35a8e6a 100644 --- a/cpp/src/Ice/StreamI.h +++ b/cpp/src/Ice/StreamI.h @@ -140,8 +140,6 @@ public: virtual void writeOptional(Int, OptionalType); - virtual void format(FormatType); - virtual void startObject(const SlicedDataPtr&); virtual void endObject(); @@ -151,7 +149,7 @@ public: virtual void startSlice(const std::string&, bool); virtual void endSlice(); - virtual void startEncapsulation(const Ice::EncodingVersion&); + virtual void startEncapsulation(const Ice::EncodingVersion&, FormatType); virtual void startEncapsulation(); virtual void endEncapsulation(); diff --git a/cpp/src/Slice/CPlusPlusUtil.cpp b/cpp/src/Slice/CPlusPlusUtil.cpp index aa35affc81b..a4ae0905b3f 100644 --- a/cpp/src/Slice/CPlusPlusUtil.cpp +++ b/cpp/src/Slice/CPlusPlusUtil.cpp @@ -712,9 +712,9 @@ Slice::operationModeToString(Operation::Mode mode) } string -Slice::formatTypeToString(FormatType type) +Slice::opFormatTypeToString(const OperationPtr& op) { - switch(type) + switch(op->format()) { case DefaultFormat: return "::Ice::DefaultFormat"; diff --git a/cpp/src/slice2cpp/Gen.cpp b/cpp/src/slice2cpp/Gen.cpp index 44e4b501637..db0cbd559bd 100644 --- a/cpp/src/slice2cpp/Gen.cpp +++ b/cpp/src/slice2cpp/Gen.cpp @@ -2236,12 +2236,7 @@ Slice::Gen::ProxyVisitor::visitOperation(const OperationPtr& p) } else { - C << nl << "::IceInternal::BasicStream* __os = __result->__startWriteParams();"; - FormatType format = p->format(); - if(p->sendsClasses() && format != DefaultFormat) - { - C << nl << "__os->format(" << formatTypeToString(format) << ");"; - } + C << nl << "::IceInternal::BasicStream* __os = __result->__startWriteParams(" << opFormatTypeToString(p) <<");"; writeMarshalCode(C, inParams, 0, TypeContextInParam); C << nl << "__result->__endWriteParams();"; } @@ -2777,15 +2772,7 @@ Slice::Gen::DelegateMVisitor::visitOperation(const OperationPtr& p) { C << nl << "try"; C << sb; - C << nl<< "::IceInternal::BasicStream* __os = __og.startWriteParams();"; - if(p->sendsClasses()) - { - FormatType format = p->format(); - if(format != DefaultFormat) - { - C << nl << "__os->format(" << formatTypeToString(format) << ");"; - } - } + C << nl<< "::IceInternal::BasicStream* __os = __og.startWriteParams(" << opFormatTypeToString(p) << ");"; writeMarshalCode(C, inParams, 0, TypeContextInParam); C << nl << "__og.endWriteParams();"; C << eb; @@ -4344,14 +4331,10 @@ Slice::Gen::ObjectVisitor::visitOperation(const OperationPtr& p) C << retS << " __ret = "; } C << fixKwd(name) << args << ';'; - FormatType format = p->format(); if(ret || !outParams.empty()) { - C << nl << "::IceInternal::BasicStream* __os = __inS.__startWriteParams();"; - if(p->returnsClasses() && format != DefaultFormat) - { - C << nl << "__os->format(" << formatTypeToString(format) << ");"; - } + C << nl << "::IceInternal::BasicStream* __os = __inS.__startWriteParams(" + << opFormatTypeToString(p) << ");"; writeMarshalCode(C, outParams, p); C << nl << "__inS.__endWriteParams(true);"; } @@ -4368,13 +4351,7 @@ Slice::Gen::ObjectVisitor::visitOperation(const OperationPtr& p) { C << nl << "catch(const " << fixKwd((*r)->scoped()) << "& __ex)"; C << sb; - C << nl << "::IceInternal::BasicStream* __os = __inS.__startWriteParams();"; - if(format != DefaultFormat) - { - C << nl << "__os->format(" << formatTypeToString(format) << ");"; - } - C << nl << "__os->write(__ex);"; - C << nl << "__inS.__endWriteParams(false);"; + C << nl << "__inS.__writeUserException(__ex, " << opFormatTypeToString(p) << ");"; C << eb; } C << nl << "return ::Ice::DispatchUserException;"; @@ -6044,16 +6021,11 @@ Slice::Gen::AsyncImplVisitor::visitOperation(const OperationPtr& p) C << sb; C << nl << "if(__validateResponse(true))"; C << sb; - FormatType format = p->format(); if(ret || !outParams.empty()) { C << nl << "try"; C << sb; - C << nl << "::IceInternal::BasicStream* __os = __startWriteParams();"; - if(p->returnsClasses() && format != DefaultFormat) - { - C << nl << "__os->format(" << formatTypeToString(format) << ");"; - } + C << nl << "::IceInternal::BasicStream* __os = __startWriteParams(" << opFormatTypeToString(p) << ");"; writeMarshalCode(C, outParams, p, TypeContextInParam); C << nl << "__endWriteParams(true);"; C << eb; @@ -6089,13 +6061,7 @@ Slice::Gen::AsyncImplVisitor::visitOperation(const OperationPtr& p) C << sb; C << nl <<"if(__validateResponse(false))"; C << sb; - C << nl << "::IceInternal::BasicStream* __os = __startWriteParams();"; - if(format != DefaultFormat) - { - C << nl << "__os->format(" << formatTypeToString(format) << ");"; - } - C << nl << "__os->write(*__ex);"; - C << nl << "__endWriteParams(false);"; + C << nl << "__writeUserException(*__ex, " << opFormatTypeToString(p) << ");"; C << nl << "__response();"; C << eb; C << eb; diff --git a/cpp/src/slice2java/Gen.cpp b/cpp/src/slice2java/Gen.cpp index 1327e24fb14..b15dc0d5f5a 100644 --- a/cpp/src/slice2java/Gen.cpp +++ b/cpp/src/slice2java/Gen.cpp @@ -66,9 +66,9 @@ sliceModeToIceMode(Operation::Mode opMode) } static string -formatTypeToString(FormatType type) +opFormatTypeToString(const OperationPtr& op) { - switch(type) + switch(op->format()) { case DefaultFormat: return "Ice.FormatType.DefaultFormat"; @@ -1171,14 +1171,10 @@ Slice::JavaVisitor::writeDispatchAndMarshalling(Output& out, const ClassDefPtr& // // Marshal 'out' parameters and return value. // - FormatType format = op->format(); if(!outParams.empty() || ret) { - out << nl << "IceInternal.BasicStream __os = __inS.__startWriteParams();"; - if(op->returnsClasses() && format != DefaultFormat) - { - out << nl << "__os.format(" << formatTypeToString(format) << ");"; - } + out << nl << "IceInternal.BasicStream __os = __inS.__startWriteParams(" + << opFormatTypeToString(op) << ");"; writeMarshalUnmarshalParams(out, package, outParams, op, iter, true, optionalMapping, true); out << nl << "__inS.__endWriteParams(true);"; } @@ -1200,13 +1196,7 @@ Slice::JavaVisitor::writeDispatchAndMarshalling(Output& out, const ClassDefPtr& string exS = getAbsolute(*t, package); out << nl << "catch(" << exS << " ex)"; out << sb; - out << nl << "IceInternal.BasicStream __os = __inS.__startWriteParams();"; - if(format != DefaultFormat) - { - out << nl << "__os.format(" << formatTypeToString(format) << ");"; - } - out << nl << "__os.writeUserException(ex);"; - out << nl << "__inS.__endWriteParams(false);"; + out << nl << "__inS.__writeUserException(ex, " << opFormatTypeToString(op) << ");"; out << nl << "return Ice.DispatchStatus.DispatchUserException;"; out << eb; } @@ -4652,12 +4642,8 @@ Slice::Gen::HelperVisitor::visitClassDefStart(const ClassDefPtr& p) iter = 0; if(!inArgs.empty()) { - out << nl << "IceInternal.BasicStream __os = __result.__startWriteParams();"; - FormatType format = op->format(); - if(op->sendsClasses() && format != DefaultFormat) - { - out << nl << "__os.format(" << formatTypeToString(format) << ");"; - } + out << nl << "IceInternal.BasicStream __os = __result.__startWriteParams(" + << opFormatTypeToString(op) << ");"; ParamDeclList pl; for(pli = paramList.begin(); pli != paramList.end(); ++pli) { @@ -5663,12 +5649,7 @@ Slice::Gen::DelegateMVisitor::visitClassDefStart(const ClassDefPtr& p) { out << nl << "try"; out << sb; - out << nl << "IceInternal.BasicStream __os = __og.startWriteParams();"; - FormatType format = op->format(); - if(op->sendsClasses() && format != DefaultFormat) - { - out << nl << "__os.format(" << formatTypeToString(format) << ");"; - } + out << nl << "IceInternal.BasicStream __os = __og.startWriteParams(" << opFormatTypeToString(op) << ");"; writeMarshalUnmarshalParams(out, package, inParams, 0, iter, true, optionalMapping); out << nl << "__og.endWriteParams();"; out << eb; @@ -6780,16 +6761,12 @@ Slice::Gen::AsyncVisitor::visitOperation(const OperationPtr& p) iter = 0; out << nl << "if(__validateResponse(true))"; out << sb; - FormatType format = p->format(); if(ret || !outParams.empty()) { out << nl << "try"; out << sb; - out << nl << "IceInternal.BasicStream __os = this.__startWriteParams();"; - if(p->returnsClasses() && format != DefaultFormat) - { - out << nl << "__os.format(" << formatTypeToString(format) << ");"; - } + out << nl << "IceInternal.BasicStream __os = this.__startWriteParams(" + << opFormatTypeToString(p) << ");"; writeMarshalUnmarshalParams(out, classPkg, outParams, p, iter, true, optionalMapping, false); out << nl << "this.__endWriteParams(true);"; out << eb; @@ -6822,13 +6799,7 @@ Slice::Gen::AsyncVisitor::visitOperation(const OperationPtr& p) out << sb; out << nl << "if(__validateResponse(false))"; out << sb; - out << nl << "IceInternal.BasicStream __os = __startWriteParams();"; - if(format != DefaultFormat) - { - out << nl << "__os.format(" << formatTypeToString(format) << ");"; - } - out << nl << "__os.writeUserException(__ex);"; - out << nl << "__endWriteParams(false);"; + out << nl << "__writeUserException(__ex, " << opFormatTypeToString(p) << ");"; out << nl << "__response();"; out << eb; out << eb; diff --git a/java/src/Ice/ObjectImpl.java b/java/src/Ice/ObjectImpl.java index 6d2352d6075..7ff5636cc0f 100644 --- a/java/src/Ice/ObjectImpl.java +++ b/java/src/Ice/ObjectImpl.java @@ -91,7 +91,7 @@ public abstract class ObjectImpl implements Object, java.lang.Cloneable, java.io String __id = __is.readString(); __inS.endReadParams(); boolean __ret = __obj.ice_isA(__id, __current); - IceInternal.BasicStream __os = __inS.__startWriteParams(); + IceInternal.BasicStream __os = __inS.__startWriteParams(Ice.FormatType.DefaultFormat); __os.writeBool(__ret); __inS.__endWriteParams(true); return DispatchStatus.DispatchOK; @@ -154,7 +154,7 @@ public abstract class ObjectImpl implements Object, java.lang.Cloneable, java.io { __inS.readEmptyParams(); String[] __ret = __obj.ice_ids(__current); - IceInternal.BasicStream __os = __inS.__startWriteParams(); + IceInternal.BasicStream __os = __inS.__startWriteParams(Ice.FormatType.DefaultFormat); __os.writeStringSeq(__ret); __inS.__endWriteParams(true); return DispatchStatus.DispatchOK; @@ -188,7 +188,7 @@ public abstract class ObjectImpl implements Object, java.lang.Cloneable, java.io { __inS.readEmptyParams(); String __ret = __obj.ice_id(__current); - IceInternal.BasicStream __os = __inS.__startWriteParams(); + IceInternal.BasicStream __os = __inS.__startWriteParams(Ice.FormatType.DefaultFormat); __os.writeString(__ret); __inS.__endWriteParams(true); return DispatchStatus.DispatchOK; diff --git a/java/src/Ice/ObjectPrxHelperBase.java b/java/src/Ice/ObjectPrxHelperBase.java index 916ada0220d..9a1de69d685 100644 --- a/java/src/Ice/ObjectPrxHelperBase.java +++ b/java/src/Ice/ObjectPrxHelperBase.java @@ -209,7 +209,7 @@ public class ObjectPrxHelperBase implements ObjectPrx, java.io.Serializable try { __result.__prepare(__ice_isA_name, OperationMode.Nonmutating, __context, __explicitCtx); - IceInternal.BasicStream __os = __result.__startWriteParams(); + IceInternal.BasicStream __os = __result.__startWriteParams(Ice.FormatType.DefaultFormat); __os.writeString(__id); __result.__endWriteParams(); __result.__send(true); diff --git a/java/src/Ice/OutputStream.java b/java/src/Ice/OutputStream.java index d921241b2f4..7c92d240ff3 100644 --- a/java/src/Ice/OutputStream.java +++ b/java/src/Ice/OutputStream.java @@ -189,13 +189,6 @@ public interface OutputStream **/ void writeException(UserException ex); - /** - * Select the format to be used for classes and exceptions. - * - * @param format Specify the compact or sliced format. - **/ - void format(FormatType format); - /** * Marks the start of an Ice object. * @@ -237,8 +230,11 @@ public interface OutputStream * Writes the start of an encapsulation to the stream. * * @param encoding The encoding version of the encapsulation. + * + * @param format Specify the compact or sliced format. + * **/ - void startEncapsulation(Ice.EncodingVersion encoding); + void startEncapsulation(Ice.EncodingVersion encoding, Ice.FormatType format); /** * Writes the start of an encapsulation to the stream. diff --git a/java/src/Ice/OutputStreamI.java b/java/src/Ice/OutputStreamI.java index 0a28528037f..67a51d4cbe5 100644 --- a/java/src/Ice/OutputStreamI.java +++ b/java/src/Ice/OutputStreamI.java @@ -171,12 +171,6 @@ public class OutputStreamI implements OutputStream _os.writeUserException(v); } - public void - format(FormatType format) - { - _os.format(format); - } - public void startObject(SlicedData slicedData) { @@ -214,9 +208,9 @@ public class OutputStreamI implements OutputStream } public void - startEncapsulation(Ice.EncodingVersion encoding) + startEncapsulation(Ice.EncodingVersion encoding, Ice.FormatType format) { - _os.startWriteEncaps(encoding); + _os.startWriteEncaps(encoding, format); } public void diff --git a/java/src/Ice/_ObjectDelM.java b/java/src/Ice/_ObjectDelM.java index 05e217f45a6..398eed35a11 100644 --- a/java/src/Ice/_ObjectDelM.java +++ b/java/src/Ice/_ObjectDelM.java @@ -20,7 +20,7 @@ public class _ObjectDelM implements _ObjectDel { try { - IceInternal.BasicStream __os = __og.startWriteParams(); + IceInternal.BasicStream __os = __og.startWriteParams(Ice.FormatType.DefaultFormat); __os.writeString(__id); __og.endWriteParams(); } diff --git a/java/src/IceInternal/BasicStream.java b/java/src/IceInternal/BasicStream.java index 7732c8e4c1a..e8d0483e8fa 100644 --- a/java/src/IceInternal/BasicStream.java +++ b/java/src/IceInternal/BasicStream.java @@ -48,7 +48,6 @@ public class BasicStream _unlimited = unlimited; _startSeq = -1; - _format = _instance.defaultsAndOverrides().defaultFormat; _sizePos = -1; } @@ -142,10 +141,6 @@ public class BasicStream other._minSeqSize = _minSeqSize; _minSeqSize = tmpMinSeqSize; - Ice.FormatType tmpFormat = other._format; - other._format = _format; - _format = tmpFormat; - int tmpSizePos = other._sizePos; other._sizePos = _sizePos; _sizePos = tmpSizePos; @@ -187,15 +182,6 @@ public class BasicStream return _buf; } - public void - format(Ice.FormatType format) - { - if(format != Ice.FormatType.DefaultFormat) - { - _format = format; - } - } - public void startWriteObject(Ice.SlicedData data) { @@ -263,16 +249,16 @@ public class BasicStream if(_writeEncapsStack != null) { - startWriteEncaps(_writeEncapsStack.encoding); + startWriteEncaps(_writeEncapsStack.encoding, _writeEncapsStack.format); } else { - startWriteEncaps(_encoding); + startWriteEncaps(_encoding, Ice.FormatType.DefaultFormat); } } public void - startWriteEncaps(Ice.EncodingVersion encoding) + startWriteEncaps(Ice.EncodingVersion encoding, Ice.FormatType format) { Protocol.checkSupportedEncoding(encoding); @@ -289,6 +275,7 @@ public class BasicStream curr.next = _writeEncapsStack; _writeEncapsStack = curr; + _writeEncapsStack.format = format; _writeEncapsStack.setEncoding(encoding); _writeEncapsStack.start = _buf.size(); @@ -3686,11 +3673,10 @@ public class BasicStream private static final class EncapsEncoder { - EncapsEncoder(BasicStream stream, WriteEncaps encaps, Ice.FormatType format) + EncapsEncoder(BasicStream stream, WriteEncaps encaps) { _stream = stream; _encaps = encaps; - _format = format; _sliceType = SliceType.NoSlice; _usesClasses = false; _objectIdIndex = 0; @@ -3719,7 +3705,7 @@ public class BasicStream _stream.writeInt(-index); _usesClasses = true; } - else if(_sliceType != SliceType.NoSlice && _format == Ice.FormatType.SlicedFormat) + else if(_sliceType != SliceType.NoSlice && _encaps.format == Ice.FormatType.SlicedFormat) { // // An object reference that appears inside a slice of an @@ -3831,7 +3817,7 @@ public class BasicStream // Encode the slice size for the old encoding and if using the // sliced format. // - if(_encaps.encoding_1_0 || _format == Ice.FormatType.SlicedFormat) + if(_encaps.encoding_1_0 || _encaps.format == Ice.FormatType.SlicedFormat) { _sliceFlags |= FLAG_HAS_SLICE_SIZE; } @@ -3857,7 +3843,7 @@ public class BasicStream // Encode the type ID (only in the first slice for the compact // encoding). // - if(_format == Ice.FormatType.SlicedFormat || _encaps.encoding_1_0 || _firstSlice) + if(_encaps.format == Ice.FormatType.SlicedFormat || _encaps.encoding_1_0 || _firstSlice) { // // If the type ID has already been seen, write the index @@ -3924,7 +3910,7 @@ public class BasicStream if(!_indirectionTable.isEmpty()) { assert(!_encaps.encoding_1_0); - assert(_format == Ice.FormatType.SlicedFormat); + assert(_encaps.format == Ice.FormatType.SlicedFormat); _sliceFlags |= FLAG_HAS_INDIRECTION_TABLE; // @@ -4056,7 +4042,7 @@ public class BasicStream // using the sliced format. Otherwise, we ignore the preserved slices, which // essentially "slices" the object into the most-derived type known by the sender. // - if(_encaps.encoding_1_0 || _format != Ice.FormatType.SlicedFormat) + if(_encaps.encoding_1_0 || _encaps.format != Ice.FormatType.SlicedFormat) { return; } @@ -4119,7 +4105,6 @@ public class BasicStream private final BasicStream _stream; private final WriteEncaps _encaps; - private final Ice.FormatType _format; // Object/exception attributes private SliceType _sliceType; @@ -4179,6 +4164,7 @@ public class BasicStream } int start; + Ice.FormatType format; Ice.EncodingVersion encoding; boolean encoding_1_0; @@ -4249,9 +4235,14 @@ public class BasicStream _writeEncapsStack.setEncoding(_encoding); } + if(_writeEncapsStack.format == Ice.FormatType.DefaultFormat) + { + _writeEncapsStack.format = _instance.defaultsAndOverrides().defaultFormat; + } + if(_writeEncapsStack.encoder == null) // Lazy initialization. { - _writeEncapsStack.encoder = new EncapsEncoder(this, _writeEncapsStack, _format); + _writeEncapsStack.encoder = new EncapsEncoder(this, _writeEncapsStack); } } @@ -4263,8 +4254,6 @@ public class BasicStream private int _startSeq; private int _minSeqSize; - private Ice.FormatType _format; - private int _sizePos; private static final byte FLAG_HAS_TYPE_ID_STRING = (byte)(1<<0); diff --git a/java/src/IceInternal/EndpointFactoryManager.java b/java/src/IceInternal/EndpointFactoryManager.java index 9c7c075851e..b3c666c4c6a 100644 --- a/java/src/IceInternal/EndpointFactoryManager.java +++ b/java/src/IceInternal/EndpointFactoryManager.java @@ -108,7 +108,7 @@ public final class EndpointFactoryManager // and ask the factory to read the endpoint data from that stream to create // the actual endpoint. // - BasicStream bs = new BasicStream(_instance, Protocol.currentEncoding, true, false); + BasicStream bs = new BasicStream(_instance, Protocol.currentProtocolEncoding, true, false); ue.streamWrite(bs); Buffer buf = bs.getBuffer(); buf.b.position(0); diff --git a/java/src/IceInternal/Incoming.java b/java/src/IceInternal/Incoming.java index 25eeab25bf5..819a6dda886 100644 --- a/java/src/IceInternal/Incoming.java +++ b/java/src/IceInternal/Incoming.java @@ -149,7 +149,7 @@ final public class Incoming extends IncomingBase implements Ice.Request if(_response) { _os.writeByte(ReplyStatus.replyUserException); - _os.startWriteEncaps(encoding); + _os.startWriteEncaps(encoding, Ice.FormatType.DefaultFormat); _os.writeUserException(ex); _os.endWriteEncaps(); _connection.sendResponse(_os, _compress); diff --git a/java/src/IceInternal/IncomingBase.java b/java/src/IceInternal/IncomingBase.java index 0f4000efbad..f3d89f3b71d 100644 --- a/java/src/IceInternal/IncomingBase.java +++ b/java/src/IceInternal/IncomingBase.java @@ -88,14 +88,14 @@ public class IncomingBase } public BasicStream - __startWriteParams() + __startWriteParams(Ice.FormatType format) { if(_response) { assert(_os.size() == Protocol.headerSize + 4); // Reply status position. assert(_current.encoding != null); // Encoding for reply is known. _os.writeByte((byte)0); - _os.startWriteEncaps(_current.encoding); + _os.startWriteEncaps(_current.encoding, format); } // @@ -152,6 +152,14 @@ public class IncomingBase } } + public void + __writeUserException(Ice.UserException ex, Ice.FormatType format) + { + BasicStream __os = __startWriteParams(format); + __os.writeUserException(ex); + __endWriteParams(false); + } + // // These functions allow this object to be reused, rather than reallocated. // diff --git a/java/src/IceInternal/OpaqueEndpointI.java b/java/src/IceInternal/OpaqueEndpointI.java index 91c34ad00bf..3982b095415 100644 --- a/java/src/IceInternal/OpaqueEndpointI.java +++ b/java/src/IceInternal/OpaqueEndpointI.java @@ -164,7 +164,7 @@ final class OpaqueEndpointI extends EndpointI streamWrite(BasicStream s) { s.writeShort(_type); - s.startWriteEncaps(_rawEncoding); + s.startWriteEncaps(_rawEncoding, Ice.FormatType.DefaultFormat); s.writeBlob(_rawBytes); s.endWriteEncaps(); } diff --git a/java/src/IceInternal/Outgoing.java b/java/src/IceInternal/Outgoing.java index c7ace46eb31..aa07f8aa052 100644 --- a/java/src/IceInternal/Outgoing.java +++ b/java/src/IceInternal/Outgoing.java @@ -457,9 +457,9 @@ public final class Outgoing implements OutgoingMessageCallback } public BasicStream - startWriteParams() + startWriteParams(Ice.FormatType format) { - _os.startWriteEncaps(_encoding); + _os.startWriteEncaps(_encoding, format); return _os; } diff --git a/java/src/IceInternal/OutgoingAsync.java b/java/src/IceInternal/OutgoingAsync.java index ca55efc67b1..2333c148c47 100644 --- a/java/src/IceInternal/OutgoingAsync.java +++ b/java/src/IceInternal/OutgoingAsync.java @@ -397,9 +397,9 @@ public class OutgoingAsync extends Ice.AsyncResult implements OutgoingAsyncMessa } public BasicStream - __startWriteParams() + __startWriteParams(Ice.FormatType format) { - _os.startWriteEncaps(_encoding); + _os.startWriteEncaps(_encoding, format); return _os; } -- cgit v1.2.3