diff options
Diffstat (limited to 'cpp/src')
-rw-r--r-- | cpp/src/Ice/Network.cpp | 10 | ||||
-rw-r--r-- | cpp/src/Ice/Selector.cpp | 16 | ||||
-rw-r--r-- | cpp/src/Ice/TcpAcceptor.cpp | 8 | ||||
-rw-r--r-- | cpp/src/Ice/ThreadPool.cpp | 8 | ||||
-rw-r--r-- | cpp/src/Ice/ThreadPool.h | 4 | ||||
-rw-r--r-- | cpp/src/IceSSL/AcceptorI.cpp | 8 |
6 files changed, 48 insertions, 6 deletions
diff --git a/cpp/src/Ice/Network.cpp b/cpp/src/Ice/Network.cpp index 85bd7c8a997..56139b5aafb 100644 --- a/cpp/src/Ice/Network.cpp +++ b/cpp/src/Ice/Network.cpp @@ -543,7 +543,7 @@ IceInternal::wouldBlock() { #ifdef _WIN32 int error = WSAGetLastError(); - return error == WSAEWOULDBLOCK || error == WSA_IO_PENDING; + return error == WSAEWOULDBLOCK || error == WSA_IO_PENDING || error == ERROR_IO_PENDING; #else return errno == EAGAIN || errno == EWOULDBLOCK; #endif @@ -1305,7 +1305,13 @@ IceInternal::doConnectAsync(SOCKET fd, const struct sockaddr_storage& addr, Asyn throw ex; } - if(!ConnectEx(fd, reinterpret_cast<const struct sockaddr*>(&addr), size, 0, 0, 0, &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/Selector.cpp b/cpp/src/Ice/Selector.cpp index fefcca7a540..aeb68e92006 100644 --- a/cpp/src/Ice/Selector.cpp +++ b/cpp/src/Ice/Selector.cpp @@ -76,7 +76,13 @@ Selector::update(EventHandler* handler, SocketOperation remove, SocketOperation if(info) { - if(!PostQueuedCompletionStatus(_handle, 0, reinterpret_cast<ULONG_PTR>(handler), 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 + )) { Ice::SocketException ex(__FILE__, __LINE__); ex.error = GetLastError(); @@ -119,7 +125,11 @@ Selector::getNextHandler(SocketOperation& status, int timeout) } } +#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(); @@ -127,7 +137,11 @@ 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/TcpAcceptor.cpp b/cpp/src/Ice/TcpAcceptor.cpp index 0b008234f82..9a960d7fc35 100644 --- a/cpp/src/Ice/TcpAcceptor.cpp +++ b/cpp/src/Ice/TcpAcceptor.cpp @@ -116,7 +116,13 @@ IceInternal::TcpAcceptor::startAccept() assert(_acceptFd == INVALID_SOCKET); _acceptFd = createSocket(false, _addr.ss_family); const int sz = static_cast<int>(_acceptBuf.size() / 2); - if(!AcceptEx(_fd, _acceptFd, &_acceptBuf[0], 0, sz, sz, &_info.count, &_info)) + 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(WSAGetLastError() != WSA_IO_PENDING) { diff --git a/cpp/src/Ice/ThreadPool.cpp b/cpp/src/Ice/ThreadPool.cpp index 3c5a9a82311..d5ff021a660 100644 --- a/cpp/src/Ice/ThreadPool.cpp +++ b/cpp/src/Ice/ThreadPool.cpp @@ -306,7 +306,13 @@ public: break; } #else - if(!PostQueuedCompletionStatus(_selector.getIOCPHandle(), 0, reinterpret_cast<ULONG_PTR>(this), &_info)) + 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 + )) { SocketException ex(__FILE__, __LINE__); ex.error = GetLastError(); diff --git a/cpp/src/Ice/ThreadPool.h b/cpp/src/Ice/ThreadPool.h index 1b52124ea1c..51d4eb55af9 100644 --- a/cpp/src/Ice/ThreadPool.h +++ b/cpp/src/Ice/ThreadPool.h @@ -287,7 +287,11 @@ public: // of the event handler. We need to lock the event handler here to call // finishMessage. // +#if defined(__BCPLUSPLUS__) || (defined(_MSC_VER) && (_MSC_VER < 1300)) + IceUtil::LockT<T> sync(_mutex); +#else IceUtil::LockT<typename T> sync(_mutex); +#endif _current.finishMessage(); } } diff --git a/cpp/src/IceSSL/AcceptorI.cpp b/cpp/src/IceSSL/AcceptorI.cpp index b70ca0e965c..cb40592c5df 100644 --- a/cpp/src/IceSSL/AcceptorI.cpp +++ b/cpp/src/IceSSL/AcceptorI.cpp @@ -122,7 +122,13 @@ IceSSL::AcceptorI::startAccept() assert(_acceptFd == INVALID_SOCKET); _acceptFd = IceInternal::createSocket(false, _addr.ss_family); const int sz = static_cast<int>(_acceptBuf.size() / 2); - if(!AcceptEx(_fd, _acceptFd, &_acceptBuf[0], 0, sz, sz, &_info.count, &_info)) + 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(WSAGetLastError() != WSA_IO_PENDING) { |