diff options
author | Jose <jose@zeroc.com> | 2012-08-08 18:52:08 +0200 |
---|---|---|
committer | Jose <jose@zeroc.com> | 2012-08-08 18:52:08 +0200 |
commit | 0dd3bcb062c3aaf9ffb8ca56b58c13d5dc714545 (patch) | |
tree | 8067c6695cc5e9672582a904409846e38ffba593 /cpp | |
parent | Fixed python & ruby compilation error caused by OutputStream::format removal (diff) | |
download | ice-0dd3bcb062c3aaf9ffb8ca56b58c13d5dc714545.tar.bz2 ice-0dd3bcb062c3aaf9ffb8ca56b58c13d5dc714545.tar.xz ice-0dd3bcb062c3aaf9ffb8ca56b58c13d5dc714545.zip |
remove VC6 support
Diffstat (limited to 'cpp')
72 files changed, 50 insertions, 1330 deletions
diff --git a/cpp/config/Make.rules.mak b/cpp/config/Make.rules.mak index 3b5b419c8a6..740a2d68aba 100755 --- a/cpp/config/Make.rules.mak +++ b/cpp/config/Make.rules.mak @@ -28,10 +28,10 @@ prefix = C:\Ice-$(VERSION) #
# Specify your C++ compiler. Supported values are:
-# VC60, VC90, VC90_EXPRESS, VC100, VC100_EXPRESS, VC110, VC110_EXPRESS
+# VC100, VC100_EXPRESS, VC110, VC110_EXPRESS
#
!if "$(CPP_COMPILER)" == ""
-CPP_COMPILER = VC90
+CPP_COMPILER = VC100
!endif
#
@@ -97,8 +97,7 @@ SETARGV = setargv.obj #
# Compiler specific definitions
#
-!if "$(CPP_COMPILER)" == "VC60" || \
- "$(CPP_COMPILER)" == "VC90" || "$(CPP_COMPILER)" == "VC90_EXPRESS" || \
+!if "$(CPP_COMPILER)" == "VC90" || "$(CPP_COMPILER)" == "VC90_EXPRESS" || \
"$(CPP_COMPILER)" == "VC100" || "$(CPP_COMPILER)" == "VC100_EXPRESS" || \
"$(CPP_COMPILER)" == "VC110" || "$(CPP_COMPILER)" == "VC110_EXPRESS"
!include $(top_srcdir)/config/Make.rules.msvc
@@ -110,11 +109,8 @@ SETARGV = setargv.obj !error CPP_COMPILER: $(CPP_COMPILER) not supported to build Ice for WinRT
!endif
-!if "$(CPP_COMPILER)" == "VC60"
-libsuff = \vc6
-UNIQUE_DLL_NAMES = yes
-!elseif "$(CPP_COMPILER)" == "VC100" || "$(CPP_COMPILER)" == "VC100_EXPRESS"
-libsuff = \vc100$(x64suffix)
+!if "$(CPP_COMPILER)" == "VC90"
+libsuff = \vc90$(x64suffix)
!elseif "$(CPP_COMPILER)" == "VC110" || "$(CPP_COMPILER)" == "VC110_EXPRESS"
libsuff = \vc110$(x64suffix)
!else
@@ -125,20 +121,12 @@ libsuff = $(x64suffix) !if "$(THIRDPARTY_HOME)" != ""
CPPFLAGS = -I"$(THIRDPARTY_HOME)\include" $(CPPFLAGS)
LDFLAGS = $(PRELIBPATH)"$(THIRDPARTY_HOME)\lib$(libsuff)" $(LDFLAGS)
-!if "$(CPP_COMPILER)" == "VC60"
-CPPFLAGS = -I"$(THIRDPARTY_HOME)\include\stlport" $(CPPFLAGS)
-!endif
!endif
!else
-!if "$(CPP_COMPILER)" == "VC60"
-CPPFLAGS = -I"$(ice_dir)\include\stlport" $(CPPFLAGS)
-!endif
!endif
!if "$(UNIQUE_DLL_NAMES)" == "yes"
-!if "$(CPP_COMPILER)" == "VC60"
-COMPSUFFIX = vc60_
-!elseif "$(CPP_COMPILER)" == "VC90" || "$(CPP_COMPILER)" == "VC90_EXPRESS"
+!if "$(CPP_COMPILER)" == "VC90" || "$(CPP_COMPILER)" == "VC90_EXPRESS"
COMPSUFFIX = vc90_
!elseif "$(CPP_COMPILER)" == "VC100" || "$(CPP_COMPILER)" == "VC100_EXPRESS"
COMPSUFFIX = vc100_
diff --git a/cpp/config/Make.rules.msvc b/cpp/config/Make.rules.msvc index b867c27666a..195ccd59175 100755 --- a/cpp/config/Make.rules.msvc +++ b/cpp/config/Make.rules.msvc @@ -42,9 +42,7 @@ ARFLAGS = $(ARFLAGS) /ignore:4264 /ignore:4221 CPPFLAGS = $(CPPFLAGS) -D_CONSOLE !endif -!if "$(CPP_COMPILER)" != "VC60" CPPFLAGS = $(CPPFLAGS) -MP -!endif !if "$(OPTIMIZE)" == "yes" @@ -54,15 +52,8 @@ CONFIG = Retail !else -CPPFLAGS = $(CPPFLAGS) -Zi -Od -D_DEBUG -MDd +CPPFLAGS = $(CPPFLAGS) -Zi -Od -D_DEBUG -MDd -RTC1 CONFIG = Debug - -!if "$(CPP_COMPILER)" == "VC60" -CPPFLAGS = $(CPPFLAGS) -GZ -Gm -!else -CPPFLAGS = $(CPPFLAGS) -RTC1 -!endif - !endif !if "$(STATICLIBS)" == "yes" diff --git a/cpp/demo/Freeze/bench/Client.cpp b/cpp/demo/Freeze/bench/Client.cpp index 2b20779bcf4..d27dcad0efc 100644 --- a/cpp/demo/Freeze/bench/Client.cpp +++ b/cpp/demo/Freeze/bench/Client.cpp @@ -166,11 +166,7 @@ private: Freeze::TransactionHolder txHolder(_connection); for(i = 0; i < _repetitions; ++i) { -#if (defined(_MSC_VER) && (_MSC_VER < 1310)) - m.put(T::value_type(i, i)); -#else m.put(typename T::value_type(i, i)); -#endif } txHolder.commit(); } @@ -268,12 +264,7 @@ private: os << i; s2.s = os.str(); s2.s1 = s1; - -#if (defined(_MSC_VER) && (_MSC_VER < 1310)) - m.put(T::value_type(s1, s2)); -#else m.put(typename T::value_type(s1, s2)); -#endif } txHolder.commit(); } @@ -350,11 +341,7 @@ private: ostringstream os; os << i; c1->s = os.str(); -#if (defined(_MSC_VER) && (_MSC_VER < 1310)) - m.put(T::value_type(s1, c1)); -#else m.put(typename T::value_type(s1, c1)); -#endif } txHolder.commit(); } @@ -425,11 +412,7 @@ private: Freeze::TransactionHolder txHolder(_connection); for(i = 0; i < _repetitions; ++i) { -#if (defined(_MSC_VER) && (_MSC_VER < 1310)) - m.put(T::value_type(i, i)); -#else m.put(typename T::value_type(i, i)); -#endif } txHolder.commit(); } @@ -720,64 +703,22 @@ TestApp::run(int argc, char* argv[]) _connection = Freeze::createConnection(communicator(), _envName); cout << "IntIntMap" << endl; -#if defined(_MSC_VER) && (_MSC_VER < 1310) - { - IntIntMap* dummy = 0; - IntIntMapTest("IntIntMap", dummy); - } -#else IntIntMapTest<IntIntMap>("IntIntMap"); -#endif cout << "IntIntMap with index" << endl; -#if defined(_MSC_VER) && (_MSC_VER < 1310) - { - IndexedIntIntMap* dummy = 0; - IntIntMapTest("IndexedIntIntMap", dummy); - } -#else IntIntMapTest<IndexedIntIntMap>("IndexedIntIntMap"); -#endif cout <<"Struct1Struct2Map" << endl; -#if defined(_MSC_VER) && (_MSC_VER < 1310) - { - Struct1Struct2Map* dummy = 0; - Struct1Struct2MapTest("Struct1Struct2Map", dummy); - } -#else Struct1Struct2MapTest<Struct1Struct2Map>("Struct1Struct2Map"); -#endif cout <<"Struct1Struct2Map with index" << endl; -#if defined(_MSC_VER) && (_MSC_VER < 1310) - { - IndexedStruct1Struct2Map* dummy = 0; - Struct1Struct2MapTest("IndexedStruct1Struct2Map", dummy); - } -#else Struct1Struct2MapTest<IndexedStruct1Struct2Map>("IndexedStruct1Struct2Map"); -#endif cout <<"Struct1Class1Map" << endl; -#if defined(_MSC_VER) && (_MSC_VER < 1310) - { - Struct1Class1Map* dummy = 0; - Struct1Class1MapTest("Struct1Class1Map", dummy); - } -#else Struct1Class1MapTest<Struct1Class1Map>("Struct1Class1Map"); -#endif cout <<"Struct1Class1Map with index" << endl; -#if defined(_MSC_VER) && (_MSC_VER < 1310) - { - IndexedStruct1Class1Map* dummy = 0; - Struct1Class1MapTest("IndexedStruct1Class1Map", dummy); - } -#else Struct1Class1MapTest<IndexedStruct1Class1Map>("IndexedStruct1Class1Map"); -#endif MyFactoryPtr factory = new MyFactory(); @@ -785,24 +726,10 @@ TestApp::run(int argc, char* argv[]) Struct1ObjectMapTest(); cout <<"IntIntMap (read test)" << endl; -#if defined(_MSC_VER) && (_MSC_VER < 1310) - { - IntIntMap* dummy = 0; - IntIntMapReadTest("IntIntMap", dummy); - } -#else IntIntMapReadTest<IntIntMap>("IntIntMap"); -#endif cout <<"IntIntMap with index (read test)" << endl; -#if defined(_MSC_VER) && (_MSC_VER < 1310) - { - IndexedIntIntMap* dummy = 0; - IntIntMapReadTest("IndexedIntIntMap", dummy); - } -#else IntIntMapReadTest<IndexedIntIntMap>("IndexedIntIntMap"); -#endif _connection->close(); diff --git a/cpp/demo/Freeze/casino/BankI.cpp b/cpp/demo/Freeze/casino/BankI.cpp index d1047b51616..ef70ac71ad0 100644 --- a/cpp/demo/Freeze/casino/BankI.cpp +++ b/cpp/demo/Freeze/casino/BankI.cpp @@ -101,14 +101,7 @@ BankI::checkAllChips(const Ice::Current& current) const Casino::BetPrx BankI::createBet(int amount, int lifetime, const Ice::Current&) { -#if defined(_MSC_VER) && (_MSC_VER < 1300) - Ice::Identity ident; - ident.name = IceUtil::generateUUID(); - ident.category = "bet"; -#else Ice::Identity ident = { IceUtil::generateUUID(), "bet" }; -#endif - Ice::Long closeTime = IceUtil::Time::now().toMilliSeconds() + lifetime; outstandingChips += amount; diff --git a/cpp/demo/Freeze/casino/BankI.h b/cpp/demo/Freeze/casino/BankI.h index 99cd3d6126f..977496db8ba 100644 --- a/cpp/demo/Freeze/casino/BankI.h +++ b/cpp/demo/Freeze/casino/BankI.h @@ -53,14 +53,6 @@ public: private: std::vector<CasinoStore::PersistentBetPrx> getBets(const Ice::ObjectAdapterPtr&) const; - -#if (defined(_MSC_VER) && (_MSC_VER < 1300)) -// -// Some compilers don't let local classes access private data members -// -public: -#endif - CasinoStore::PersistentBankPrx _prx; Freeze::TransactionalEvictorPtr _evictor; Freeze::TransactionalEvictorPtr _playerEvictor; diff --git a/cpp/demo/Freeze/casino/BetResolver.h b/cpp/demo/Freeze/casino/BetResolver.h index 5c05b2e44a8..0004ee55578 100644 --- a/cpp/demo/Freeze/casino/BetResolver.h +++ b/cpp/demo/Freeze/casino/BetResolver.h @@ -30,17 +30,10 @@ public: int getBetCount() const; -#if (!defined(_MSC_VER) || (_MSC_VER >= 1300)) -// -// Some compilers don't let local classes access private members -// private: -#endif void decrementBetCount(); - -private: - + int _betCount; IceUtil::Mutex _mutex; std::vector<IceUtil::TimerPtr> _timers; diff --git a/cpp/demo/Freeze/casino/Server.cpp b/cpp/demo/Freeze/casino/Server.cpp index d8f1a937d08..1ae1b9ed42c 100644 --- a/cpp/demo/Freeze/casino/Server.cpp +++ b/cpp/demo/Freeze/casino/Server.cpp @@ -30,13 +30,6 @@ private: map<string, string> createTypeMap(const string&); const string _envName; -#if (defined(_MSC_VER) && (_MSC_VER < 1300)) -// -// Some compilers don't let local classes access private data members -// -public: -#endif - CasinoStore::PersistentBankPrx _bankPrx; Freeze::TransactionalEvictorPtr _bankEvictor; Freeze::TransactionalEvictorPtr _playerEvictor; @@ -269,13 +262,7 @@ CasinoServer::run(int argc, char* argv[]) for(size_t i = 0; i < 12; ++i) { -#if defined(_MSC_VER) && (_MSC_VER < 1300) - Ice::Identity ident; - ident.name = players[i]; - ident.category = "player"; -#else Ice::Identity ident = { players[i], "player" }; -#endif if(!_playerEvictor->hasObject(ident)) { _playerEvictor->add(new PlayerI, ident); diff --git a/cpp/demo/Ice/Makefile.mak b/cpp/demo/Ice/Makefile.mak index 456991f4552..3ada5055c45 100644 --- a/cpp/demo/Ice/Makefile.mak +++ b/cpp/demo/Ice/Makefile.mak @@ -25,12 +25,8 @@ SUBDIRS = minimal \ multicast \
nrvo \
plugin \
- interleaved
-
-!if "$(CPP_COMPILER)" != "VC60"
-SUBDIRS = $(SUBDIRS) \
+ interleaved \
invoke
-!endif
!if "$(BCPLUSPLUS)" != "yes" && "$(CPP_COMPILER)" != "VC90_EXPRESS" && "$(CPP_COMPILER)" != "VC100_EXPRESS"
SUBDIRS = $(SUBDIRS) \
diff --git a/cpp/demo/IceGrid/Makefile.mak b/cpp/demo/IceGrid/Makefile.mak index 9302edca8cf..2a79d6ef035 100644 --- a/cpp/demo/IceGrid/Makefile.mak +++ b/cpp/demo/IceGrid/Makefile.mak @@ -15,10 +15,7 @@ SUBDIRS = allocate \ sessionActivation \
simple \
replication \
- secure
-
-!if "$(BCPLUSPLUS)" != "yes" && "$(CPP_COMPILER)" != "VC60"
-SUBDIRS = $(SUBDIRS) \
+ secure \
icebox
!endif
diff --git a/cpp/demo/Makefile.mak b/cpp/demo/Makefile.mak index 8b52cc6b9df..37876dda9b6 100644 --- a/cpp/demo/Makefile.mak +++ b/cpp/demo/Makefile.mak @@ -13,22 +13,14 @@ top_srcdir = .. SUBDIRS = IceUtil \
Ice \
- book
-
-
-!if "$(CPP_COMPILER)" != "VC60"
-SUBDIRS = $(SUBDIRS) \
+ book \
Glacier2 \
Freeze \
IceStorm \
IceGrid \
-
-!if "$(BCPLUSPLUS)" != "yes"
-SUBDIRS = $(SUBDIRS) \
IceBox
-!endif
-!if "$(BCPLUSPLUS)" != "yes" && "$(CPP_COMPILER)" != "VC90_EXPRESS" && "$(CPP_COMPILER)" != "VC100_EXPRESS"
+!if "$(CPP_COMPILER)" != "VC100_EXPRESS" && "$(CPP_COMPILER)" != "VC110_EXPRESS"
SUBDIRS = $(SUBDIRS) \
IcePatch2
!endif
diff --git a/cpp/demo/book/Makefile.mak b/cpp/demo/book/Makefile.mak index d95c22aaf39..c59f3a1274b 100644 --- a/cpp/demo/book/Makefile.mak +++ b/cpp/demo/book/Makefile.mak @@ -13,13 +13,9 @@ top_srcdir = ..\.. SUBDIRS = printer \
simple_filesystem \
- lifecycle
-
-!if "$(CPP_COMPILER)" != "VC60"
-SUBDIRS = $(SUBDIRS) \
+ lifecycle \
map_filesystem \
evictor_filesystem
-!endif
$(EVERYTHING)::
@for %i in ( $(SUBDIRS) ) do \
diff --git a/cpp/include/Freeze/Initialize.h b/cpp/include/Freeze/Initialize.h index 29a165e5506..931bd58aeb6 100644 --- a/cpp/include/Freeze/Initialize.h +++ b/cpp/include/Freeze/Initialize.h @@ -47,11 +47,7 @@ FREEZE_API TransactionalEvictorPtr createTransactionalEvictor(const Ice::ObjectAdapterPtr& adapter, const std::string& envName, const std::string& filename, -#if defined(_MSC_VER) && (_MSC_VER < 1300) - const FacetTypeMap& facetTypes = FacetTypeMap(std::less<std::string>()), -#else const FacetTypeMap& facetTypes = FacetTypeMap(), -#endif const ServantInitializerPtr& initializer = 0, const std::vector<IndexPtr>& indices = std::vector<IndexPtr>(), bool createDb = true); @@ -61,11 +57,7 @@ createTransactionalEvictor(const Ice::ObjectAdapterPtr& adapter, const std::string& envName, DbEnv& dbEnv, const std::string& filename, -#if defined(_MSC_VER) && (_MSC_VER < 1300) - const FacetTypeMap& facetTypes = FacetTypeMap(std::less<std::string>()), -#else const FacetTypeMap& facetTypes = FacetTypeMap(), -#endif const ServantInitializerPtr& initializer = 0, const std::vector<IndexPtr>& indices = std::vector<IndexPtr>(), bool createDb = true); diff --git a/cpp/include/Freeze/Map.h b/cpp/include/Freeze/Map.h index 61cc6a66ed7..bed7f7efad4 100644 --- a/cpp/include/Freeze/Map.h +++ b/cpp/include/Freeze/Map.h @@ -622,34 +622,7 @@ private: mutable bool _refValid; }; -#if defined(_MSC_VER) && (_MSC_VER < 1300) -// -// Without partial template specialization -// -struct IceEncodingCompare -{ - bool operator()(...) - { - return false; - } -}; - -template<typename Compare> -inline bool -enableKeyCompare(const Compare&) -{ - return true; -} - -template<> -inline bool -enableKeyCompare<IceEncodingCompare>(const IceEncodingCompare&) -{ - return false; -} -# else struct IceEncodingCompare {}; -#endif template<typename key_type, typename KeyCodec, typename Compare> class KeyCompare : public KeyCompareBase @@ -658,11 +631,7 @@ public: KeyCompare(const Compare& mapCompare, const Ice::CommunicatorPtr& communicator, const Ice::EncodingVersion& encoding) : -#if defined(_MSC_VER) && (_MSC_VER < 1300) - KeyCompareBase(enableKeyCompare(mapCompare)), -#else KeyCompareBase(true), -#endif _compare(mapCompare), _communicator(communicator), _encoding(encoding) @@ -694,7 +663,6 @@ private: const Ice::EncodingVersion _encoding; }; -#if !defined(_MSC_VER) || (_MSC_VER >= 1300) // // Partial template specialization: // do nothing for the IceEncodingCompare comparator @@ -713,7 +681,6 @@ public: return 0; } }; -#endif // // Need to separate MapIndex template class because _communicator is @@ -746,11 +713,7 @@ public: protected: MapIndex(const std::string& mapName, const Compare& mapCompare) : -#if defined(_MSC_VER) && (_MSC_VER < 1300) - MapIndexBase(mapName, enableKeyCompare(mapCompare)), -#else MapIndexBase(mapName, true), -#endif _compare(mapCompare) {} @@ -758,7 +721,6 @@ private: Compare _compare; }; -#if !defined(_MSC_VER) || (_MSC_VER >= 1300) // // Partial template specialization: // do nothing for the IceEncodingCompare comparator @@ -778,7 +740,6 @@ protected: MapIndexBase(mapName, false) {} }; -#endif // // A sorted map, similar to a std::map, with one notable difference: @@ -1201,36 +1162,3 @@ protected: } - -// -// This is for MSVC. -// -# ifdef _STLP_USE_OLD_HP_ITERATOR_QUERIES -namespace std -{ - -// TODO: update. -template <class key_type, class mapped_type, class KeyCodec, class ValueCodec, class Compare> -inline pair<const key_type, const mapped_type>* -value_type(const Freeze::Iterator<key_type, mapped_type, KeyCodec, ValueCodec, Compare>&) -{ - return (pair<const key_type, const mapped_type>*)0; -} - -template <class key_type, class mapped_type, class KeyCodec, class ValueCodec, class Compare> -inline pair<const key_type, const mapped_type>* -value_type(const Freeze::ConstIterator<key_type, mapped_type, KeyCodec, ValueCodec, Compare>&) -{ - return (pair<const key_type, const mapped_type>*)0; -} - -inline forward_iterator_tag iterator_category(const Freeze::IteratorBase&) -{ - return forward_iterator_tag(); -} - -inline ptrdiff_t* distance_type(const Freeze::IteratorBase&) { return (ptrdiff_t*) 0; } - -} - -#endif diff --git a/cpp/include/Ice/CommunicatorAsync.h b/cpp/include/Ice/CommunicatorAsync.h index e1cd14ac7df..26915051f8d 100644 --- a/cpp/include/Ice/CommunicatorAsync.h +++ b/cpp/include/Ice/CommunicatorAsync.h @@ -41,11 +41,7 @@ public: } catch(::Ice::Exception& ex) { -#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug - __exception(__result, ex); -#else ::IceInternal::CallbackNC<T>::__exception(__result, ex); -#endif return; } } @@ -93,11 +89,7 @@ public: } catch(::Ice::Exception& ex) { -#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug - __exception(__result, ex); -#else ::IceInternal::Callback<T, CT>::__exception(__result, ex); -#endif return; } } diff --git a/cpp/include/Ice/ConnectionAsync.h b/cpp/include/Ice/ConnectionAsync.h index a53fe50e002..5d850e577f4 100644 --- a/cpp/include/Ice/ConnectionAsync.h +++ b/cpp/include/Ice/ConnectionAsync.h @@ -41,11 +41,7 @@ public: } catch(::Ice::Exception& ex) { -#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug - __exception(__result, ex); -#else ::IceInternal::CallbackNC<T>::__exception(__result, ex); -#endif return; } } @@ -93,11 +89,7 @@ public: } catch(::Ice::Exception& ex) { -#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug - __exception(__result, ex); -#else ::IceInternal::Callback<T, CT>::__exception(__result, ex); -#endif return; } } diff --git a/cpp/include/Ice/Proxy.h b/cpp/include/Ice/Proxy.h index ca179a1d89d..8db60bcf9ed 100644 --- a/cpp/include/Ice/Proxy.h +++ b/cpp/include/Ice/Proxy.h @@ -152,11 +152,6 @@ typedef IceUtil::Handle<AMI_Object_ice_flushBatchRequests> AMI_Object_ice_flushB namespace IceProxy { namespace Ice { -#if defined(_MSC_VER) && (_MSC_VER == 1310) -// Work around for VC++ 7.1 bug -typedef ::std::map< ::std::string, ::std::string> Context; -#endif - class ICE_API Object : public ::IceUtil::Shared, private ::IceUtil::Mutex { public: @@ -998,33 +993,21 @@ checkedCast(const ::IceInternal::ProxyHandle<Y>& b) { Y* tag = 0; Ice::Context* ctx = 0; -#if defined(_MSC_VER) && (_MSC_VER < 1300) - return ::IceInternal::checkedCastHelper<P::element_type>(b, tag, ctx); -#else return ::IceInternal::checkedCastHelper<typename P::element_type>(b, tag, ctx); -#endif } template<typename P, typename Y> inline P checkedCast(const ::IceInternal::ProxyHandle<Y>& b, const ::Ice::Context& context) { Y* tag = 0; -#if defined(_MSC_VER) && (_MSC_VER < 1300) - return ::IceInternal::checkedCastHelper<P::element_type>(b, tag, &context); -#else return ::IceInternal::checkedCastHelper<typename P::element_type>(b, tag, &context); -#endif } template<typename P, typename Y> inline P uncheckedCast(const ::IceInternal::ProxyHandle<Y>& b) { Y* tag = 0; -#if defined(_MSC_VER) && (_MSC_VER < 1300) - return ::IceInternal::uncheckedCastHelper<P::element_type>(b, tag); -#else return ::IceInternal::uncheckedCastHelper<typename P::element_type>(b, tag); -#endif } template<typename P> inline P @@ -1222,20 +1205,12 @@ public: } catch(const ::Ice::Exception& ex) { -#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug - __exception(result, ex); -#else CallbackNC<T>::__exception(result, ex); -#endif return; } if(response) { -#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug - (callback.get()->*response)(); -#else (CallbackNC<T>::callback.get()->*response)(); -#endif } } @@ -1267,20 +1242,12 @@ public: } catch(const ::Ice::Exception& ex) { -#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug - __exception(result, ex); -#else Callback<T, CT>::__exception(result, ex); -#endif return; } if(response) { -#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug - (callback.get()->*response)(CT::dynamicCast(result->getCookie())); -#else (Callback<T, CT>::callback.get()->*response)(CT::dynamicCast(result->getCookie())); -#endif } } @@ -1317,20 +1284,12 @@ public: } catch(const ::Ice::Exception& ex) { -#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug - __exception(__result, ex); -#else ::IceInternal::CallbackNC<T>::__exception(__result, ex); -#endif return; } if(response) { -#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug - (callback.get()->*response)(__ret); -#else (::IceInternal::CallbackNC<T>::callback.get()->*response)(__ret); -#endif } } @@ -1362,20 +1321,12 @@ public: } catch(const ::Ice::Exception& ex) { -#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug - __exception(__result, ex); -#else ::IceInternal::Callback<T, CT>::__exception(__result, ex); -#endif return; } if(response) { -#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug - (callback.get()->*response)(__ret, CT::dynamicCast(__result->getCookie())); -#else (::IceInternal::Callback<T, CT>::callback.get()->*response)(__ret, CT::dynamicCast(__result->getCookie())); -#endif } } @@ -1441,20 +1392,12 @@ public: } catch(const ::Ice::Exception& ex) { -#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug - __exception(__result, ex); -#else ::IceInternal::CallbackNC<T>::__exception(__result, ex); -#endif return; } if(response) { -#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug - (callback.get()->*response)(__ret); -#else (::IceInternal::CallbackNC<T>::callback.get()->*response)(__ret); -#endif } } @@ -1486,20 +1429,12 @@ public: } catch(const ::Ice::Exception& ex) { -#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug - __exception(__result, ex); -#else ::IceInternal::Callback<T, CT>::__exception(__result, ex); -#endif return; } if(response) { -#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug - (callback.get()->*response)(__ret, CT::dynamicCast(__result->getCookie())); -#else (::IceInternal::Callback<T, CT>::callback.get()->*response)(__ret, CT::dynamicCast(__result->getCookie())); -#endif } } @@ -1531,20 +1466,12 @@ public: } catch(const ::Ice::Exception& ex) { -#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug - __exception(__result, ex); -#else ::IceInternal::CallbackNC<T>::__exception(__result, ex); -#endif return; } if(response) { -#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug - (callback.get()->*response)(__ret); -#else (::IceInternal::CallbackNC<T>::callback.get()->*response)(__ret); -#endif } } @@ -1576,20 +1503,12 @@ public: } catch(const ::Ice::Exception& ex) { -#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug - __exception(__result, ex); -#else ::IceInternal::Callback<T, CT>::__exception(__result, ex); -#endif return; } if(response) { -#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug - (callback.get()->*response)(__ret, CT::dynamicCast(__result->getCookie())); -#else (::IceInternal::Callback<T, CT>::callback.get()->*response)(__ret, CT::dynamicCast(__result->getCookie())); -#endif } } @@ -1630,18 +1549,10 @@ public: } catch(const ::Ice::Exception& ex) { -#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug - __exception(__result, ex); -#else ::IceInternal::CallbackNC<T>::__exception(__result, ex); -#endif return; } -#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug - (callback.get()->*response)(__ok, outParams); -#else (::IceInternal::CallbackNC<T>::callback.get()->*response)(__ok, outParams); -#endif return; } @@ -1655,18 +1566,10 @@ public: } catch(const ::Ice::Exception& ex) { -#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug - __exception(__result, ex); -#else ::IceInternal::CallbackNC<T>::__exception(__result, ex); -#endif return; } -#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug - (callback.get()->*responseArray)(__ok, outParams); -#else (::IceInternal::CallbackNC<T>::callback.get()->*responseArray)(__ok, outParams); -#endif return; } } @@ -1709,20 +1612,12 @@ public: } catch(const ::Ice::Exception& ex) { -#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug - __exception(__result, ex); -#else ::IceInternal::Callback<T, CT>::__exception(__result, ex); -#endif return; } -#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug - (callback.get()->*response)(__ok, outParams, CT::dynamicCast(__result->getCookie())); -#else (::IceInternal::Callback<T, CT>::callback.get()->*response)(__ok, outParams, CT::dynamicCast(__result->getCookie())); -#endif return; } @@ -1736,20 +1631,12 @@ public: } catch(const ::Ice::Exception& ex) { -#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug - __exception(__result, ex); -#else ::IceInternal::Callback<T, CT>::__exception(__result, ex); -#endif return; } -#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug - (callback.get()->*responseArray)(__ok, outParams, CT::dynamicCast(__result->getCookie())); -#else (::IceInternal::Callback<T, CT>::callback.get()->*responseArray)(__ok, outParams, CT::dynamicCast(__result->getCookie())); -#endif return; } } diff --git a/cpp/include/IceUtil/Cache.h b/cpp/include/IceUtil/Cache.h index 31d6e7cc460..4c698585072 100644 --- a/cpp/include/IceUtil/Cache.h +++ b/cpp/include/IceUtil/Cache.h @@ -168,12 +168,7 @@ template<typename Key, typename Value> bool Cache<Key, Value>::pin(const Key& key, const Handle<Value>& obj) { Mutex::Lock sync(_mutex); -#if defined(_MSC_VER) && (_MSC_VER < 1300) - std::pair<CacheMap::iterator, bool> ir = -#else std::pair<typename CacheMap::iterator, bool> ir = -#endif - #ifdef _MSC_VER _map.insert(CacheMap::value_type(key, CacheValue(obj))); #else @@ -222,12 +217,7 @@ Cache<Key, Value>::pinImpl(const Key& key, const Handle<Value>& newObj) latch = 0; } -#if defined(_MSC_VER) && (_MSC_VER < 1300) - std::pair<CacheMap::iterator, bool> ir = -#else std::pair<typename CacheMap::iterator, bool> ir = -#endif - #if defined(_MSC_VER) _map.insert(CacheMap::value_type(key, CacheValue(0))); #else diff --git a/cpp/include/IceUtil/Config.h b/cpp/include/IceUtil/Config.h index d6e89cdf7fe..33191fb13f6 100644 --- a/cpp/include/IceUtil/Config.h +++ b/cpp/include/IceUtil/Config.h @@ -77,7 +77,7 @@ # define ICE_DECLSPEC_IMPORT /**/ #endif -#if defined(_MSC_VER) && (_MSC_VER >= 1300) +#if defined(_MSC_VER) # define ICE_DEPRECATED_API __declspec(deprecated) #elif defined(__GNUC__) # define ICE_DEPRECATED_API __attribute__((deprecated)) @@ -94,27 +94,9 @@ # define ICE_UTIL_API ICE_DECLSPEC_IMPORT #endif -// -// For STLport. If we compile in debug mode, we want to use the debug -// STLport library. This is done by setting _STLP_DEBUG before any -// STLport header files are included. -// -// TODO: figure out why IceUtil does not compile with _SLTP_DEBUG using -// the Intel compiler. -// -#if !defined(NDEBUG) && !defined(_STLP_DEBUG) && !defined(__INTEL_COMPILER) -# define _STLP_DEBUG -#endif - #if defined(_WIN32) # ifndef _WIN32_WINNT - // - // Necessary for TryEnterCriticalSection (see IceUtil/Mutex.h). - // -# if defined(_MSC_VER) && _MSC_VER < 1500 -# define _WIN32_WINNT 0x0400 -# endif # elif _WIN32_WINNT < 0x0400 # error "TryEnterCricalSection requires _WIN32_WINNT >= 0x0400" # endif @@ -141,13 +123,6 @@ // ...: decorated name length exceeded, name was truncated # pragma warning( disable : 4503 ) # endif - - // - // For STLport. Define _STLP_NEW_PLATFORM_SDK if a PSDK newer than the PSDK included with VC6. - // -# if !defined(_STLP_NEW_PLATFORM_SDK) && WINVER > 0x0400 -# define _STLP_NEW_PLATFORM_SDK 1 -# endif #endif // @@ -163,13 +138,6 @@ #endif // -// If we use Visual C++ 6.0, we must use STLport -// -#if defined(_MSC_VER) && (_MSC_VER < 1300) && !defined(_STLP_BEGIN_NAMESPACE) -# error "Ice for Visual C++ 6.0 requires STLport" -#endif - -// // By deriving from this class, other classes are made non-copyable. // namespace IceUtil diff --git a/cpp/include/IceUtil/DisableWarnings.h b/cpp/include/IceUtil/DisableWarnings.h index cf27472aa3c..e67c202d6ea 100644 --- a/cpp/include/IceUtil/DisableWarnings.h +++ b/cpp/include/IceUtil/DisableWarnings.h @@ -19,10 +19,7 @@ // header file in Ice *source* files! // -#if defined(_MSC_VER) && _MSC_VER >= 1400 +#if defined(_MSC_VER) # define _CRT_SECURE_NO_DEPRECATE 1 // C4996 '<C function>' was declared deprecated/ -#endif - -#if defined(_MSC_VER) && _MSC_VER >= 1300 # pragma warning( 4 : 4996 ) // C4996 'std::<function>' was declared deprecated #endif diff --git a/cpp/include/IceUtil/FileUtil.h b/cpp/include/IceUtil/FileUtil.h index 054a8c9fef0..c8973c31884 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(__MINGW32__) || (defined(_MSC_VER) && (_MSC_VER < 1300)) +#if defined(__MINGW32__) typedef struct _stat structstat; #else typedef struct _stat64i32 structstat; @@ -118,10 +118,6 @@ public: ifstream(); ifstream(const std::string&, std::ios_base::openmode mode = std::ios_base::in); -#ifdef _STLP_BEGIN_NAMESPACE - ~ifstream(); - void close(); -#endif void open(const std::string&, std::ios_base::openmode mode = std::ios_base::in); private: @@ -129,10 +125,6 @@ private: // Hide const char* definitions since they shouldn't be used. ifstream(const char*); void open(const char*, std::ios_base::openmode mode = std::ios_base::in); - -#ifdef _STLP_BEGIN_NAMESPACE - int _fd; -#endif }; class ICE_UTIL_API ofstream : public std::ofstream @@ -141,10 +133,6 @@ public: ofstream(); ofstream(const std::string&, std::ios_base::openmode mode = std::ios_base::out); -#ifdef _STLP_BEGIN_NAMESPACE - ~ofstream(); - void close(); -#endif void open(const std::string&, std::ios_base::openmode mode = std::ios_base::out); private: @@ -152,10 +140,6 @@ private: // Hide const char* definitions since they shouldn't be used. ofstream(const char*); void open(const char*, std::ios_base::openmode mode = std::ios_base::out); - -#ifdef _STLP_BEGIN_NAMESPACE - int _fd; -#endif }; } diff --git a/cpp/include/IceUtil/Functional.h b/cpp/include/IceUtil/Functional.h index 6ddbd824461..3f57ae4b293 100644 --- a/cpp/include/IceUtil/Functional.h +++ b/cpp/include/IceUtil/Functional.h @@ -383,67 +383,3 @@ secondConstVoidMemFun1(void (T::*p)(A) const) } } - -// ---------------------------------------------------------------------- -// Extension for STLport: Special versions for bind1st and bind2nd for -// operations that do not return anything (i.e., return void). Needed -// for broken compilers, such as Visual C++ 6.0. -// ---------------------------------------------------------------------- - -#ifdef _STLP_BEGIN_NAMESPACE - -_STLP_BEGIN_NAMESPACE - -template <class _Operation> -class voidbinder1st : - public unary_function<typename __BINARY_ARG(_Operation,second_argument_type), - typename __BINARY_ARG(_Operation,result_type) > { -protected: - _Operation _M_op; - typename _Operation::first_argument_type _M_value; -public: - voidbinder1st(const _Operation& __x, - const typename _Operation::first_argument_type& __y) - : _M_op(__x), _M_value(__y) {} - typename _Operation::result_type - operator()(const typename _Operation::second_argument_type& __x) const { - _M_op(_M_value, __x); - } -}; - -template <class _Operation, class _Tp> -inline voidbinder1st<_Operation> -voidbind1st(const _Operation& __fn, const _Tp& __x) -{ - typedef typename _Operation::first_argument_type _Arg1_type; - return voidbinder1st<_Operation>(__fn, _Arg1_type(__x)); -} - -template <class _Operation> -class voidbinder2nd - : public unary_function<typename __BINARY_ARG(_Operation,first_argument_type), - typename __BINARY_ARG(_Operation,result_type)> { -protected: - _Operation _M_op; - typename _Operation::second_argument_type value; -public: - voidbinder2nd(const _Operation& __x, - const typename _Operation::second_argument_type& __y) - : _M_op(__x), value(__y) {} - typename _Operation::result_type - operator()(const typename _Operation::first_argument_type& __x) const { - _M_op(__x, value); - } -}; - -template <class _Operation, class _Tp> -inline voidbinder2nd<_Operation> -voidbind2nd(const _Operation& __fn, const _Tp& __x) -{ - typedef typename _Operation::second_argument_type _Arg2_type; - return voidbinder2nd<_Operation>(__fn, _Arg2_type(__x)); -} - -_STLP_END_NAMESPACE - -#endif diff --git a/cpp/include/IceUtil/OutputUtil.h b/cpp/include/IceUtil/OutputUtil.h index 034a4214543..85954127caf 100644 --- a/cpp/include/IceUtil/OutputUtil.h +++ b/cpp/include/IceUtil/OutputUtil.h @@ -134,26 +134,6 @@ operator<<(Output& out, const std::vector<T>& val) return out; } -#if defined(_MSC_VER) && (_MSC_VER < 1300) - -// -// Visual C++ 6.0 needs also a version of the function above with a -// non-const vector as argument. -// - -template<typename T> -inline Output& -operator<<(Output& out, std::vector<T>& val) -{ - for(typename std::vector<T>::const_iterator p = val.begin(); p != val.end(); ++p) - { - out << *p; - } - return out; -} - -#endif - template<> inline Output& operator<<(Output& o, const NextLine&) diff --git a/cpp/src/Freeze/EvictorI.h b/cpp/src/Freeze/EvictorI.h index 5a1ca1f55af..eb42dbb5951 100755 --- a/cpp/src/Freeze/EvictorI.h +++ b/cpp/src/Freeze/EvictorI.h @@ -218,12 +218,7 @@ protected: facetType = ft->second; } ObjectStore<T>* store = new ObjectStore<T>(facet, facetType,_createDb, this, storeIndices, populateEmptyIndices); - -#if (defined(_MSC_VER) && (_MSC_VER < 1300)) - _storeMap.insert(StoreMap::value_type(facet, store)); -#else _storeMap.insert(typename StoreMap::value_type(facet, store)); -#endif } } @@ -234,11 +229,8 @@ protected: { facet = ""; } -#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)) - std::pair<typename StoreMap::iterator, bool> ir = +#if (defined(_MSC_VER) && (_MSC_VER >= 1600)) + std::pair<typename StoreMap::iterator, bool> ir = _storeMap.insert(typename StoreMap::value_type(facet, nullptr)); #else std::pair<typename StoreMap::iterator, bool> ir = @@ -279,12 +271,7 @@ protected: facetType = q->second; } os = new ObjectStore<T>(facet, facetType, true, this); - -#if (defined(_MSC_VER) && (_MSC_VER < 1300)) - _storeMap.insert(StoreMap::value_type(facet, os)); -#else _storeMap.insert(typename StoreMap::value_type(facet, os)); -#endif } return os; } diff --git a/cpp/src/FreezeScript/Data.cpp b/cpp/src/FreezeScript/Data.cpp index 5380f74110f..c92d9c2088b 100644 --- a/cpp/src/FreezeScript/Data.cpp +++ b/cpp/src/FreezeScript/Data.cpp @@ -839,11 +839,7 @@ FreezeScript::IntegerData::toString(Ice::Long value) { char buf[64]; #ifdef _WIN32 -#if defined(_MSC_VER) && (_MSC_VER >= 1400) sprintf_s(buf, "%I64d", value); -#else - sprintf(buf, "%I64d", value); -#endif #elif defined(ICE_64) sprintf(buf, "%ld", value); #else diff --git a/cpp/src/FreezeScript/Exception.cpp b/cpp/src/FreezeScript/Exception.cpp index 79f9efdff56..ba2f0a353d4 100644 --- a/cpp/src/FreezeScript/Exception.cpp +++ b/cpp/src/FreezeScript/Exception.cpp @@ -34,11 +34,7 @@ FreezeScript::FailureException::ice_name() const void FreezeScript::FailureException::ice_print(ostream& out) const { -#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug - Exception::ice_print(out); -#else ::IceUtil::Exception::ice_print(out); -#endif out << ":\nerror occurred during transformation"; // TODO if(!_reason.empty()) { diff --git a/cpp/src/FreezeScript/Parser.cpp b/cpp/src/FreezeScript/Parser.cpp index 287b94b706c..7bc5e70a5d9 100644 --- a/cpp/src/FreezeScript/Parser.cpp +++ b/cpp/src/FreezeScript/Parser.cpp @@ -166,11 +166,7 @@ FreezeScript::EvaluateException::ice_name() const void FreezeScript::EvaluateException::ice_print(ostream& out) const { -#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug - Exception::ice_print(out); -#else Ice::Exception::ice_print(out); -#endif out << ":\nerror occurred while evaluating expression"; if(!_reason.empty()) { diff --git a/cpp/src/Ice/ConnectionFactory.cpp b/cpp/src/Ice/ConnectionFactory.cpp index 21e642ce572..035e8ad04c7 100755 --- a/cpp/src/Ice/ConnectionFactory.cpp +++ b/cpp/src/Ice/ConnectionFactory.cpp @@ -48,15 +48,9 @@ struct RandomNumberGenerator : public std::unary_function<ptrdiff_t, ptrdiff_t> template <typename K, typename V> void remove(multimap<K, V>& m, K k, V v) { -#if defined(_MSC_VER) && (_MSC_VER < 1300) - pair<multimap<K, V>::iterator, multimap<K, V>::iterator> pr = m.equal_range(k); - assert(pr.first != pr.second); - for(multimap<K, V>::iterator q = pr.first; q != pr.second; ++q) -#else pair<typename multimap<K, V>::iterator, typename multimap<K, V>::iterator> pr = m.equal_range(k); assert(pr.first != pr.second); for(typename multimap<K, V>::iterator q = pr.first; q != pr.second; ++q) -#endif { if(q->second.get() == v.get()) { @@ -72,15 +66,9 @@ find(const multimap<K,::IceInternal::Handle<V> >& m, K k, const ::IceUtilInternal::ConstMemFun<bool, V, ::IceInternal::Handle<V> >& predicate) { -#if defined(_MSC_VER) && (_MSC_VER < 1300) - pair<multimap<K, ::IceInternal::Handle<V> >::const_iterator, - multimap<K, ::IceInternal::Handle<V> >::const_iterator> pr = m.equal_range(k); - for(multimap<K, ::IceInternal::Handle<V> >::const_iterator q = pr.first; q != pr.second; ++q) -#else pair<typename multimap<K, ::IceInternal::Handle<V> >::const_iterator, typename multimap<K, ::IceInternal::Handle<V> >::const_iterator> pr = m.equal_range(k); for(typename multimap<K, ::IceInternal::Handle<V> >::const_iterator q = pr.first; q != pr.second; ++q) -#endif { if(predicate(q->second)) { @@ -107,17 +95,10 @@ IceInternal::OutgoingConnectionFactory::destroy() { return; } - -#ifdef _STLP_BEGIN_NAMESPACE - // voidbind2nd is an STLport extension for broken compilers in IceUtil/Functional.h - for_each(_connections.begin(), _connections.end(), - voidbind2nd(Ice::secondVoidMemFun1<ConnectorPtr, ConnectionI, ConnectionI::DestructionReason> - (&ConnectionI::destroy), ConnectionI::CommunicatorDestroyed)); -#else + for_each(_connections.begin(), _connections.end(), bind2nd(Ice::secondVoidMemFun1<const ConnectorPtr, ConnectionI, ConnectionI::DestructionReason> (&ConnectionI::destroy), ConnectionI::CommunicatorDestroyed)); -#endif _destroyed = true; _communicator = 0; @@ -1670,15 +1651,8 @@ IceInternal::IncomingConnectionFactory::setState(State state) _acceptor->close(); } #endif - -#ifdef _STLP_BEGIN_NAMESPACE - // voidbind2nd is an STLport extension for broken compilers in IceUtil/Functional.h - for_each(_connections.begin(), _connections.end(), - voidbind2nd(Ice::voidMemFun1(&ConnectionI::destroy), ConnectionI::ObjectAdapterDeactivated)); -#else for_each(_connections.begin(), _connections.end(), bind2nd(Ice::voidMemFun1(&ConnectionI::destroy), ConnectionI::ObjectAdapterDeactivated)); -#endif break; } diff --git a/cpp/src/Ice/Network.cpp b/cpp/src/Ice/Network.cpp index c29cd00a78b..e4678b96502 100644 --- a/cpp/src/Ice/Network.cpp +++ b/cpp/src/Ice/Network.cpp @@ -2238,11 +2238,7 @@ IceInternal::doConnectAsync(SOCKET fd, const Address& addr, AsyncInfo& info) } if(!ConnectEx(fd, reinterpret_cast<const struct sockaddr*>(&addr), size, 0, 0, 0, -#if defined(_MSC_VER) && (_MSC_VER < 1300) // COMPILER FIX: VC60 - reinterpret_cast<LPOVERLAPPED>(&info) -#else &info -#endif )) { if(!connectInProgress()) diff --git a/cpp/src/Ice/OutgoingAsync.cpp b/cpp/src/Ice/OutgoingAsync.cpp index c68c271cefc..007d1c275a2 100644 --- a/cpp/src/Ice/OutgoingAsync.cpp +++ b/cpp/src/Ice/OutgoingAsync.cpp @@ -514,11 +514,7 @@ IceInternal::OutgoingAsync::__sent(Ice::ConnectionI* connection) void IceInternal::OutgoingAsync::__sent() { -#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug - AsyncResult::__sent(); -#else ::Ice::AsyncResult::__sent(); -#endif } void @@ -879,11 +875,7 @@ IceInternal::BatchOutgoingAsync::__sent(Ice::ConnectionI* connection) void IceInternal::BatchOutgoingAsync::__sent() { -#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug - AsyncResult::__sent(); -#else ::Ice::AsyncResult::__sent(); -#endif } void diff --git a/cpp/src/Ice/Proxy.cpp b/cpp/src/Ice/Proxy.cpp index 33081299113..ecf1bfbde1d 100644 --- a/cpp/src/Ice/Proxy.cpp +++ b/cpp/src/Ice/Proxy.cpp @@ -47,14 +47,6 @@ const string ice_flushBatchRequests_name = "ice_flushBatchRequests"; ::Ice::ObjectPrx IceInternal::checkedCastImpl(const ObjectPrx& b, const string& f, const string& typeId, const Context* context) { -// -// COMPILERBUG: Without this work-around, release VC7.0 and VC7.1 -// build crash when FacetNotExistException is raised -// -#if defined(_MSC_VER) && (_MSC_VER >= 1300) && (_MSC_VER <= 1310) - ObjectPrx fooBar; -#endif - if(b) { ObjectPrx bb = b->ice_facet(f); diff --git a/cpp/src/Ice/Selector.cpp b/cpp/src/Ice/Selector.cpp index aadf85a1114..1bcaed5b087 100644 --- a/cpp/src/Ice/Selector.cpp +++ b/cpp/src/Ice/Selector.cpp @@ -161,13 +161,7 @@ Selector::update(EventHandler* handler, SocketOperation remove, SocketOperation if(info) { - if(!PostQueuedCompletionStatus(_handle, 0, reinterpret_cast<ULONG_PTR>(handler), -#if defined(_MSC_VER) && (_MSC_VER < 1300) // COMPILER FIX: VC60 - reinterpret_cast<LPOVERLAPPED>(info) -#else - info -#endif - )) + if(!PostQueuedCompletionStatus(_handle, 0, reinterpret_cast<ULONG_PTR>(handler), info)) { Ice::SocketException ex(__FILE__, __LINE__); ex.error = GetLastError(); @@ -209,12 +203,7 @@ Selector::getNextHandler(SocketOperation& status, int timeout) abort(); } } - -#if defined(_MSC_VER) && (_MSC_VER < 1300) // COMPILER FIX: VC60 - AsyncInfo* info = reinterpret_cast<AsyncInfo*>(ol); -#else AsyncInfo* info = static_cast<AsyncInfo*>(ol); -#endif status = info->status; info->count = SOCKET_ERROR; info->error = WSAGetLastError(); @@ -222,11 +211,7 @@ Selector::getNextHandler(SocketOperation& status, int timeout) } assert(ol); -#if defined(_MSC_VER) && (_MSC_VER < 1300) // COMPILER FIX: VC60 - AsyncInfo* info = reinterpret_cast<AsyncInfo*>(ol); -#else AsyncInfo* info = static_cast<AsyncInfo*>(ol); -#endif status = info->status; info->count = count; info->error = 0; diff --git a/cpp/src/Ice/Service.cpp b/cpp/src/Ice/Service.cpp index 196e31ae6b7..7800b392076 100644 --- a/cpp/src/Ice/Service.cpp +++ b/cpp/src/Ice/Service.cpp @@ -1192,11 +1192,7 @@ Ice::Service::startService(const string& name, const vector<string>& args) int i = 0; for(vector<string>::const_iterator p = args.begin(); p != args.end(); ++p) { -#if defined(_MSC_VER) && (_MSC_VER >= 1400) argv[i++] = _strdup(p->c_str()); -#else - argv[i++] = strdup(p->c_str()); -#endif } // diff --git a/cpp/src/Ice/TcpAcceptor.cpp b/cpp/src/Ice/TcpAcceptor.cpp index 8453863a25b..190648e0755 100644 --- a/cpp/src/Ice/TcpAcceptor.cpp +++ b/cpp/src/Ice/TcpAcceptor.cpp @@ -106,13 +106,7 @@ IceInternal::TcpAcceptor::startAccept() assert(_acceptFd == INVALID_SOCKET); _acceptFd = createSocket(false, _addr); const int sz = static_cast<int>(_acceptBuf.size() / 2); - if(!AcceptEx(_fd, _acceptFd, &_acceptBuf[0], 0, sz, sz, &_info.count, -#if defined(_MSC_VER) && (_MSC_VER < 1300) // COMPILER FIX: VC60 - reinterpret_cast<LPOVERLAPPED>(&_info) -#else - &_info -#endif - )) + if(!AcceptEx(_fd, _acceptFd, &_acceptBuf[0], 0, sz, sz, &_info.count, &_info)) { if(!wouldBlock()) { diff --git a/cpp/src/Ice/ThreadPool.cpp b/cpp/src/Ice/ThreadPool.cpp index e1fd5ace7e6..7217ec3b062 100644 --- a/cpp/src/Ice/ThreadPool.cpp +++ b/cpp/src/Ice/ThreadPool.cpp @@ -333,13 +333,7 @@ void IceInternal::ThreadPoolWorkQueue::postMessage() { #if defined(ICE_USE_IOCP) - if(!PostQueuedCompletionStatus(_selector.getIOCPHandle(), 0, reinterpret_cast<ULONG_PTR>(this), -# if defined(_MSC_VER) && (_MSC_VER < 1300) // COMPILER FIX: VC60 - reinterpret_cast<LPOVERLAPPED>(&_info) -# else - &_info -# endif - )) + if(!PostQueuedCompletionStatus(_selector.getIOCPHandle(), 0, reinterpret_cast<ULONG_PTR>(this), &_info)) { SocketException ex(__FILE__, __LINE__); ex.error = GetLastError(); diff --git a/cpp/src/Ice/ThreadPool.h b/cpp/src/Ice/ThreadPool.h index e46f244dce1..c9084d46a28 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(__MINGW32__) || (defined(_MSC_VER) && (_MSC_VER < 1300)) +#if defined(__MINGW32__) IceUtil::LockT<T> sync(_mutex); #else IceUtil::LockT<typename T> sync(_mutex); diff --git a/cpp/src/IceDB/FreezeTypes.h b/cpp/src/IceDB/FreezeTypes.h index e09763cd232..ec351dc48c8 100644 --- a/cpp/src/IceDB/FreezeTypes.h +++ b/cpp/src/IceDB/FreezeTypes.h @@ -108,17 +108,13 @@ public: try { std::map<Key, Value> m; -#if defined(_MSC_VER) && (_MSC_VER < 1300) - for(Dict::const_iterator p = _dict.begin(); p != _dict.end(); ++p) -#else for(typename Dict::const_iterator p = _dict.begin(); p != _dict.end(); ++p) -#endif { #ifdef __SUNPRO_CC std::map<Key, Value>::value_type v(p->first, p->second); m.insert(v); #else - m.insert(*p); + m.insert(*p); #endif } return m; @@ -135,11 +131,7 @@ public: { try { -#if defined(_MSC_VER) && (_MSC_VER < 1300) - _dict.put(Dict::value_type(key, data)); -#else _dict.put(typename Dict::value_type(key, data)); -#endif } catch(const Freeze::DatabaseException& ex) { @@ -153,11 +145,7 @@ public: { try { -#if defined(_MSC_VER) && (_MSC_VER < 1300) - Dict::const_iterator p = _dict.find(key); -#else typename Dict::const_iterator p = _dict.find(key); -#endif if(p == _dict.end()) { throw NotFoundException(__FILE__, __LINE__); diff --git a/cpp/src/IceGrid/Activator.cpp b/cpp/src/IceGrid/Activator.cpp index 0c5a82cf24a..628978b6488 100644 --- a/cpp/src/IceGrid/Activator.cpp +++ b/cpp/src/IceGrid/Activator.cpp @@ -481,11 +481,7 @@ Activator::activate(const string& name, // // Make a copy of the command line. // -#if defined(_MSC_VER) && (_MSC_VER >= 1400) wchar_t* cmdbuf = _wcsdup(IceUtil::stringToWstring(cmd).c_str()); -#else - wchar_t* cmdbuf = wcsdup(IceUtil::stringToWstring(cmd).c_str()); -#endif // // Create the environment block for the child process. We start with the environment diff --git a/cpp/src/IceGrid/DescriptorHelper.cpp b/cpp/src/IceGrid/DescriptorHelper.cpp index bcd8beb33cd..67467f280f9 100644 --- a/cpp/src/IceGrid/DescriptorHelper.cpp +++ b/cpp/src/IceGrid/DescriptorHelper.cpp @@ -117,19 +117,11 @@ struct ReplicaGroupEq : std::binary_function<ReplicaGroupDescriptor&, ReplicaGro template <typename GetKeyFunc, typename Seq> Seq getSeqUpdatedElts(const Seq& lseq, const Seq& rseq, GetKeyFunc func) { -#if defined(_MSC_VER) && (_MSC_VER < 1300) - return getSeqUpdatedEltsWithEq(lseq, rseq, func, equal_to<Seq::value_type>()); -#else return getSeqUpdatedEltsWithEq(lseq, rseq, func, equal_to<typename Seq::value_type>()); -#endif } template <typename GetKeyFunc, typename EqFunc, typename Seq> Seq -#if defined(_MSC_VER) && (_MSC_VER < 1300) getSeqUpdatedEltsWithEq(const Seq& lseq, const Seq& rseq, GetKeyFunc func, EqFunc eq) -#else -getSeqUpdatedEltsWithEq(const Seq& lseq, const Seq& rseq, GetKeyFunc func, EqFunc eq) -#endif { Seq result; for(typename Seq::const_iterator p = rseq.begin(); p != rseq.end(); ++p) @@ -216,11 +208,7 @@ getDictUpdatedEltsWithEq(const Dict& ldict, const Dict& rdict, EqFunc eq) template<typename Dict> Dict getDictUpdatedElts(const Dict& ldict, const Dict& rdict) { -#if defined(_MSC_VER) && (_MSC_VER < 1300) - return getDictUpdatedEltsWithEq(ldict, rdict, equal_to<Dict::mapped_type>()); -#else return getDictUpdatedEltsWithEq(ldict, rdict, equal_to<typename Dict::mapped_type>()); -#endif } template <typename Dict> Ice::StringSeq diff --git a/cpp/src/IceGrid/FileCache.cpp b/cpp/src/IceGrid/FileCache.cpp index 0ac4a071333..b34d7978710 100644 --- a/cpp/src/IceGrid/FileCache.cpp +++ b/cpp/src/IceGrid/FileCache.cpp @@ -164,11 +164,7 @@ FileCache::read(const string& file, Ice::Long offset, int size, Ice::Long& newOf // newOffset = offset; lines = Ice::StringSeq(); -#if defined(_MSC_VER) && (_MSC_VER < 1300) - is.seekg(static_cast<int>(offset)); -#else is.seekg(static_cast<streamoff>(offset), ios::beg); -#endif int totalSize = 0; string line; diff --git a/cpp/src/IceGrid/Parser.cpp b/cpp/src/IceGrid/Parser.cpp index 32143e1b138..e80d54408b1 100644 --- a/cpp/src/IceGrid/Parser.cpp +++ b/cpp/src/IceGrid/Parser.cpp @@ -2094,12 +2094,7 @@ Parser::getInput(char* buf, int& result, int maxSize) } else { -#if defined(_MSC_VER) && _MSC_VER < 1500 && !defined(_STLP_MSVC) - // COMPILERBUG: Visual C++ defines min and max as macros - result = _MIN(maxSize, static_cast<int>(_commands.length())); -#else result = min(maxSize, static_cast<int>(_commands.length())); -#endif strncpy(buf, _commands.c_str(), result); _commands.erase(0, result); if(_commands.empty()) diff --git a/cpp/src/IceGrid/PlatformInfo.cpp b/cpp/src/IceGrid/PlatformInfo.cpp index aae69f0d2c1..fc7e421159d 100644 --- a/cpp/src/IceGrid/PlatformInfo.cpp +++ b/cpp/src/IceGrid/PlatformInfo.cpp @@ -266,11 +266,7 @@ PlatformInfo::PlatformInfo(const string& prefix, switch(sysInfo.wProcessorArchitecture) { -#if defined(_MSC_VER) && (_MSC_VER < 1300) - case 9: // PROCESSOR_ARCHITECTURE_AMD64 -#else case PROCESSOR_ARCHITECTURE_AMD64: -#endif _machine = "x64"; break; case PROCESSOR_ARCHITECTURE_IA64: diff --git a/cpp/src/IcePatch2/FileServerI.cpp b/cpp/src/IcePatch2/FileServerI.cpp index daec1f2216a..5076329b757 100755 --- a/cpp/src/IcePatch2/FileServerI.cpp +++ b/cpp/src/IcePatch2/FileServerI.cpp @@ -105,13 +105,7 @@ IcePatch2::FileServerI::getFileCompressed_async(const AMD_FileServer_getFileComp return; } - if( -#if defined(_MSC_VER) && (_MSC_VER >= 1400) - _lseek(fd, static_cast<off_t>(pos), SEEK_SET) -#else - lseek(fd, static_cast<off_t>(pos), SEEK_SET) -#endif - != static_cast<off_t>(pos)) + if(_lseek(fd, static_cast<off_t>(pos), SEEK_SET) != static_cast<off_t>(pos)) { IceUtilInternal::close(fd); @@ -127,13 +121,7 @@ IcePatch2::FileServerI::getFileCompressed_async(const AMD_FileServer_getFileComp IceUtil::ScopedArray<Byte> bytes(new Byte[num]); #ifdef _WIN32 int r; - if((r = -#if defined(_MSC_VER) && (_MSC_VER >= 1400) - _read(fd, bytes.get(), static_cast<unsigned int>(num)) -#else - read(fd, bytes.get(), static_cast<unsigned int>(num)) -#endif - ) == -1) + if((r = _read(fd, bytes.get(), static_cast<unsigned int>(num))) == -1) #else ssize_t r; if((r = read(fd, bytes.get(), static_cast<size_t>(num))) == -1) diff --git a/cpp/src/IcePatch2Lib/Util.cpp b/cpp/src/IcePatch2Lib/Util.cpp index 3f5713be7c1..3c898621c22 100755 --- a/cpp/src/IcePatch2Lib/Util.cpp +++ b/cpp/src/IcePatch2Lib/Util.cpp @@ -493,12 +493,7 @@ IcePatch2::readDirectory(const string& pa) const wstring fs = IceUtil::stringToWstring(simplify(path + "/*")); struct _wfinddata_t data; - -# if defined(_MSC_VER) && (_MSC_VER < 1300) - long h = _wfindfirst(fs.c_str(), &data); -# else intptr_t h = _wfindfirst(fs.c_str(), &data); -# endif if(h == -1) { throw "cannot read directory `" + path + "':\n" + IceUtilInternal::lastErrorToString(); @@ -970,13 +965,7 @@ getFileInfoSeqInt(const string& basePath, const string& relPath, int compress, G while(bytesLeft > 0) { ByteSeq bytes(min(bytesLeft, 1024u*1024)); - if( -#if defined(_MSC_VER) && (_MSC_VER >= 1400) - _read(fd, &bytes[0], static_cast<unsigned int>(bytes.size())) -#else - read(fd, &bytes[0], static_cast<unsigned int>(bytes.size())) -#endif - == -1) + if(_read(fd, &bytes[0], static_cast<unsigned int>(bytes.size())) == -1) { if(doCompress) { diff --git a/cpp/src/IceSSL/AcceptorI.cpp b/cpp/src/IceSSL/AcceptorI.cpp index f1b45d6afc7..fec3e89d09d 100644 --- a/cpp/src/IceSSL/AcceptorI.cpp +++ b/cpp/src/IceSSL/AcceptorI.cpp @@ -112,13 +112,7 @@ IceSSL::AcceptorI::startAccept() assert(_acceptFd == INVALID_SOCKET); _acceptFd = IceInternal::createSocket(false, _addr); const int sz = static_cast<int>(_acceptBuf.size() / 2); - if(!AcceptEx(_fd, _acceptFd, &_acceptBuf[0], 0, sz, sz, &_info.count, -#if defined(_MSC_VER) && (_MSC_VER < 1300) // COMPILER FIX: VC60 - reinterpret_cast<LPOVERLAPPED>(&_info) -#else - &_info -#endif - )) + if(!AcceptEx(_fd, _acceptFd, &_acceptBuf[0], 0, sz, sz, &_info.count, &_info)) { if(!IceInternal::wouldBlock()) { diff --git a/cpp/src/IceStorm/Parser.cpp b/cpp/src/IceStorm/Parser.cpp index 3a638831bdd..8079cbd186a 100644 --- a/cpp/src/IceStorm/Parser.cpp +++ b/cpp/src/IceStorm/Parser.cpp @@ -372,7 +372,7 @@ Parser::current(const list<string>& args) void Parser::showBanner() { - cout << "Ice " << ICE_STRING_VERSION << " Copyright 2003-2011 ZeroC, Inc." << endl; + cout << "Ice " << ICE_STRING_VERSION << " Copyright 2003-2012 ZeroC, Inc." << endl; } void @@ -386,12 +386,7 @@ Parser::getInput(char* buf, int& result, int maxSize) } else { -#if defined(_MSC_VER) && _MSC_VER < 1500 && !defined(_STLP_MSVC) - // COMPILERBUG: Visual C++ defines min and max as macros - result = _MIN(maxSize, static_cast<int>(_commands.length())); -#else result = min(maxSize, static_cast<int>(_commands.length())); -#endif strncpy(buf, _commands.c_str(), result); _commands.erase(0, result); if(_commands.empty()) diff --git a/cpp/src/IceStorm/TopicI.cpp b/cpp/src/IceStorm/TopicI.cpp index dc08a60a364..35e0fe455dc 100644 --- a/cpp/src/IceStorm/TopicI.cpp +++ b/cpp/src/IceStorm/TopicI.cpp @@ -527,28 +527,6 @@ TopicImpl::getNonReplicatedPublisher() const } } -// -// COMPILERFIX: For some reason with VC6 find reports an error. -// -#if defined(_MSC_VER) && (_MSC_VER < 1300) -namespace -{ -vector<SubscriberPtr>::iterator -find(vector<SubscriberPtr>::iterator start, vector<SubscriberPtr>::iterator end, const Ice::Identity& ident) -{ - while(start != end) - { - if(*start == ident) - { - return start; - } - ++start; - } - return end; -} -} -#endif - namespace { void diff --git a/cpp/src/IceStorm/TransientTopicI.cpp b/cpp/src/IceStorm/TransientTopicI.cpp index 38200312476..25ecb67e32c 100644 --- a/cpp/src/IceStorm/TransientTopicI.cpp +++ b/cpp/src/IceStorm/TransientTopicI.cpp @@ -165,28 +165,6 @@ TransientTopicImpl::getNonReplicatedPublisher(const Ice::Current&) const return _publisherPrx; } -// -// COMPILERFIX: For some reason with VC6 find reports an error. -// -#if defined(_MSC_VER) && (_MSC_VER < 1300) -namespace -{ -static vector<SubscriberPtr>::iterator -find(vector<SubscriberPtr>::iterator start, vector<SubscriberPtr>::iterator end, const Ice::Identity& ident) -{ - while(start != end) - { - if(*start == ident) - { - return start; - } - ++start; - } - return end; -} -} -#endif - void TransientTopicImpl::subscribe(const QoS& origQoS, const Ice::ObjectPrx& obj, const Ice::Current&) { diff --git a/cpp/src/IceUtil/FileUtil.cpp b/cpp/src/IceUtil/FileUtil.cpp index b69e8d6b20a..58e321c5d63 100644 --- a/cpp/src/IceUtil/FileUtil.cpp +++ b/cpp/src/IceUtil/FileUtil.cpp @@ -170,7 +170,7 @@ IceUtilInternal::unlink(const string& path) int IceUtilInternal::close(int fd) { -#if defined(_MSC_VER) && (_MSC_VER >= 1400) || defined(__MINGW32__) +#ifdef __MINGW32__ return _close(fd); #else return ::close(fd); @@ -228,95 +228,10 @@ IceUtilInternal::FileLock::~FileLock() unlink(_path); } -#ifdef _STLP_BEGIN_NAMESPACE -namespace -{ -int -toFileFlags(ios_base::openmode mode) -{ - int flags = 0; - if(mode & ios_base::app) - { - flags |= _O_APPEND; - } - if(mode & ios_base::trunc) - { - flags |= _O_TRUNC; - } - if(mode & ios_base::binary) - { - flags |= _O_BINARY; - } - if((mode & ios_base::in) && !(mode & ios_base::out)) - { - flags |= _O_RDONLY; - } - else if((mode & ios_base::out) && !(mode & ios_base::in)) - { - flags |= _O_WRONLY | _O_CREAT; - } - else - { - flags |= _O_RDWR; - if(mode & ios_base::trunc) - { - flags |= _O_CREAT; - } - } - return flags; -} -} -#endif - IceUtilInternal::ifstream::ifstream() -#ifdef _STLP_BEGIN_NAMESPACE - : _fd(-1) -#endif -{ -} - -#ifdef _STLP_BEGIN_NAMESPACE - -IceUtilInternal::ifstream::ifstream(const string& path, ios_base::openmode mode) : _fd(-1) { - open(path, mode); } -IceUtilInternal::ifstream::~ifstream() -{ - close(); -} - -void -IceUtilInternal::ifstream::close() -{ - if(!rdbuf()->close()) - { - setstate(ios_base::failbit); - } - if(_fd >= 0) - { - _close(_fd); - } -} - -void -IceUtilInternal::ifstream::open(const string& path, ios_base::openmode mode) -{ - mode |= ifstream::in; - _fd = IceUtilInternal::open(path, toFileFlags(mode)); - if(_fd < 0 || !rdbuf()->open(_fd, mode)) - { - setstate(ios_base::failbit); - } - if(mode & (ios_base::ate || ios_base::app)) - { - seekg(ios_base::end); - } -} - -#else - IceUtilInternal::ifstream::ifstream(const string& path, ios_base::openmode mode) : #ifdef __MINGW32__ std::ifstream(path.c_str(), mode) @@ -336,57 +251,10 @@ IceUtilInternal::ifstream::open(const string& path, ios_base::openmode mode) #endif } -#endif - IceUtilInternal::ofstream::ofstream() -#ifdef _STLP_BEGIN_NAMESPACE - : _fd(-1) -#endif -{ -} - -#ifdef _STLP_BEGIN_NAMESPACE - -IceUtilInternal::ofstream::ofstream(const string& path, ios_base::openmode mode) : _fd(-1) -{ - open(path, mode); -} - -IceUtilInternal::ofstream::~ofstream() -{ - close(); -} - -void -IceUtilInternal::ofstream::close() { - if(!rdbuf()->close()) - { - setstate(ios_base::failbit); - } - if(_fd >= 0) - { - _close(_fd); - } } -void -IceUtilInternal::ofstream::open(const string& path, ios_base::openmode mode) -{ - mode |= ofstream::out; - _fd = IceUtilInternal::open(path, toFileFlags(mode)); - if(_fd < 0 || !rdbuf()->open(_fd, mode)) - { - setstate(ios_base::failbit); - } - if(mode & (ios_base::ate || ios_base::app)) - { - seekp(ios_base::end); - } -} - -#else - IceUtilInternal::ofstream::ofstream(const string& path, ios_base::openmode mode) : #ifdef __MINGW32__ std::ofstream(path.c_str(), mode) @@ -406,7 +274,6 @@ IceUtilInternal::ofstream::open(const string& path, ios_base::openmode mode) #endif } -#endif #else diff --git a/cpp/src/IceUtil/InputUtil.cpp b/cpp/src/IceUtil/InputUtil.cpp index 8f5edab81f9..058331a0552 100644 --- a/cpp/src/IceUtil/InputUtil.cpp +++ b/cpp/src/IceUtil/InputUtil.cpp @@ -11,7 +11,7 @@ #include <stdlib.h> #include <errno.h> -#if (defined(_MSC_VER) && (_MSC_VER < 1300) ) || (__MINGW32__) +#ifdef __MINGW32__ #include <limits.h> #endif @@ -26,10 +26,10 @@ namespace IceUtilInternal { -#if defined(__MINGW32__) || (defined(_MSC_VER) && (_MSC_VER < 1300)) +#ifdef __MINGW32__ // -// The VC60 runtime does not include _strtoi64, so we provide our own implementation +// The MINGW runtime does not include _strtoi64, so we provide our own implementation // static const string allDigits = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"; @@ -179,7 +179,7 @@ Int64 strToInt64(const char* s, char** endptr, int base) { #if defined(_WIN32) -# if defined(__MINGW32__) || (defined(_MSC_VER) && (_MSC_VER < 1300)) +# ifdef __MINGW32__ return strToInt64Impl(s, endptr, base); # else return _strtoi64(s, endptr, base); diff --git a/cpp/src/IceUtil/OutputUtil.cpp b/cpp/src/IceUtil/OutputUtil.cpp index 989eb5bba9c..00464533d98 100644 --- a/cpp/src/IceUtil/OutputUtil.cpp +++ b/cpp/src/IceUtil/OutputUtil.cpp @@ -35,11 +35,7 @@ IceUtilInternal::int64ToString(Int64 val) { char buf[64]; #ifdef _WIN32 -#if defined(_MSC_VER) && (_MSC_VER >= 1400) sprintf_s(buf, sizeof(buf), "%I64d", val); -#else - sprintf(buf, "%I64d", val); -#endif #elif defined(ICE_64) sprintf(buf, "%ld", val); // Avoids a format warning from GCC. #else diff --git a/cpp/src/IceUtil/Random.cpp b/cpp/src/IceUtil/Random.cpp index d47d424357f..f5bb19ba43b 100644 --- a/cpp/src/IceUtil/Random.cpp +++ b/cpp/src/IceUtil/Random.cpp @@ -7,7 +7,7 @@ // // ********************************************************************** -#if defined(_MSC_VER) && (_MSC_VER > 1400) +#ifdef _MSC_VER # define _CRT_RAND_S #endif @@ -25,7 +25,7 @@ using namespace std; using namespace IceUtil; -#if !defined(_WIN32) || !defined(_MSC_VER) || (_MSC_VER < 1400) +#if !defined(_WIN32) || !defined(_MSC_VER) namespace { @@ -88,7 +88,7 @@ IceUtilInternal::generateRandom(char* buffer, int size) { #ifdef _WIN32 -# if defined(_MSC_VER) && (_MSC_VER >= 1400) +# if defined(_MSC_VER) for(int i = 0; i < size; ++i) { buffer[i] = random(256); @@ -168,7 +168,7 @@ unsigned int IceUtilInternal::random(int limit) { unsigned int r; -#if defined(_MSC_VER) && (_MSC_VER > 1400) +#if defined(_MSC_VER) errno_t err = rand_s(&r); if(err != 0) { diff --git a/cpp/src/IceUtil/Thread.cpp b/cpp/src/IceUtil/Thread.cpp index 4c63bd7b0e2..fef17c9629d 100644 --- a/cpp/src/IceUtil/Thread.cpp +++ b/cpp/src/IceUtil/Thread.cpp @@ -181,11 +181,7 @@ WINAPI startHook(void* arg) { cerr << thread->name() << " terminating" << endl; } -#if defined(_MSC_VER) && (_MSC_VER < 1300) - terminate(); -#else std::terminate(); -#endif } thread->_done(); diff --git a/cpp/src/Makefile.mak b/cpp/src/Makefile.mak index 0679c275d92..6f068a4d739 100644 --- a/cpp/src/Makefile.mak +++ b/cpp/src/Makefile.mak @@ -21,37 +21,18 @@ SUBDIRS = IceUtil\winrt \ !else
SUBDIRS = IceUtil \
Slice \
- slice2cpp
-
-
-!if "$(CPP_COMPILER)" != "VC60"
-SUBDIRS = $(SUBDIRS) \
- slice2freeze
-
-!if "$(BCPLUSPLUS)" != "yes"
-SUBDIRS = $(SUBDIRS) \
+ slice2cpp \
+ slice2freeze \
slice2cs \
slice2freezej \
slice2java \
slice2py \
- slice2html
-!endif
-
-!endif
-
-!if "$(BCPLUSPLUS)" != "yes"
-SUBDIRS = $(SUBDIRS) \
+ slice2html \
slice2php \
- slice2rb
-!endif
-
-SUBDIRS = $(SUBDIRS) \
+ slice2rb \
Ice \
IceSSL \
- ca
-
-!if "$(CPP_COMPILER)" != "VC60"
-SUBDIRS = $(SUBDIRS) \
+ ca \
IceXML \
Freeze \
FreezeScript \
@@ -59,9 +40,6 @@ SUBDIRS = $(SUBDIRS) \ Glacier2Lib \
IceStormLib \
IceGridLib \
-
-!if "$(BCPLUSPLUS)" != "yes"
-SUBDIRS = $(SUBDIRS) \
IceBox \
IcePatch2 \
Glacier2 \
@@ -69,9 +47,6 @@ SUBDIRS = $(SUBDIRS) \ IceStorm \
IceGrid \
iceserviceinstall
-!endif
-
-!endif
!endif
diff --git a/cpp/src/Slice/FileTracker.cpp b/cpp/src/Slice/FileTracker.cpp index 0c97b35f448..a14638757a2 100644 --- a/cpp/src/Slice/FileTracker.cpp +++ b/cpp/src/Slice/FileTracker.cpp @@ -40,11 +40,7 @@ Slice::FileException::ice_name() const void Slice::FileException::ice_print(ostream& out) const { -#if defined(_MSC_VER) && (_MSC_VER < 1300) - Exception::ice_print(out); -#else IceUtil::Exception::ice_print(out); -#endif out << ": " << _reason; } diff --git a/cpp/src/iceserviceinstall/ServiceInstaller.cpp b/cpp/src/iceserviceinstall/ServiceInstaller.cpp index 2aeece3d32f..1b4e9aade6d 100644 --- a/cpp/src/iceserviceinstall/ServiceInstaller.cpp +++ b/cpp/src/iceserviceinstall/ServiceInstaller.cpp @@ -8,10 +8,7 @@ // ********************************************************************** #define _WIN32_WINNT 0x0500 - -#if defined(_MSC_VER) && _MSC_VER >= 1400 -# define _CRT_SECURE_NO_DEPRECATE 1 // C4996 '<C function>' was declared deprecated -#endif +#define _CRT_SECURE_NO_DEPRECATE 1 // C4996 '<C function>' was declared deprecated #include <ServiceInstaller.h> #include <IceUtil/StringUtil.h> @@ -19,13 +16,7 @@ #include <Aclapi.h> - -#if defined(_MSC_VER) && _MSC_VER >= 1300 -// -// The VC6 headers don't include Sddl.h -// #include <Sddl.h> -#endif using namespace std; using namespace Ice; @@ -475,13 +466,10 @@ IceServiceInstaller::initializeSid(const string& name) if(_debug) { Trace trace(_communicator->getLogger(), "IceServiceInstaller"); - -#if defined(_MSC_VER) && _MSC_VER >= 1300 wchar_t* sidString = 0; ConvertSidToStringSidW(_sid.get(), &sidString); trace << "SID: " << IceUtil::wstringToString(sidString) << "; "; LocalFree(sidString); -#endif trace << "Full name: " << _sidName; } } diff --git a/cpp/src/iceserviceinstall/ServiceInstaller.h b/cpp/src/iceserviceinstall/ServiceInstaller.h index 3c852931e9e..8efa7d3287e 100644 --- a/cpp/src/iceserviceinstall/ServiceInstaller.h +++ b/cpp/src/iceserviceinstall/ServiceInstaller.h @@ -15,20 +15,11 @@ class IceServiceInstaller { public: - -#if defined(_MSC_VER) && _MSC_VER < 1300 - enum { - icegridregistry = 0, - icegridnode = 1, - glacier2router = 2, - serviceCount = 3 - }; -#else + static const int icegridregistry = 0; static const int icegridnode = 1; static const int glacier2router = 2; static const int serviceCount = 3; -#endif IceServiceInstaller(int, const std::string&, const Ice::CommunicatorPtr&); diff --git a/cpp/src/slice2confluence/Gen.cpp b/cpp/src/slice2confluence/Gen.cpp index 32aa163edd3..80459a650df 100755 --- a/cpp/src/slice2confluence/Gen.cpp +++ b/cpp/src/slice2confluence/Gen.cpp @@ -7,7 +7,7 @@ // // ********************************************************************** -#if defined(_MSC_VER) && _MSC_VER >= 1400 +#if defined(_MSC_VER) # define _CRT_SECURE_NO_DEPRECATE 1 // C4996 '<C function>' was declared deprecated #endif diff --git a/cpp/src/slice2cpp/Gen.cpp b/cpp/src/slice2cpp/Gen.cpp index db0cbd559bd..db170626d26 100644 --- a/cpp/src/slice2cpp/Gen.cpp +++ b/cpp/src/slice2cpp/Gen.cpp @@ -1426,18 +1426,8 @@ Slice::Gen::TypesVisitor::visitConst(const ConstPtr& p) void Slice::Gen::TypesVisitor::emitUpcall(const ExceptionPtr& base, const string& call, bool isLocal) { - C.zeroIndent(); - C << nl << "#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug"; // COMPILERFIX - C.restoreIndent(); - C << nl << (base ? fixKwd(base->name()) : string(isLocal ? "LocalException" : "UserException")) << call; - C.zeroIndent(); - C << nl << "#else"; - C.restoreIndent(); C << nl << (base ? fixKwd(base->scoped()) : string(isLocal ? "::Ice::LocalException" : "::Ice::UserException")) << call; - C.zeroIndent(); - C << nl << "#endif"; - C.restoreIndent(); } Slice::Gen::ProxyDeclVisitor::ProxyDeclVisitor(Output& h, Output& c, const string& dllExport) : @@ -1646,18 +1636,7 @@ Slice::Gen::ProxyVisitor::visitClassDefEnd(const ClassDefPtr& p) H << nl << nl << "::IceInternal::ProxyHandle<" << name << "> ice_context(const ::Ice::Context& __context) const"; H << sb; - H.dec(); - H << nl << "#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug"; // COMPILERFIX - H.inc(); - H << nl << "typedef ::IceProxy::Ice::Object _Base;"; - H << nl << "return dynamic_cast<" << name << "*>(_Base::ice_context(__context).get());"; - H.dec(); - H << nl << "#else"; - H.inc(); H << nl << "return dynamic_cast<" << name << "*>(::IceProxy::Ice::Object::ice_context(__context).get());"; - H.dec(); - H << nl << "#endif"; - H.inc(); H << eb; // @@ -1666,298 +1645,98 @@ Slice::Gen::ProxyVisitor::visitClassDefEnd(const ClassDefPtr& p) H << nl << nl << "::IceInternal::ProxyHandle<" << name << "> ice_adapterId(const ::std::string& __id) const"; H << sb; - H.dec(); - H << nl << "#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug"; // COMPILERFIX - H.inc(); - H << nl << "typedef ::IceProxy::Ice::Object _Base;"; - H << nl << "return dynamic_cast<" << name << "*>(_Base::ice_adapterId(__id).get());"; - H.dec(); - H << nl << "#else"; - H.inc(); H << nl << "return dynamic_cast<" << name << "*>(::IceProxy::Ice::Object::ice_adapterId(__id).get());"; - H.dec(); - H << nl << "#endif"; - H.inc(); H << eb; H << nl << nl << "::IceInternal::ProxyHandle<" << name << "> ice_endpoints(const ::Ice::EndpointSeq& __endpoints) const"; H << sb; - H.dec(); - H << nl << "#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug"; // COMPILERFIX - H.inc(); - H << nl << "typedef ::IceProxy::Ice::Object _Base;"; - H << nl << "return dynamic_cast<" << name << "*>(_Base::ice_endpoints(__endpoints).get());"; - H.dec(); - H << nl << "#else"; - H.inc(); H << nl << "return dynamic_cast<" << name << "*>(::IceProxy::Ice::Object::ice_endpoints(__endpoints).get());"; - H.dec(); - H << nl << "#endif"; - H.inc(); H << eb; H << nl << nl << "::IceInternal::ProxyHandle<" << name << "> ice_locatorCacheTimeout(int __timeout) const"; H << sb; - H.dec(); - H << nl << "#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug"; // COMPILERFIX - H.inc(); - H << nl << "typedef ::IceProxy::Ice::Object _Base;"; - H << nl << "return dynamic_cast<" << name << "*>(_Base::ice_locatorCacheTimeout(__timeout).get());"; - H.dec(); - H << nl << "#else"; - H.inc(); H << nl << "return dynamic_cast<" << name << "*>(::IceProxy::Ice::Object::ice_locatorCacheTimeout(__timeout).get());"; - H.dec(); - H << nl << "#endif"; - H.inc(); H << eb; H << nl << nl << "::IceInternal::ProxyHandle<" << name << "> ice_connectionCached(bool __cached) const"; H << sb; - H.dec(); - H << nl << "#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug"; // COMPILERFIX - H.inc(); - H << nl << "typedef ::IceProxy::Ice::Object _Base;"; - H << nl << "return dynamic_cast<" << name << "*>(_Base::ice_connectionCached(__cached).get());"; - H.dec(); - H << nl << "#else"; - H.inc(); H << nl << "return dynamic_cast<" << name << "*>(::IceProxy::Ice::Object::ice_connectionCached(__cached).get());"; - H.dec(); H << nl << "#endif"; H.inc(); H << eb; H << nl << nl << "::IceInternal::ProxyHandle<" << name << "> ice_endpointSelection(::Ice::EndpointSelectionType __est) const"; H << sb; - H.dec(); - H << nl << "#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug"; // COMPILERFIX - H.inc(); - H << nl << "typedef ::IceProxy::Ice::Object _Base;"; - H << nl << "return dynamic_cast<" << name << "*>(_Base::ice_endpointSelection(__est).get());"; - H.dec(); - H << nl << "#else"; - H.inc(); H << nl << "return dynamic_cast<" << name << "*>(::IceProxy::Ice::Object::ice_endpointSelection(__est).get());"; - H.dec(); - H << nl << "#endif"; - H.inc(); H << eb; H << nl << nl << "::IceInternal::ProxyHandle<" << name << "> ice_secure(bool __secure) const"; H << sb; - H.dec(); - H << nl << "#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug"; // COMPILERFIX - H.inc(); - H << nl << "typedef ::IceProxy::Ice::Object _Base;"; - H << nl << "return dynamic_cast<" << name << "*>(_Base::ice_secure(__secure).get());"; - H.dec(); - H << nl << "#else"; - H.inc(); H << nl << "return dynamic_cast<" << name << "*>(::IceProxy::Ice::Object::ice_secure(__secure).get());"; - H.dec(); - H << nl << "#endif"; - H.inc(); H << eb; H << nl << nl << "::IceInternal::ProxyHandle<" << name << "> ice_preferSecure(bool __preferSecure) const"; H << sb; - H.dec(); - H << nl << "#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug"; // COMPILERFIX - H.inc(); - H << nl << "typedef ::IceProxy::Ice::Object _Base;"; - H << nl << "return dynamic_cast<" << name << "*>(_Base::ice_preferSecure(__preferSecure).get());"; - H.dec(); - H << nl << "#else"; - H.inc(); H << nl << "return dynamic_cast<" << name << "*>(::IceProxy::Ice::Object::ice_preferSecure(__preferSecure).get());"; - H.dec(); - H << nl << "#endif"; - H.inc(); H << eb; H << nl << nl << "::IceInternal::ProxyHandle<" << name << "> ice_router(const ::Ice::RouterPrx& __router) const"; H << sb; - H.dec(); - H << nl << "#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug"; // COMPILERFIX - H.inc(); - H << nl << "typedef ::IceProxy::Ice::Object _Base;"; - H << nl << "return dynamic_cast<" << name << "*>(_Base::ice_router(__router).get());"; - H.dec(); - H << nl << "#else"; - H.inc(); H << nl << "return dynamic_cast<" << name << "*>(::IceProxy::Ice::Object::ice_router(__router).get());"; - H.dec(); - H << nl << "#endif"; - H.inc(); H << eb; H << nl << nl << "::IceInternal::ProxyHandle<" << name << "> ice_locator(const ::Ice::LocatorPrx& __locator) const"; H << sb; - H.dec(); H << nl << "#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug"; // COMPILERFIX - H.inc(); - H << nl << "typedef ::IceProxy::Ice::Object _Base;"; - H << nl << "return dynamic_cast<" << name << "*>(_Base::ice_locator(__locator).get());"; - H.dec(); - H << nl << "#else"; - H.inc(); H << nl << "return dynamic_cast<" << name << "*>(::IceProxy::Ice::Object::ice_locator(__locator).get());"; - H.dec(); - H << nl << "#endif"; - H.inc(); H << eb; H << nl << nl << "::IceInternal::ProxyHandle<" << name << "> ice_collocationOptimized(bool __co) const"; H << sb; - H.dec(); H << nl << "#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug"; // COMPILERFIX - H.inc(); - H << nl << "typedef ::IceProxy::Ice::Object _Base;"; - H << nl << "return dynamic_cast<" << name << "*>(_Base::ice_collocationOptimized(__co).get());"; - H.dec(); H << nl << "#else"; H.inc(); H << nl << "return dynamic_cast<" << name << "*>(::IceProxy::Ice::Object::ice_collocationOptimized(__co).get());"; - H.dec(); H << nl << "#endif"; H.inc(); H << eb; H << nl << nl << "::IceInternal::ProxyHandle<" << name << "> ice_twoway() const"; H << sb; - H.dec(); - H << nl << "#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug"; // COMPILERFIX - H.inc(); - H << nl << "typedef ::IceProxy::Ice::Object _Base;"; - H << nl << "return dynamic_cast<" << name << "*>(_Base::ice_twoway().get());"; - H.dec(); - H << nl << "#else"; - H.inc(); H << nl << "return dynamic_cast<" << name << "*>(::IceProxy::Ice::Object::ice_twoway().get());"; - H.dec(); - H << nl << "#endif"; - H.inc(); H << eb; H << nl << nl << "::IceInternal::ProxyHandle<" << name << "> ice_oneway() const"; H << sb; - H.dec(); - H << nl << "#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug"; // COMPILERFIX - H.inc(); - H << nl << "typedef ::IceProxy::Ice::Object _Base;"; - H << nl << "return dynamic_cast<" << name << "*>(_Base::ice_oneway().get());"; - H.dec(); - H << nl << "#else"; H.inc(); H << nl << "return dynamic_cast<" << name << "*>(::IceProxy::Ice::Object::ice_oneway().get());"; - H.dec(); - H << nl << "#endif"; - H.inc(); H << eb; H << nl << nl << "::IceInternal::ProxyHandle<" << name << "> ice_batchOneway() const"; H << sb; - H.dec(); - H << nl << "#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug"; // COMPILERFIX - H.inc(); - H << nl << "typedef ::IceProxy::Ice::Object _Base;"; - H << nl << "return dynamic_cast<" << name << "*>(_Base::ice_batchOneway().get());"; - H.dec(); - H << nl << "#else"; - H.inc(); H << nl << "return dynamic_cast<" << name << "*>(::IceProxy::Ice::Object::ice_batchOneway().get());"; - H.dec(); - H << nl << "#endif"; - H.inc(); H << eb; H << nl << nl << "::IceInternal::ProxyHandle<" << name << "> ice_datagram() const"; H << sb; - H.dec(); - H << nl << "#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug"; // COMPILERFIX - H.inc(); - H << nl << "typedef ::IceProxy::Ice::Object _Base;"; - H << nl << "return dynamic_cast<" << name << "*>(_Base::ice_datagram().get());"; - H.dec(); - H << nl << "#else"; - H.inc(); H << nl << "return dynamic_cast<" << name << "*>(::IceProxy::Ice::Object::ice_datagram().get());"; - H.dec(); - H << nl << "#endif"; - H.inc(); H << eb; H << nl << nl << "::IceInternal::ProxyHandle<" << name << "> ice_batchDatagram() const"; H << sb; - H.dec(); - H << nl << "#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug"; // COMPILERFIX - H.inc(); - H << nl << "typedef ::IceProxy::Ice::Object _Base;"; - H << nl << "return dynamic_cast<" << name << "*>(_Base::ice_batchDatagram().get());"; - H.dec(); - H << nl << "#else"; - H.inc(); H << nl << "return dynamic_cast<" << name << "*>(::IceProxy::Ice::Object::ice_batchDatagram().get());"; - H.dec(); - H << nl << "#endif"; - H.inc(); H << eb; H << nl << nl << "::IceInternal::ProxyHandle<" << name << "> ice_compress(bool __compress) const"; H << sb; - H.dec(); - H << nl << "#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug"; // COMPILERFIX - H.inc(); - H << nl << "typedef ::IceProxy::Ice::Object _Base;"; - H << nl << "return dynamic_cast<" << name << "*>(_Base::ice_compress(__compress).get());"; - H.dec(); - H << nl << "#else"; - H.inc(); H << nl << "return dynamic_cast<" << name << "*>(::IceProxy::Ice::Object::ice_compress(__compress).get());"; - H.dec(); - H << nl << "#endif"; - H.inc(); H << eb; H << nl << nl << "::IceInternal::ProxyHandle<" << name << "> ice_timeout(int __timeout) const"; H << sb; - H.dec(); - H << nl << "#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug"; // COMPILERFIX - H.inc(); - H << nl << "typedef ::IceProxy::Ice::Object _Base;"; - H << nl << "return dynamic_cast<" << name << "*>(_Base::ice_timeout(__timeout).get());"; - H.dec(); - H << nl << "#else"; - H.inc(); H << nl << "return dynamic_cast<" << name << "*>(::IceProxy::Ice::Object::ice_timeout(__timeout).get());"; - H.dec(); - H << nl << "#endif"; - H.inc(); H << eb; H << nl << nl << "::IceInternal::ProxyHandle<" << name << "> ice_connectionId(const ::std::string& __id) const"; H << sb; - H.dec(); - H << nl << "#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug"; // COMPILERFIX - H.inc(); - H << nl << "typedef ::IceProxy::Ice::Object _Base;"; - H << nl << "return dynamic_cast<" << name << "*>(_Base::ice_connectionId(__id).get());"; - H.dec(); - H << nl << "#else"; - H.inc(); H << nl << "return dynamic_cast<" << name << "*>(::IceProxy::Ice::Object::ice_connectionId(__id).get());"; - H.dec(); - H << nl << "#endif"; - H.inc(); H << eb; H << nl << nl << "::IceInternal::ProxyHandle<" << name << "> ice_encodingVersion(const ::Ice::EncodingVersion& __v) const"; H << sb; - H.dec(); - H << nl << "#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug"; // COMPILERFIX - H.inc(); - H << nl << "typedef ::IceProxy::Ice::Object _Base;"; - H << nl << "return dynamic_cast<" << name << "*>(_Base::ice_encodingVersion(__v).get());"; - H.dec(); - H << nl << "#else"; - H.inc(); H << nl << "return dynamic_cast<" << name << "*>(::IceProxy::Ice::Object::ice_encodingVersion(__v).get());"; - H.dec(); - H << nl << "#endif"; - H.inc(); H << eb; H << nl << nl << _dllExport << "static const ::std::string& ice_staticId();"; @@ -4768,18 +4547,8 @@ Slice::Gen::ObjectVisitor::emitVirtualBaseInitializers(const ClassDefPtr& p, boo } upcall += ")"; - H.zeroIndent(); - H << nl << "#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug"; - H.restoreIndent(); - H << nl << fixKwd(p->name()) << upcall; - H.zeroIndent(); - H << nl << "#else"; - H.restoreIndent(); H << nl << fixKwd(p->scoped()) << upcall; - H.zeroIndent(); - H << nl << "#endif"; H << nl; - H.restoreIndent(); return true; } @@ -5146,38 +4915,12 @@ Slice::Gen::AsyncCallbackTemplateVisitor::generateOperation(const OperationPtr& H << eb; H << nl << "catch(::Ice::Exception& ex)"; H << sb; - H.zeroIndent(); - H << nl << "#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug"; // COMPILERFIX - H.restoreIndent(); - H << nl << "__exception(__result, ex);"; - H.zeroIndent(); - H << nl << "#else"; - H.restoreIndent(); + H << nl << "" << baseD << "::__exception(__result, ex);"; - H.zeroIndent(); - H << nl << "#endif"; - H.restoreIndent(); H << nl << "return;"; H << eb; H << nl << "if(response)"; H << sb; - H.zeroIndent(); - H << nl << "#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug"; // COMPILERFIX - H.restoreIndent(); - H << nl << "(callback.get()->*response)" << spar; - if(ret) - { - H << "__ret"; - } - H << outArgs; - if(withCookie) - { - H << "CT::dynamicCast(__result->getCookie())"; - } - H << epar << ';'; - H.zeroIndent(); - H << nl << "#else"; - H.restoreIndent(); H << nl << "(" << baseD << "::callback.get()->*response)" << spar; if(ret) { @@ -5189,9 +4932,6 @@ Slice::Gen::AsyncCallbackTemplateVisitor::generateOperation(const OperationPtr& H << "CT::dynamicCast(__result->getCookie())"; } H << epar << ';'; - H.zeroIndent(); - H << nl << "#endif"; - H.restoreIndent(); H << eb; H << eb; @@ -5817,17 +5557,7 @@ Slice::Gen::AsyncVisitor::visitOperation(const OperationPtr& p) H << eb; H << nl << "void __sent(bool sentSynchronously)"; H << sb; - H.zeroIndent(); - H << nl << "#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug"; // COMPILERFIX - H.restoreIndent(); - H << nl << "AMICallbackBase::__sent(sentSynchronously);"; - H.zeroIndent(); - H << nl << "#else"; - H.restoreIndent(); H << nl << "::Ice::AMICallbackBase::__sent(sentSynchronously);"; - H.zeroIndent(); - H << nl << "#endif"; - H.restoreIndent(); H << eb; H << eb << ';'; H << sp << nl << "typedef ::IceUtil::Handle< " << classScopedAMI << '_' << name << "> " << classNameAMI @@ -6068,17 +5798,7 @@ Slice::Gen::AsyncImplVisitor::visitOperation(const OperationPtr& p) } C << nl << "else"; C << sb; - C.zeroIndent(); - C << nl << "#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug"; // COMPILERFIX - C.restoreIndent(); - C << nl << "IncomingAsync::ice_exception(ex);"; - C.zeroIndent(); - C << nl << "#else"; - C.restoreIndent(); C << nl << "::IceInternal::IncomingAsync::ice_exception(ex);"; - C.zeroIndent(); - C << nl << "#endif"; - C.restoreIndent(); C << eb; C << eb; } diff --git a/cpp/src/slice2html/Gen.cpp b/cpp/src/slice2html/Gen.cpp index 91298ba7b5c..6472f661e45 100755 --- a/cpp/src/slice2html/Gen.cpp +++ b/cpp/src/slice2html/Gen.cpp @@ -7,7 +7,7 @@ // // ********************************************************************** -#if defined(_MSC_VER) && _MSC_VER >= 1400 +#if defined(_MSC_VER) # define _CRT_SECURE_NO_DEPRECATE 1 // C4996 '<C function>' was declared deprecated #endif diff --git a/cpp/test/Freeze/complex/Parser.cpp b/cpp/test/Freeze/complex/Parser.cpp index 2c1a6341d76..3bbb5d64873 100644 --- a/cpp/test/Freeze/complex/Parser.cpp +++ b/cpp/test/Freeze/complex/Parser.cpp @@ -69,12 +69,7 @@ Parser::getInput(char* buf, int& result, int maxSize) { if(!_buf.empty()) { -#if defined(_MSC_VER) && _MSC_VER < 1500 && !defined(_STLP_MSVC) - // COMPILERBUG: Visual C++ defines min and max as macros - result = _MIN(maxSize, static_cast<int>(_buf.length())); -#else result = min(maxSize, static_cast<int>(_buf.length())); -#endif strncpy(buf, _buf.c_str(), result); _buf.erase(0, result); } diff --git a/cpp/test/Ice/background/EndpointI.h b/cpp/test/Ice/background/EndpointI.h index 69684fa865f..da8b5d7a726 100644 --- a/cpp/test/Ice/background/EndpointI.h +++ b/cpp/test/Ice/background/EndpointI.h @@ -47,9 +47,7 @@ public: protected: virtual Ice::Int hashInit() const; -#if !defined(_MSC_VER) || _MSC_VER > 1300 using IceInternal::EndpointI::connectors; -#endif private: diff --git a/cpp/test/Ice/exceptions/AllTests.cpp b/cpp/test/Ice/exceptions/AllTests.cpp index 8fa3b573700..0ebc176792b 100644 --- a/cpp/test/Ice/exceptions/AllTests.cpp +++ b/cpp/test/Ice/exceptions/AllTests.cpp @@ -1110,10 +1110,6 @@ allTests(const Ice::CommunicatorPtr& communicator, bool collocated) test(false); } -#if (!defined(_MSC_VER) || _MSC_VER >= 1300) -// -// With VC6 SP5, there is no way to call ::A::__write from ::Mod::A -// try { thrower->throwModA(1, 2); @@ -1134,7 +1130,6 @@ allTests(const Ice::CommunicatorPtr& communicator, bool collocated) { test(false); } -#endif cout << "ok" << endl; @@ -1169,10 +1164,6 @@ allTests(const Ice::CommunicatorPtr& communicator, bool collocated) test(false); } -#if (!defined(_MSC_VER) || _MSC_VER >= 1300) -// -// With VC6 SP5, there is no way to call ::A::__write from ::Mod::A -// try { thrower->throwModA(1, 2); @@ -1192,7 +1183,6 @@ allTests(const Ice::CommunicatorPtr& communicator, bool collocated) { test(false); } -#endif cout << "ok" << endl; @@ -1519,16 +1509,11 @@ allTests(const Ice::CommunicatorPtr& communicator, bool collocated) cb->check(); } -#if (!defined(_MSC_VER) || _MSC_VER >= 1300) -// -// With VC6 SP5, there is no way to call ::A::__write from ::Mod::A -// { AMI_Thrower_throwModAIPtr cb = new AMI_Thrower_throwModAI; thrower->throwModA_async(cb, 1, 2); cb->check(); } -#endif cout << "ok" << endl; @@ -1673,10 +1658,6 @@ allTests(const Ice::CommunicatorPtr& communicator, bool collocated) cb->check(); } -#if (!defined(_MSC_VER) || _MSC_VER >= 1300) -// -// With VC6 SP5, there is no way to call ::A::__write from ::Mod::A -// { CallbackPtr cb = new Callback; Callback_Thrower_throwModAPtr callback = @@ -1684,7 +1665,6 @@ allTests(const Ice::CommunicatorPtr& communicator, bool collocated) thrower->begin_throwModA(1, 2, callback); cb->check(); } -#endif cout << "ok" << endl; diff --git a/cpp/test/Ice/objects/AllTests.cpp b/cpp/test/Ice/objects/AllTests.cpp index ae99c434b49..9945eee5735 100644 --- a/cpp/test/Ice/objects/AllTests.cpp +++ b/cpp/test/Ice/objects/AllTests.cpp @@ -190,14 +190,12 @@ allTests(const Ice::CommunicatorPtr& communicator, bool collocated) initial->setI(h); cout << "ok" << endl; -#if !defined(_MSC_VER) || (_MSC_VER >= 1300) if(!collocated) { cout << "testing UnexpectedObjectException... " << flush; testUOE(communicator); cout << "ok" << endl; } -#endif return initial; } diff --git a/cpp/test/Ice/objects/TestI.cpp b/cpp/test/Ice/objects/TestI.cpp index fdb272dea7c..648dd4df0cf 100644 --- a/cpp/test/Ice/objects/TestI.cpp +++ b/cpp/test/Ice/objects/TestI.cpp @@ -228,7 +228,6 @@ UnexpectedObjectExceptionTestI::ice_invoke(const std::vector<Ice::Byte>&, std::vector<Ice::Byte>& outParams, const Ice::Current& current) { -#if !defined(_MSC_VER) || (_MSC_VER >= 1300) Ice::CommunicatorPtr communicator = current.adapter->getCommunicator(); Ice::OutputStreamPtr out = Ice::createOutputStream(communicator); out->startEncapsulation(); @@ -237,6 +236,5 @@ UnexpectedObjectExceptionTestI::ice_invoke(const std::vector<Ice::Byte>&, out->writePendingObjects(); out->endEncapsulation(); out->finished(outParams); -#endif return true; } diff --git a/cpp/test/Ice/proxy/TestAMDI.cpp b/cpp/test/Ice/proxy/TestAMDI.cpp index 5eda8e63fd2..355f4bd1e46 100644 --- a/cpp/test/Ice/proxy/TestAMDI.cpp +++ b/cpp/test/Ice/proxy/TestAMDI.cpp @@ -38,10 +38,5 @@ bool MyDerivedClassI::ice_isA(const std::string& s, const Ice::Current& current) const { _ctx = current.ctx; - -#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug - return MyDerivedClass::ice_isA(s, current); -#else return Test::MyDerivedClass::ice_isA(s, current); -#endif } diff --git a/cpp/test/Ice/proxy/TestI.cpp b/cpp/test/Ice/proxy/TestI.cpp index fbc9219bee1..aad4b0f5e62 100644 --- a/cpp/test/Ice/proxy/TestI.cpp +++ b/cpp/test/Ice/proxy/TestI.cpp @@ -39,10 +39,5 @@ bool MyDerivedClassI::ice_isA(const std::string& s, const Ice::Current& current) const { _ctx = current.ctx; - -#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug - return MyDerivedClass::ice_isA(s, current); -#else return Test::MyDerivedClass::ice_isA(s, current); -#endif } diff --git a/cpp/test/IceGrid/Makefile.mak b/cpp/test/IceGrid/Makefile.mak index d9d6231de98..074f01af249 100644 --- a/cpp/test/IceGrid/Makefile.mak +++ b/cpp/test/IceGrid/Makefile.mak @@ -13,10 +13,7 @@ top_srcdir = ..\.. SUBDIRS = simple \
- admin
-
-!if "$(BCPLUSPLUS)" != "yes" && "$(CPP_COMPILER)" != "VC60"
-SUBDIRS = $(SUBDIRS) \
+ admin \
activation \
allocation \
deployer \
@@ -25,7 +22,6 @@ SUBDIRS = $(SUBDIRS) \ replication \
session \
update
-!endif
$(EVERYTHING)::
@for %i in ( $(SUBDIRS) ) do \
diff --git a/cpp/test/IceGrid/deployer/Server.cpp b/cpp/test/IceGrid/deployer/Server.cpp index 6bdfe03bb4a..0031b16770d 100644 --- a/cpp/test/IceGrid/deployer/Server.cpp +++ b/cpp/test/IceGrid/deployer/Server.cpp @@ -79,12 +79,6 @@ main(int argc, char* argv[]) } #if defined(_WIN32) - - // - // COMPILERFIX: Unicode environments don't work well with VC6 applications, - // for some reasons, the wstring returned by _wgetenv are incorrect. - // -#if (!defined(_MSC_VER) || _MSC_VER >= 1300) wchar_t* value2 = _wgetenv(L"MY_ENV_UNICODE_VARIABLE"); test(value2 != 0 && wstring(value2) == IceUtil::stringToWstring(unicodeVar)); @@ -94,7 +88,6 @@ main(int argc, char* argv[]) // Environment variables are case insensitive on Windows. wchar_t* value4 = _wgetenv(IceUtil::stringToWstring(varname1).c_str()); test(value4 != 0 && wstring(value4) == L"2"); -#endif char* value5 = getenv("MY_WINDOWS_COMPOSED_VARIABLE"); test(value5 != 0 && string(value5) == "BAR;12"); diff --git a/cpp/test/IceSSL/configuration/AllTests.cpp b/cpp/test/IceSSL/configuration/AllTests.cpp index 68153f7444a..92fc54e957f 100644 --- a/cpp/test/IceSSL/configuration/AllTests.cpp +++ b/cpp/test/IceSSL/configuration/AllTests.cpp @@ -171,11 +171,6 @@ createServerProps(const Ice::PropertiesPtr& defaultProperties, const string& def return result; } -#if defined(_MSC_VER) && (_MSC_VER < 1300) -void allTests2(const CommunicatorPtr&, const Ice::PropertiesPtr&, const string&, const string&, const string&, - const Test::ServerFactoryPrx&); -#endif - void allTests(const CommunicatorPtr& communicator, const string& testDir) { @@ -1039,23 +1034,7 @@ allTests(const CommunicatorPtr& communicator, const string& testDir) fact->destroyServer(server); comm->destroy(); } -#if defined(_MSC_VER) && (_MSC_VER < 1300) - // - // COMPILER FIX: VC60 generates "too many exception handler states" if single function - // - allTests2(communicator, defaultProperties, defaultDir, defaultHost, factoryRef, factory); -} - -void -allTests2(const CommunicatorPtr& communicator, - const Ice::PropertiesPtr& defaultProperties, - const string& defaultDir, - const string& defaultHost, - const string& factoryRef, - const Test::ServerFactoryPrx& factory) -{ - string sep = ";"; -#endif + { // // Configure a server with RSA and DSA certificates. diff --git a/cpp/test/IceUtil/inputUtil/Client.cpp b/cpp/test/IceUtil/inputUtil/Client.cpp index 73543bb4a19..ae0b00a43c2 100644 --- a/cpp/test/IceUtil/inputUtil/Client.cpp +++ b/cpp/test/IceUtil/inputUtil/Client.cpp @@ -210,7 +210,6 @@ main(int, char**) test(IceUtilInternal::splitString(":a:b:", ":", ss) && ss.size() == 2 && ss[0] == "a" && ss[1] == "b"); ss.clear(); -#if defined(_MSC_VER) && _MSC_VER >= 1300 // COMPILERBUG: VC++ 6 doesn't like escaped quotes test(IceUtilInternal::splitString("\"a\"", ":", ss) && ss.size() == 1 && ss[0] == "a"); ss.clear(); test(IceUtilInternal::splitString("\"a\":b", ":", ss) && ss.size() == 2 && ss[0] == "a" && ss[1] == "b"); @@ -221,7 +220,6 @@ main(int, char**) ss.clear(); test(IceUtilInternal::splitString("a=\"a:b\"", ":", ss) && ss.size() == 1 && ss[0] == "a=a:b"); ss.clear(); -#endif test(IceUtilInternal::splitString("'a'", ":", ss) && ss.size() == 1 && ss[0] == "a"); ss.clear(); @@ -230,7 +228,6 @@ main(int, char**) test(IceUtilInternal::splitString("\"'a\"", ":", ss) && ss.size() == 1 && ss[0] == "'a"); ss.clear(); -#if defined(_MSC_VER) && _MSC_VER >= 1300 // COMPILERBUG: VC++ 6 doesn't like escaped quotes test(IceUtilInternal::splitString("a\\'b", ":", ss) && ss.size() == 1 && ss[0] == "a'b"); ss.clear(); test(IceUtilInternal::splitString("'a:b\\'c'", ":", ss) && ss.size() == 1 && ss[0] == "a:b'c"); @@ -243,8 +240,6 @@ main(int, char**) ss.clear(); test(IceUtilInternal::splitString("\"a:b'c\"", ":", ss) && ss.size() == 1 && ss[0] == "a:b'c"); ss.clear(); -#endif - test(!IceUtilInternal::splitString("a\"b", ":", ss)); } cout << "ok" << endl; diff --git a/cpp/test/IceUtil/unicode/Client.cpp b/cpp/test/IceUtil/unicode/Client.cpp index f05cb7646b7..e2525c1440e 100644 --- a/cpp/test/IceUtil/unicode/Client.cpp +++ b/cpp/test/IceUtil/unicode/Client.cpp @@ -207,11 +207,7 @@ main(int argc, char* argv[]) int fd = IceUtilInternal::open(filepath, O_RDONLY); test(fd > 0); -# if defined(_MSC_VER) && (_MSC_VER >= 1400) test(_close(fd) == 0); -# else - test(close(fd) == 0); -# endif FILE* f = IceUtilInternal::fopen(filepath, "r"); test(f != 0); diff --git a/cpp/test/IceUtil/uuid/Client.cpp b/cpp/test/IceUtil/uuid/Client.cpp index ee717e246af..04e4d7f392a 100644 --- a/cpp/test/IceUtil/uuid/Client.cpp +++ b/cpp/test/IceUtil/uuid/Client.cpp @@ -68,11 +68,7 @@ public: T item = _func(); IceUtilInternal::MutexPtrLock<IceUtil::Mutex> lock(staticMutex); -#if defined(_MSC_VER) && (_MSC_VER < 1300) - pair<ItemSet::iterator, bool> ok = _itemSet.insert(item); -#else pair<typename ItemSet::iterator, bool> ok = _itemSet.insert(item); -#endif if(!ok.second) { cerr << "******* iteration " << i << endl; |