summaryrefslogtreecommitdiff
path: root/ace/WIN32_Asynch_IO.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ace/WIN32_Asynch_IO.cpp')
-rw-r--r--ace/WIN32_Asynch_IO.cpp50
1 files changed, 23 insertions, 27 deletions
diff --git a/ace/WIN32_Asynch_IO.cpp b/ace/WIN32_Asynch_IO.cpp
index d638761d121..39e72b6f575 100644
--- a/ace/WIN32_Asynch_IO.cpp
+++ b/ace/WIN32_Asynch_IO.cpp
@@ -17,8 +17,6 @@ ACE_RCSID (ace,
#include "ace/OS_NS_unistd.h"
#include "ace/OS_NS_sys_socket.h"
-ACE_BEGIN_VERSIONED_NAMESPACE_DECL
-
size_t
ACE_WIN32_Asynch_Result::bytes_transferred (void) const
{
@@ -168,7 +166,7 @@ ACE_WIN32_Asynch_Operation::cancel (void)
{
#if (defined (ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 != 0)) \
&& ( (defined (_MSC_VER)) \
- || (defined (__BORLANDC__)) \
+ || (defined (__BORLANDC__) && (__BORLANDC__ >= 0x530)) \
|| (defined (__MINGW32)))
// All I/O operations that are canceled will complete with the error
// ERROR_OPERATION_ABORTED. All completion notifications for the I/O
@@ -595,9 +593,7 @@ ACE_WIN32_Asynch_Read_Stream::shared_read (ACE_WIN32_Asynch_Read_Stream_Result *
ACE_OS::set_errno_to_last_error ();
switch (errno)
{
- case ERROR_IO_PENDING:
- /* FALLTHRU */
- case ERROR_MORE_DATA:
+ case ERROR_IO_PENDING:
// The IO will complete proactively: the OVERLAPPED will still
// get queued.
return 0;
@@ -2578,7 +2574,9 @@ ACE_WIN32_Asynch_Connect::connect_i (ACE_WIN32_Asynch_Connect_Result *result,
result->set_error (errno);
}
return 1 ; // connect finished
- }
+ }
+
+ ACE_NOTREACHED (return 0);
}
@@ -3338,15 +3336,15 @@ ACE_WIN32_Asynch_Read_Dgram::recv (ACE_Message_Block *message_block,
-1);
// do the scatter/gather recv
- ssize_t initiate_result = ACE_OS::recvfrom (result->handle (),
- iov,
- iovcnt,
- number_of_bytes_recvd,
- result->flags_,
- result->saddr (),
- &(result->addr_len_),
- result,
- 0);
+ int initiate_result = ACE_OS::recvfrom (result->handle (),
+ iov,
+ iovcnt,
+ number_of_bytes_recvd,
+ result->flags_,
+ result->saddr (),
+ &(result->addr_len_),
+ result,
+ 0);
if (initiate_result == SOCKET_ERROR)
{
// If initiate failed, check for a bad error.
@@ -3665,15 +3663,15 @@ ACE_WIN32_Asynch_Write_Dgram::send (ACE_Message_Block *message_block,
// do the scatter/gather send
- ssize_t initiate_result = ACE_OS::sendto (result->handle (),
- iov,
- iovcnt,
- number_of_bytes_sent,
- result->flags_,
- (sockaddr *) addr.get_addr (),
- addr.get_size(),
- result,
- 0);
+ int initiate_result = ACE_OS::sendto (result->handle (),
+ iov,
+ iovcnt,
+ number_of_bytes_sent,
+ result->flags_,
+ (sockaddr *) addr.get_addr (),
+ addr.get_size(),
+ result,
+ 0);
if (initiate_result == SOCKET_ERROR)
@@ -3772,6 +3770,4 @@ template class ACE_Map_Reverse_Iterator<ACE_HANDLE, ACE_WIN32_Asynch_Connect_Res
#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
-ACE_END_VERSIONED_NAMESPACE_DECL
-
#endif /* ACE_WIN32 || ACE_HAS_WINCE */