Boost logo

Boost-Commit :

From: chris_at_[hidden]
Date: 2008-05-02 04:38:15


Author: chris_kohlhoff
Date: 2008-05-02 04:38:15 EDT (Fri, 02 May 2008)
New Revision: 45010
URL: http://svn.boost.org/trac/boost/changeset/45010

Log:
Don't use the names readv and writev for functions defined inside asio as
these names seem to be macros on Tru64.

Text files modified:
   trunk/boost/asio/detail/descriptor_ops.hpp | 5 +++--
   trunk/boost/asio/detail/reactive_descriptor_service.hpp | 10 ++++++----
   2 files changed, 9 insertions(+), 6 deletions(-)

Modified: trunk/boost/asio/detail/descriptor_ops.hpp
==============================================================================
--- trunk/boost/asio/detail/descriptor_ops.hpp (original)
+++ trunk/boost/asio/detail/descriptor_ops.hpp 2008-05-02 04:38:15 EDT (Fri, 02 May 2008)
@@ -67,13 +67,14 @@
   b.iov_len = size;
 }
 
-inline int readv(int d, buf* bufs, size_t count, boost::system::error_code& ec)
+inline int scatter_read(int d, buf* bufs, size_t count,
+ boost::system::error_code& ec)
 {
   clear_error(ec);
   return error_wrapper(::readv(d, bufs, static_cast<int>(count)), ec);
 }
 
-inline int writev(int d, const buf* bufs, size_t count,
+inline int gather_write(int d, const buf* bufs, size_t count,
     boost::system::error_code& ec)
 {
   clear_error(ec);

Modified: trunk/boost/asio/detail/reactive_descriptor_service.hpp
==============================================================================
--- trunk/boost/asio/detail/reactive_descriptor_service.hpp (original)
+++ trunk/boost/asio/detail/reactive_descriptor_service.hpp 2008-05-02 04:38:15 EDT (Fri, 02 May 2008)
@@ -273,7 +273,8 @@
     for (;;)
     {
       // Try to complete the operation without blocking.
- int bytes_sent = descriptor_ops::writev(impl.descriptor_, bufs, i, ec);
+ int bytes_sent = descriptor_ops::gather_write(
+ impl.descriptor_, bufs, i, ec);
 
       // Check if operation succeeded.
       if (bytes_sent >= 0)
@@ -345,7 +346,7 @@
 
       // Write the data.
       boost::system::error_code ec;
- int bytes = descriptor_ops::writev(descriptor_, bufs, i, ec);
+ int bytes = descriptor_ops::gather_write(descriptor_, bufs, i, ec);
 
       // Check if we need to run the operation again.
       if (ec == boost::asio::error::would_block
@@ -503,7 +504,8 @@
     for (;;)
     {
       // Try to complete the operation without blocking.
- int bytes_read = descriptor_ops::readv(impl.descriptor_, bufs, i, ec);
+ int bytes_read = descriptor_ops::scatter_read(
+ impl.descriptor_, bufs, i, ec);
 
       // Check if operation succeeded.
       if (bytes_read > 0)
@@ -582,7 +584,7 @@
 
       // Read some data.
       boost::system::error_code ec;
- int bytes = descriptor_ops::readv(descriptor_, bufs, i, ec);
+ int bytes = descriptor_ops::scatter_read(descriptor_, bufs, i, ec);
       if (bytes == 0)
         ec = boost::asio::error::eof;
 


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