diff options
author | Jose <jose@zeroc.com> | 2012-07-19 18:26:38 +0200 |
---|---|---|
committer | Jose <jose@zeroc.com> | 2012-07-19 18:26:38 +0200 |
commit | d0994b8115bc70f04b772d21365703a3a106587d (patch) | |
tree | 1bb72b16494ab7a14a48035e9bdac02dc82b0585 /cpp/src | |
parent | ICE-4782 Generate "#pragma once" for include-guards in generated C++ header f... (diff) | |
download | ice-d0994b8115bc70f04b772d21365703a3a106587d.tar.bz2 ice-d0994b8115bc70f04b772d21365703a3a106587d.tar.xz ice-d0994b8115bc70f04b772d21365703a3a106587d.zip |
Remove BCC support
Diffstat (limited to 'cpp/src')
30 files changed, 23 insertions, 289 deletions
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<T>* store = new ObjectStore<T>(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<StoreMap::iterator, bool> ir = _storeMap.insert(StoreMap::value_type(facet, 0)); #elif (defined(_MSC_VER) && (_MSC_VER >= 1600)) @@ -278,7 +278,7 @@ protected: } os = new ObjectStore<T>(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<Ice::Identity, { } -#ifdef __BCPLUSPLUS__ - bool load(const Ice::Identity& ident, const TransactionIPtr& trans, ObjectRecord& rec) - { - return ObjectStoreBase::load(ident, trans, rec); - } -#else using ObjectStoreBase::load; -#endif typedef IceUtil::Cache<Ice::Identity, T> 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<MapKey, Freeze::SharedDbEnv*> 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<T> sync(_mutex); #else IceUtil::LockT<typename T> 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<unsigned int>(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<unsigned int>(bytes.size()); -#ifndef __BCPLUSPLUS__ if(doCompress) { BZ2_bzWrite(&bzError, bzFile, const_cast<Byte*>(&bytes[0]), static_cast<int>(bytes.size())); @@ -1149,14 +1004,12 @@ getFileInfoSeqInt(const string& basePath, const string& relPath, int compress, G throw ex; } } -#endif SHA1_Update(&ctx, reinterpret_cast<const void*>(&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<Int>(bufBZ2.st_size); } -#endif } SHA1_Final(reinterpret_cast<unsigned char*>(&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 <io.h> #endif -#ifdef __BCPLUSPLUS__ -# include <dir.h> -#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<Int64>(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<Int64>(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 <unistd.h> // For readlink() -#ifdef __BCPLUSPLUS__ -# include <dir.h> -#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 << ';'; |