Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r52459 - in branches/release: . boost/asio/detail
From: chris_at_[hidden]
Date: 2009-04-17 18:32:21


Author: chris_kohlhoff
Date: 2009-04-17 18:32:20 EDT (Fri, 17 Apr 2009)
New Revision: 52459
URL: http://svn.boost.org/trac/boost/changeset/52459

Log:
Merged revisions 52412,52419 via svnmerge from trunk.

........
  r52412 | chris_kohlhoff | 2009-04-16 13:27:58 +1000 (Thu, 16 Apr 2009) | 3 lines
  
  Fix incompatibility between asio and ncurses.h due to the latter defining
  a macro called "timeout". Fixes #2156.
........
  r52419 | chris_kohlhoff | 2009-04-16 22:31:27 +1000 (Thu, 16 Apr 2009) | 4 lines
  
  Specifically handle the case when an overlapped ReadFile call fails with
  ERROR_MORE_DATA. This enables a hack where a windows::stream_handle can be
  used with a message-oriented named pipe.
........

Properties modified:
   branches/release/ (props changed)
Text files modified:
   branches/release/boost/asio/detail/socket_option.hpp | 6 +++---
   branches/release/boost/asio/detail/win_iocp_handle_service.hpp | 4 ++--
   2 files changed, 5 insertions(+), 5 deletions(-)

Modified: branches/release/boost/asio/detail/socket_option.hpp
==============================================================================
--- branches/release/boost/asio/detail/socket_option.hpp (original)
+++ branches/release/boost/asio/detail/socket_option.hpp 2009-04-17 18:32:20 EDT (Fri, 17 Apr 2009)
@@ -223,7 +223,7 @@
   linger(bool e, int t)
   {
     enabled(e);
- timeout(t);
+ timeout BOOST_PREVENT_MACRO_SUBSTITUTION(t);
   }
 
   // Set the value for whether linger is enabled.
@@ -239,7 +239,7 @@
   }
 
   // Set the value for the linger timeout.
- void timeout(int value)
+ void timeout BOOST_PREVENT_MACRO_SUBSTITUTION(int value)
   {
 #if defined(WIN32)
     value_.l_linger = static_cast<u_short>(value);
@@ -249,7 +249,7 @@
   }
 
   // Get the value for the linger timeout.
- int timeout() const
+ int timeout BOOST_PREVENT_MACRO_SUBSTITUTION() const
   {
     return static_cast<int>(value_.l_linger);
   }

Modified: branches/release/boost/asio/detail/win_iocp_handle_service.hpp
==============================================================================
--- branches/release/boost/asio/detail/win_iocp_handle_service.hpp (original)
+++ branches/release/boost/asio/detail/win_iocp_handle_service.hpp 2009-04-17 18:32:20 EDT (Fri, 17 Apr 2009)
@@ -573,7 +573,7 @@
     if (!ok)
     {
       DWORD last_error = ::GetLastError();
- if (last_error != ERROR_IO_PENDING)
+ if (last_error != ERROR_IO_PENDING && last_error != ERROR_MORE_DATA)
       {
         if (last_error == ERROR_HANDLE_EOF)
         {
@@ -763,7 +763,7 @@
         static_cast<DWORD>(boost::asio::buffer_size(buffer)),
         &bytes_transferred, ptr.get());
     DWORD last_error = ::GetLastError();
- if (!ok && last_error != ERROR_IO_PENDING)
+ if (!ok && last_error != ERROR_IO_PENDING && last_error != ERROR_MORE_DATA)
     {
       boost::asio::io_service::work work(this->get_io_service());
       ptr.reset();


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk