summaryrefslogtreecommitdiff
path: root/cpp/src/Ice
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/Ice')
-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
9 files changed, 5 insertions, 82 deletions
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);