|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r58705 - trunk/boost/asio/detail
From: chris_at_[hidden]
Date: 2010-01-05 07:50:40
Author: chris_kohlhoff
Date: 2010-01-05 07:50:39 EST (Tue, 05 Jan 2010)
New Revision: 58705
URL: http://svn.boost.org/trac/boost/changeset/58705
Log:
Use sockatmark if SIOCATMARK is not defined. Refs #3743.
Text files modified:
trunk/boost/asio/detail/reactive_socket_service.hpp | 13 +++++++++++--
1 files changed, 11 insertions(+), 2 deletions(-)
Modified: trunk/boost/asio/detail/reactive_socket_service.hpp
==============================================================================
--- trunk/boost/asio/detail/reactive_socket_service.hpp (original)
+++ trunk/boost/asio/detail/reactive_socket_service.hpp 2010-01-05 07:50:39 EST (Tue, 05 Jan 2010)
@@ -275,12 +275,21 @@
return false;
}
+#if defined(SIOCATMARK)
boost::asio::detail::ioctl_arg_type value = 0;
socket_ops::ioctl(impl.socket_, SIOCATMARK, &value, ec);
-#if defined(ENOTTY)
+# if defined(ENOTTY)
if (ec.value() == ENOTTY)
ec = boost::asio::error::not_socket;
-#endif // defined(ENOTTY)
+# endif // defined(ENOTTY)
+#else // defined(SIOCATMARK)
+ int value = sockatmark(impl.socket_);
+ if (value == -1)
+ ec = boost::system::error_code(errno,
+ boost::asio::error::get_system_category());
+ else
+ ec = boost::system::error_code();
+#endif // defined(SIOCATMARK)
return ec ? false : value != 0;
}
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