Update of /cvsroot/boost/boost/boost/asio/detail
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv6947/detail
Modified Files:
socket_ops.hpp socket_types.hpp
Log Message:
Allow everything to compile on platforms where IPV6_V6ONLY is not defined
(such as Linux distros with a 2.4 kernel), but make any use of ip::v6_only
fail at runtime.
Index: socket_ops.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/asio/detail/socket_ops.hpp,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- socket_ops.hpp 9 Feb 2007 06:43:00 -0000 1.11
+++ socket_ops.hpp 13 May 2007 08:18:09 -0000 1.12
@@ -319,6 +319,12 @@
inline int setsockopt(socket_type s, int level, int optname,
const void* optval, size_t optlen, boost::system::error_code& ec)
{
+ if (level == custom_socket_option_level && optname == always_fail_option)
+ {
+ ec = boost::asio::error::invalid_argument;
+ return -1;
+ }
+
clear_error(ec);
#if defined(BOOST_WINDOWS) || defined(__CYGWIN__)
return error_wrapper(::setsockopt(s, level, optname,
@@ -332,6 +338,12 @@
inline int getsockopt(socket_type s, int level, int optname, void* optval,
size_t* optlen, boost::system::error_code& ec)
{
+ if (level == custom_socket_option_level && optname == always_fail_option)
+ {
+ ec = boost::asio::error::invalid_argument;
+ return -1;
+ }
+
clear_error(ec);
#if defined(BOOST_WINDOWS) || defined(__CYGWIN__)
int tmp_optlen = static_cast<int>(*optlen);
Index: socket_types.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/asio/detail/socket_types.hpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- socket_types.hpp 20 Feb 2007 13:19:53 -0000 1.7
+++ socket_types.hpp 13 May 2007 08:18:09 -0000 1.8
@@ -170,6 +170,7 @@
#endif
const int custom_socket_option_level = 0xA5100000;
const int enable_connection_aborted_option = 1;
+const int always_fail_option = 2;
} // namespace detail
} // namespace asio
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Boost-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/boost-cvs