summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src')
-rwxr-xr-xcpp/src/Freeze/EvictorI.h17
-rw-r--r--cpp/src/FreezeScript/Data.cpp4
-rw-r--r--cpp/src/FreezeScript/Exception.cpp4
-rw-r--r--cpp/src/FreezeScript/Parser.cpp4
-rwxr-xr-xcpp/src/Ice/ConnectionFactory.cpp28
-rw-r--r--cpp/src/Ice/Network.cpp4
-rw-r--r--cpp/src/Ice/OutgoingAsync.cpp8
-rw-r--r--cpp/src/Ice/Proxy.cpp8
-rw-r--r--cpp/src/Ice/Selector.cpp17
-rw-r--r--cpp/src/Ice/Service.cpp4
-rw-r--r--cpp/src/Ice/TcpAcceptor.cpp8
-rw-r--r--cpp/src/Ice/ThreadPool.cpp8
-rw-r--r--cpp/src/Ice/ThreadPool.h2
-rw-r--r--cpp/src/IceDB/FreezeTypes.h14
-rw-r--r--cpp/src/IceGrid/Activator.cpp4
-rw-r--r--cpp/src/IceGrid/DescriptorHelper.cpp12
-rw-r--r--cpp/src/IceGrid/FileCache.cpp4
-rw-r--r--cpp/src/IceGrid/Parser.cpp5
-rw-r--r--cpp/src/IceGrid/PlatformInfo.cpp4
-rwxr-xr-xcpp/src/IcePatch2/FileServerI.cpp16
-rwxr-xr-xcpp/src/IcePatch2Lib/Util.cpp13
-rw-r--r--cpp/src/IceSSL/AcceptorI.cpp8
-rw-r--r--cpp/src/IceStorm/Parser.cpp7
-rw-r--r--cpp/src/IceStorm/TopicI.cpp22
-rw-r--r--cpp/src/IceStorm/TransientTopicI.cpp22
-rw-r--r--cpp/src/IceUtil/FileUtil.cpp135
-rw-r--r--cpp/src/IceUtil/InputUtil.cpp8
-rw-r--r--cpp/src/IceUtil/OutputUtil.cpp4
-rw-r--r--cpp/src/IceUtil/Random.cpp8
-rw-r--r--cpp/src/IceUtil/Thread.cpp4
-rw-r--r--cpp/src/Makefile.mak35
-rw-r--r--cpp/src/Slice/FileTracker.cpp4
-rw-r--r--cpp/src/iceserviceinstall/ServiceInstaller.cpp14
-rw-r--r--cpp/src/iceserviceinstall/ServiceInstaller.h11
-rwxr-xr-xcpp/src/slice2confluence/Gen.cpp2
-rw-r--r--cpp/src/slice2cpp/Gen.cpp282
-rwxr-xr-xcpp/src/slice2html/Gen.cpp2
37 files changed, 32 insertions, 724 deletions
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