|
Boost-Commit : |
From: chris_at_[hidden]
Date: 2008-02-21 01:54:08
Author: chris_kohlhoff
Date: 2008-02-21 01:54:04 EST (Thu, 21 Feb 2008)
New Revision: 43342
URL: http://svn.boost.org/trac/boost/changeset/43342
Log:
Merged in fixes from trunk.
........
r42119 | chris_kohlhoff | 2007-12-18 00:04:30 +1100 (Tue, 18 Dec 2007) | 2 lines
Fixes for older HP-UX.
........
r42121 | chris_kohlhoff | 2007-12-18 00:17:46 +1100 (Tue, 18 Dec 2007) | 2 lines
Documentation fixes.
........
r42750 | chris_kohlhoff | 2008-01-15 00:13:35 +1100 (Tue, 15 Jan 2008) | 2 lines
Fix concept name in comment.
........
r42752 | chris_kohlhoff | 2008-01-15 00:20:06 +1100 (Tue, 15 Jan 2008) | 2 lines
Add missing broken pipe error.
........
r42753 | chris_kohlhoff | 2008-01-15 00:21:37 +1100 (Tue, 15 Jan 2008) | 3 lines
Don't include sys/time.h when compiling with aCC, as that header does not
supply pselect(), which is needed for HP-UX/aCC to work correctly.
........
r42754 | chris_kohlhoff | 2008-01-15 00:22:21 +1100 (Tue, 15 Jan 2008) | 2 lines
Disable noisy and incorrect /Wp64 warnings generated by MSVC.
........
r42755 | chris_kohlhoff | 2008-01-15 00:24:28 +1100 (Tue, 15 Jan 2008) | 3 lines
Don't call epoll_wait/kevent if there are no old operations (where old means
added prior to the last epoll_wait/kevent call) needing to be demultiplexed.
........
r42756 | chris_kohlhoff | 2008-01-15 00:25:24 +1100 (Tue, 15 Jan 2008) | 2 lines
Silence some integer truncation warnings.
........
r42758 | chris_kohlhoff | 2008-01-15 00:27:52 +1100 (Tue, 15 Jan 2008) | 8 lines
Silence some integer truncation warnings.
Only perform the windows-bug workaround where we use a short timeout with
GetQueuedCompletionStatus from one thread, i.e. the timer thread.
Keep track of the number of OVERLAPPED-derived operations to ensure that
they all get cleaned up when the io_service is destroyed.
........
r42759 | chris_kohlhoff | 2008-01-15 00:29:08 +1100 (Tue, 15 Jan 2008) | 5 lines
Check for truncation when converting buffer size from size_t to openssl's
int argument.
Try to fix possible thread-safety issues in SSL wrapper.
........
r42817 | chris_kohlhoff | 2008-01-17 00:46:01 +1100 (Thu, 17 Jan 2008) | 2 lines
Set the openssl callback function for getting a thread ID.
........
r43054 | chris_kohlhoff | 2008-02-02 22:37:45 +1100 (Sat, 02 Feb 2008) | 4 lines
Ensure that the workaround for the MSVC secure iterator problem is only
used when compiling with MSVC. The workaround causes g++'s library debug
mode to report errors due to the assignment from a singular iterator.
........
r43055 | chris_kohlhoff | 2008-02-02 22:39:17 +1100 (Sat, 02 Feb 2008) | 2 lines
Fix "possible loss of data" warning when building for Windows 2000 targets.
........
r43056 | chris_kohlhoff | 2008-02-02 23:02:23 +1100 (Sat, 02 Feb 2008) | 3 lines
The latest Windows SDKs don't support IPv6 when building for Windows 2000,
so we need to use the SDK emulation in that case.
........
r43221 | chris_kohlhoff | 2008-02-12 00:59:44 +1100 (Tue, 12 Feb 2008) | 2 lines
Need to define _XOPEN_SOURCE_EXTENDED when compiling for HP-UX.
........
r43301 | chris_kohlhoff | 2008-02-19 00:31:26 +1100 (Tue, 19 Feb 2008) | 2 lines
Fix printing of error messages.
........
r43302 | chris_kohlhoff | 2008-02-19 00:33:23 +1100 (Tue, 19 Feb 2008) | 2 lines
Only define _XOPEN_SOURCE_EXTENDED when building with gcc on HP-UX.
........
r43303 | chris_kohlhoff | 2008-02-19 00:35:15 +1100 (Tue, 19 Feb 2008) | 3 lines
Add missing #include of socket_types.hpp needed for the SSL unit tests
to compile successfully on Windows.
........
Removed:
branches/release/boost/asio/detail/win_iocp_operation.hpp
Properties modified:
branches/release/ (props changed)
Text files modified:
branches/release/boost/asio/buffer.hpp | 5 +
branches/release/boost/asio/detail/epoll_reactor.hpp | 14 ++++
branches/release/boost/asio/detail/kqueue_reactor.hpp | 14 ++++
branches/release/boost/asio/detail/old_win_sdk_compat.hpp | 16 +++++
branches/release/boost/asio/detail/push_options.hpp | 6 ++
branches/release/boost/asio/detail/socket_ops.hpp | 9 ++-
branches/release/boost/asio/detail/socket_types.hpp | 15 +++++
branches/release/boost/asio/detail/win_iocp_io_service.hpp | 104 ++++++++++++++++++++++++++++++++-------
branches/release/boost/asio/detail/win_iocp_socket_service.hpp | 49 +++++++++---------
branches/release/boost/asio/error.hpp | 5 +
branches/release/boost/asio/ssl/detail/openssl_init.hpp | 16 ++++++
branches/release/boost/asio/ssl/detail/openssl_operation.hpp | 43 ++++++++++-----
branches/release/boost/asio/ssl/detail/openssl_stream_service.hpp | 53 +++++++++++++++-----
branches/release/boost/asio/ssl/detail/openssl_types.hpp | 2
branches/release/boost/asio/ssl/stream.hpp | 7 +-
branches/release/libs/asio/doc/reference.qbk | 4
branches/release/libs/asio/example/allocation/Jamfile.v2 | 1
branches/release/libs/asio/example/buffers/Jamfile.v2 | 1
branches/release/libs/asio/example/buffers/reference_counted.cpp | 2
branches/release/libs/asio/example/chat/Jamfile.v2 | 1
branches/release/libs/asio/example/echo/Jamfile.v2 | 1
branches/release/libs/asio/example/http/client/Jamfile.v2 | 1
branches/release/libs/asio/example/http/client/async_client.cpp | 4
branches/release/libs/asio/example/http/server/Jamfile.v2 | 1
branches/release/libs/asio/example/http/server2/Jamfile.v2 | 1
branches/release/libs/asio/example/http/server3/Jamfile.v2 | 1
branches/release/libs/asio/example/invocation/Jamfile.v2 | 1
branches/release/libs/asio/example/iostreams/Jamfile.v2 | 1
branches/release/libs/asio/example/multicast/Jamfile.v2 | 1
branches/release/libs/asio/example/serialization/Jamfile.v2 | 1
branches/release/libs/asio/example/services/Jamfile.v2 | 1
branches/release/libs/asio/example/socks4/Jamfile.v2 | 1
branches/release/libs/asio/example/ssl/Jamfile.v2 | 1
branches/release/libs/asio/example/timeouts/Jamfile.v2 | 1
branches/release/libs/asio/example/timers/Jamfile.v2 | 1
branches/release/libs/asio/example/tutorial/Jamfile.v2 | 1
branches/release/libs/asio/test/Jamfile.v2 | 1
branches/release/libs/asio/test/ssl/Jamfile.v2 | 1
38 files changed, 297 insertions(+), 91 deletions(-)
Modified: branches/release/boost/asio/buffer.hpp
==============================================================================
--- branches/release/boost/asio/buffer.hpp (original)
+++ branches/release/boost/asio/buffer.hpp 2008-02-21 01:54:04 EST (Thu, 21 Feb 2008)
@@ -393,7 +393,12 @@
~buffer_debug_check()
{
+#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400)
+ // MSVC's string iterator checking may crash in a std::string::iterator
+ // object's destructor when the iterator points to an already-destroyed
+ // std::string object, unless the iterator is cleared first.
iter_ = Iterator();
+#endif // BOOST_WORKAROUND(BOOST_MSVC, >= 1400)
}
void operator()()
Modified: branches/release/boost/asio/detail/epoll_reactor.hpp
==============================================================================
--- branches/release/boost/asio/detail/epoll_reactor.hpp (original)
+++ branches/release/boost/asio/detail/epoll_reactor.hpp 2008-02-21 01:54:04 EST (Thu, 21 Feb 2008)
@@ -67,7 +67,8 @@
pending_cancellations_(),
stop_thread_(false),
thread_(0),
- shutdown_(false)
+ shutdown_(false),
+ need_epoll_wait_(true)
{
// Start the reactor's internal thread only if needed.
if (Own_Thread)
@@ -388,7 +389,9 @@
// Block on the epoll descriptor.
epoll_event events[128];
- int num_events = epoll_wait(epoll_fd_, events, 128, timeout);
+ int num_events = (block || need_epoll_wait_)
+ ? epoll_wait(epoll_fd_, events, 128, timeout)
+ : 0;
lock.lock();
wait_in_progress_ = false;
@@ -479,6 +482,10 @@
cancel_ops_unlocked(pending_cancellations_[i]);
pending_cancellations_.clear();
+ // Determine whether epoll_wait should be called when the reactor next runs.
+ need_epoll_wait_ = !read_op_queue_.empty()
+ || !write_op_queue_.empty() || !except_op_queue_.empty();
+
cleanup_operations_and_timers(lock);
}
@@ -633,6 +640,9 @@
// Whether the service has been shut down.
bool shutdown_;
+
+ // Whether we need to call epoll_wait the next time the reactor is run.
+ bool need_epoll_wait_;
};
} // namespace detail
Modified: branches/release/boost/asio/detail/kqueue_reactor.hpp
==============================================================================
--- branches/release/boost/asio/detail/kqueue_reactor.hpp (original)
+++ branches/release/boost/asio/detail/kqueue_reactor.hpp 2008-02-21 01:54:04 EST (Thu, 21 Feb 2008)
@@ -75,7 +75,8 @@
pending_cancellations_(),
stop_thread_(false),
thread_(0),
- shutdown_(false)
+ shutdown_(false),
+ need_kqueue_wait_(true)
{
// Start the reactor's internal thread only if needed.
if (Own_Thread)
@@ -374,7 +375,9 @@
// Block on the kqueue descriptor.
struct kevent events[128];
- int num_events = kevent(kqueue_fd_, 0, 0, events, 128, timeout);
+ int num_events = (block || need_kqueue_wait_)
+ ? kevent(kqueue_fd_, 0, 0, events, 128, timeout)
+ : 0;
lock.lock();
wait_in_progress_ = false;
@@ -479,6 +482,10 @@
cancel_ops_unlocked(pending_cancellations_[i]);
pending_cancellations_.clear();
+ // Determine whether kqueue needs to be called next time the reactor is run.
+ need_kqueue_wait_ = !read_op_queue_.empty()
+ || !write_op_queue_.empty() || !except_op_queue_.empty();
+
cleanup_operations_and_timers(lock);
}
@@ -631,6 +638,9 @@
// Whether the service has been shut down.
bool shutdown_;
+
+ // Whether we need to call kqueue the next time the reactor is run.
+ bool need_kqueue_wait_;
};
} // namespace detail
Modified: branches/release/boost/asio/detail/old_win_sdk_compat.hpp
==============================================================================
--- branches/release/boost/asio/detail/old_win_sdk_compat.hpp (original)
+++ branches/release/boost/asio/detail/old_win_sdk_compat.hpp 2008-02-21 01:54:04 EST (Thu, 21 Feb 2008)
@@ -31,6 +31,10 @@
#if defined(BOOST_ASIO_HAS_OLD_WIN_SDK)
// Emulation of types that are missing from old Platform SDKs.
+//
+// N.B. this emulation is also used if building for a Windows 2000 target with
+// a recent (i.e. Vista or later) SDK, as the SDK does not provide IPv6 support
+// in that case.
namespace boost {
namespace asio {
@@ -55,9 +59,19 @@
struct in6_addr_emulation
{
- u_char s6_addr[16];
+ union
+ {
+ u_char Byte[16];
+ u_short Word[8];
+ } u;
};
+#if !defined(s6_addr)
+# define _S6_un u
+# define _S6_u8 Byte
+# define s6_addr _S6_un._S6_u8
+#endif // !defined(s6_addr)
+
struct sockaddr_in6_emulation
{
short sin6_family;
Modified: branches/release/boost/asio/detail/push_options.hpp
==============================================================================
--- branches/release/boost/asio/detail/push_options.hpp (original)
+++ branches/release/boost/asio/detail/push_options.hpp 2008-02-21 01:54:04 EST (Thu, 21 Feb 2008)
@@ -90,6 +90,12 @@
# pragma warning (disable:4244)
# pragma warning (disable:4355)
# pragma warning (disable:4675)
+# if defined(_M_IX86) && defined(_Wp64)
+// The /Wp64 option is broken. If you want to check 64 bit portability, use a
+// 64 bit compiler!
+# pragma warning (disable:4311)
+# pragma warning (disable:4312)
+# endif // defined(_M_IX86) && defined(_Wp64)
# pragma pack (push, 8)
// Note that if the /Og optimisation flag is enabled with MSVC6, the compiler
// has a tendency to incorrectly optimise away some calls to member template
Modified: branches/release/boost/asio/detail/socket_ops.hpp
==============================================================================
--- branches/release/boost/asio/detail/socket_ops.hpp (original)
+++ branches/release/boost/asio/detail/socket_ops.hpp 2008-02-21 01:54:04 EST (Thu, 21 Feb 2008)
@@ -1812,19 +1812,22 @@
# if defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0501) || defined(UNDER_CE)
// Building for Windows XP, Windows Server 2003, or later.
clear_error(ec);
- int error = ::getnameinfo(addr, addrlen, host, static_cast<DWORD>(hostlen),
+ int error = ::getnameinfo(addr, static_cast<socklen_t>(addrlen),
+ host, static_cast<DWORD>(hostlen),
serv, static_cast<DWORD>(servlen), flags);
return ec = translate_addrinfo_error(error);
# else
// Building for Windows 2000 or earlier.
typedef int (WSAAPI *gni_t)(const socket_addr_type*,
- int, char*, std::size_t, char*, std::size_t, int);
+ int, char*, DWORD, char*, DWORD, int);
if (HMODULE winsock_module = ::GetModuleHandleA("ws2_32"))
{
if (gni_t gni = (gni_t)::GetProcAddress(winsock_module, "getnameinfo"))
{
clear_error(ec);
- int error = gni(addr, addrlen, host, hostlen, serv, servlen, flags);
+ int error = gni(addr, static_cast<int>(addrlen),
+ host, static_cast<DWORD>(hostlen),
+ serv, static_cast<DWORD>(servlen), flags);
return ec = translate_addrinfo_error(error);
}
}
Modified: branches/release/boost/asio/detail/socket_types.hpp
==============================================================================
--- branches/release/boost/asio/detail/socket_types.hpp (original)
+++ branches/release/boost/asio/detail/socket_types.hpp 2008-02-21 01:54:04 EST (Thu, 21 Feb 2008)
@@ -92,7 +92,11 @@
# include <sys/ioctl.h>
# include <sys/poll.h>
# include <sys/types.h>
-# include <sys/select.h>
+# if defined(__hpux) && !defined(__HP_aCC)
+# include <sys/time.h>
+# else
+# include <sys/select.h>
+# endif
# include <sys/socket.h>
# include <sys/uio.h>
# include <netinet/in.h>
@@ -157,7 +161,16 @@
const int max_addr_v6_str_len = INET6_ADDRSTRLEN + 1 + IF_NAMESIZE;
typedef sockaddr socket_addr_type;
typedef in_addr in4_addr_type;
+# if defined(__hpux)
+// HP-UX doesn't provide ip_mreq when _XOPEN_SOURCE_EXTENDED is defined.
+struct in4_mreq_type
+{
+ struct in_addr imr_multiaddr;
+ struct in_addr imr_interface;
+};
+# else
typedef ip_mreq in4_mreq_type;
+# endif
typedef sockaddr_in sockaddr_in4_type;
typedef in6_addr in6_addr_type;
typedef ipv6_mreq in6_mreq_type;
Modified: branches/release/boost/asio/detail/win_iocp_io_service.hpp
==============================================================================
--- branches/release/boost/asio/detail/win_iocp_io_service.hpp (original)
+++ branches/release/boost/asio/detail/win_iocp_io_service.hpp 2008-02-21 01:54:04 EST (Thu, 21 Feb 2008)
@@ -34,7 +34,6 @@
#include <boost/asio/detail/service_base.hpp>
#include <boost/asio/detail/socket_types.hpp>
#include <boost/asio/detail/timer_queue.hpp>
-#include <boost/asio/detail/win_iocp_operation.hpp>
#include <boost/asio/detail/mutex.hpp>
namespace boost {
@@ -45,14 +44,64 @@
: public boost::asio::detail::service_base<win_iocp_io_service>
{
public:
- // Base class for all operations.
- typedef win_iocp_operation operation;
+ // Base class for all operations. A function pointer is used instead of
+ // virtual functions to avoid the associated overhead.
+ //
+ // This class inherits from OVERLAPPED so that we can downcast to get back to
+ // the operation pointer from the LPOVERLAPPED out parameter of
+ // GetQueuedCompletionStatus.
+ class operation
+ : public OVERLAPPED
+ {
+ public:
+ typedef void (*invoke_func_type)(operation*, DWORD, size_t);
+ typedef void (*destroy_func_type)(operation*);
+
+ operation(win_iocp_io_service& iocp_service,
+ invoke_func_type invoke_func, destroy_func_type destroy_func)
+ : outstanding_operations_(&iocp_service.outstanding_operations_),
+ invoke_func_(invoke_func),
+ destroy_func_(destroy_func)
+ {
+ Internal = 0;
+ InternalHigh = 0;
+ Offset = 0;
+ OffsetHigh = 0;
+ hEvent = 0;
+
+ ::InterlockedIncrement(outstanding_operations_);
+ }
+
+ void do_completion(DWORD last_error, size_t bytes_transferred)
+ {
+ invoke_func_(this, last_error, bytes_transferred);
+ }
+
+ void destroy()
+ {
+ destroy_func_(this);
+ }
+
+ protected:
+ // Prevent deletion through this type.
+ ~operation()
+ {
+ ::InterlockedDecrement(outstanding_operations_);
+ }
+
+ private:
+ long* outstanding_operations_;
+ invoke_func_type invoke_func_;
+ destroy_func_type destroy_func_;
+ };
+
// Constructor.
win_iocp_io_service(boost::asio::io_service& io_service)
: boost::asio::detail::service_base<win_iocp_io_service>(io_service),
iocp_(),
outstanding_work_(0),
+ outstanding_operations_(0),
stopped_(0),
shutdown_(0),
timer_thread_(0),
@@ -80,7 +129,7 @@
{
::InterlockedExchange(&shutdown_, 1);
- for (;;)
+ while (::InterlockedExchangeAdd(&outstanding_operations_, 0) > 0)
{
DWORD bytes_transferred = 0;
#if (WINVER < 0x0500)
@@ -89,12 +138,8 @@
DWORD_PTR completion_key = 0;
#endif
LPOVERLAPPED overlapped = 0;
- ::SetLastError(0);
- BOOL ok = ::GetQueuedCompletionStatus(iocp_.handle,
- &bytes_transferred, &completion_key, &overlapped, 0);
- DWORD last_error = ::GetLastError();
- if (!ok && overlapped == 0 && last_error == WAIT_TIMEOUT)
- break;
+ ::GetQueuedCompletionStatus(iocp_.handle, &bytes_transferred,
+ &completion_key, &overlapped, INFINITE);
if (overlapped)
static_cast<operation*>(overlapped)->destroy();
}
@@ -250,7 +295,7 @@
}
// Request invocation of the given OVERLAPPED-derived operation.
- void post_completion(win_iocp_operation* op, DWORD op_last_error,
+ void post_completion(operation* op, DWORD op_last_error,
DWORD bytes_transferred)
{
// Enqueue the operation on the I/O completion port.
@@ -348,7 +393,7 @@
&timer_thread_, this_thread_id, 0) == 0);
// Calculate timeout for GetQueuedCompletionStatus call.
- DWORD timeout = max_timeout;
+ DWORD timeout = INFINITE;
if (dispatching_timers)
{
boost::asio::detail::mutex::scoped_lock lock(timer_mutex_);
@@ -372,13 +417,28 @@
// Dispatch any pending timers.
if (dispatching_timers)
{
- boost::asio::detail::mutex::scoped_lock lock(timer_mutex_);
- timer_queues_copy_ = timer_queues_;
- for (std::size_t i = 0; i < timer_queues_.size(); ++i)
+ try
{
- timer_queues_[i]->dispatch_timers();
- timer_queues_[i]->dispatch_cancellations();
- timer_queues_[i]->cleanup_timers();
+ boost::asio::detail::mutex::scoped_lock lock(timer_mutex_);
+ timer_queues_copy_ = timer_queues_;
+ for (std::size_t i = 0; i < timer_queues_.size(); ++i)
+ {
+ timer_queues_[i]->dispatch_timers();
+ timer_queues_[i]->dispatch_cancellations();
+ timer_queues_[i]->cleanup_timers();
+ }
+ }
+ catch (...)
+ {
+ // Transfer responsibility for dispatching timers to another thread.
+ if (::InterlockedCompareExchange(&timer_thread_,
+ 0, this_thread_id) == this_thread_id)
+ {
+ ::PostQueuedCompletionStatus(iocp_.handle,
+ 0, transfer_timer_dispatching, 0);
+ }
+
+ throw;
}
}
@@ -533,7 +593,7 @@
{
handler_operation(win_iocp_io_service& io_service,
Handler handler)
- : operation(&handler_operation<Handler>::do_completion_impl,
+ : operation(io_service, &handler_operation<Handler>::do_completion_impl,
&handler_operation<Handler>::destroy_impl),
io_service_(io_service),
handler_(handler)
@@ -594,6 +654,10 @@
// The count of unfinished work.
long outstanding_work_;
+ // The count of unfinished operations.
+ long outstanding_operations_;
+ friend class operation;
+
// Flag to indicate whether the event loop has been stopped.
long stopped_;
@@ -603,7 +667,7 @@
enum
{
// Maximum GetQueuedCompletionStatus timeout, in milliseconds.
- max_timeout = 1000,
+ max_timeout = 500,
// Completion key value to indicate that responsibility for dispatching
// timers is being cooperatively transferred from one thread to another.
Deleted: branches/release/boost/asio/detail/win_iocp_operation.hpp
==============================================================================
--- branches/release/boost/asio/detail/win_iocp_operation.hpp 2008-02-21 01:54:04 EST (Thu, 21 Feb 2008)
+++ (empty file)
@@ -1,83 +0,0 @@
-//
-// win_iocp_operation.hpp
-// ~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com)
-//
-// Distributed under the Boost Software License, Version 1.0. (See accompanying
-// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-//
-
-#ifndef BOOST_ASIO_DETAIL_WIN_IOCP_OPERATION_HPP
-#define BOOST_ASIO_DETAIL_WIN_IOCP_OPERATION_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include <boost/asio/detail/push_options.hpp>
-
-#include <boost/asio/detail/win_iocp_io_service_fwd.hpp>
-
-#if defined(BOOST_ASIO_HAS_IOCP)
-
-#include <boost/asio/detail/socket_types.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-// Base class for all IOCP operations. A function pointer is used instead of
-// virtual functions to avoid the associated overhead.
-//
-// This class inherits from OVERLAPPED so that we can downcast to get back to
-// the win_iocp_operation pointer from the LPOVERLAPPED out parameter of
-// GetQueuedCompletionStatus.
-struct win_iocp_operation
- : public OVERLAPPED
-{
- typedef void (*invoke_func_type)(win_iocp_operation*, DWORD, size_t);
- typedef void (*destroy_func_type)(win_iocp_operation*);
-
- win_iocp_operation(invoke_func_type invoke_func,
- destroy_func_type destroy_func)
- : invoke_func_(invoke_func),
- destroy_func_(destroy_func)
- {
- Internal = 0;
- InternalHigh = 0;
- Offset = 0;
- OffsetHigh = 0;
- hEvent = 0;
- }
-
- void do_completion(DWORD last_error, size_t bytes_transferred)
- {
- invoke_func_(this, last_error, bytes_transferred);
- }
-
- void destroy()
- {
- destroy_func_(this);
- }
-
-protected:
- // Prevent deletion through this type.
- ~win_iocp_operation()
- {
- }
-
-private:
- invoke_func_type invoke_func_;
- destroy_func_type destroy_func_;
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#endif // defined(BOOST_ASIO_HAS_IOCP)
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_DETAIL_WIN_IOCP_OPERATION_HPP
Modified: branches/release/boost/asio/detail/win_iocp_socket_service.hpp
==============================================================================
--- branches/release/boost/asio/detail/win_iocp_socket_service.hpp (original)
+++ branches/release/boost/asio/detail/win_iocp_socket_service.hpp 2008-02-21 01:54:04 EST (Thu, 21 Feb 2008)
@@ -57,7 +57,7 @@
typedef typename Protocol::endpoint endpoint_type;
// Base class for all operations.
- typedef win_iocp_operation operation;
+ typedef win_iocp_io_service::operation operation;
struct noop_deleter { void operator()(void*) {} };
typedef boost::shared_ptr<void> shared_cancel_token_type;
@@ -681,13 +681,13 @@
: public operation
{
public:
- send_operation(boost::asio::io_service& io_service,
+ send_operation(win_iocp_io_service& io_service,
weak_cancel_token_type cancel_token,
const ConstBufferSequence& buffers, Handler handler)
- : operation(
+ : operation(io_service,
&send_operation<ConstBufferSequence, Handler>::do_completion_impl,
&send_operation<ConstBufferSequence, Handler>::destroy_impl),
- work_(io_service),
+ work_(io_service.get_io_service()),
cancel_token_(cancel_token),
buffers_(buffers),
handler_(handler)
@@ -783,8 +783,8 @@
typedef send_operation<ConstBufferSequence, Handler> value_type;
typedef handler_alloc_traits<Handler, value_type> alloc_traits;
raw_handler_ptr<alloc_traits> raw_ptr(handler);
- handler_ptr<alloc_traits> ptr(raw_ptr,
- this->get_io_service(), impl.cancel_token_, buffers, handler);
+ handler_ptr<alloc_traits> ptr(raw_ptr, iocp_service_,
+ impl.cancel_token_, buffers, handler);
// Copy buffers into WSABUF array.
::WSABUF bufs[max_buffers];
@@ -861,7 +861,7 @@
// Send the data.
DWORD bytes_transferred = 0;
int result = ::WSASendTo(impl.socket_, bufs, i, &bytes_transferred,
- flags, destination.data(), destination.size(), 0, 0);
+ flags, destination.data(), static_cast<int>(destination.size()), 0, 0);
if (result != 0)
{
DWORD last_error = ::WSAGetLastError();
@@ -881,12 +881,12 @@
: public operation
{
public:
- send_to_operation(boost::asio::io_service& io_service,
+ send_to_operation(win_iocp_io_service& io_service,
const ConstBufferSequence& buffers, Handler handler)
- : operation(
+ : operation(io_service,
&send_to_operation<ConstBufferSequence, Handler>::do_completion_impl,
&send_to_operation<ConstBufferSequence, Handler>::destroy_impl),
- work_(io_service),
+ work_(io_service.get_io_service()),
buffers_(buffers),
handler_(handler)
{
@@ -974,8 +974,7 @@
typedef send_to_operation<ConstBufferSequence, Handler> value_type;
typedef handler_alloc_traits<Handler, value_type> alloc_traits;
raw_handler_ptr<alloc_traits> raw_ptr(handler);
- handler_ptr<alloc_traits> ptr(raw_ptr,
- this->get_io_service(), buffers, handler);
+ handler_ptr<alloc_traits> ptr(raw_ptr, iocp_service_, buffers, handler);
// Copy buffers into WSABUF array.
::WSABUF bufs[max_buffers];
@@ -992,8 +991,8 @@
// Send the data.
DWORD bytes_transferred = 0;
- int result = ::WSASendTo(impl.socket_, bufs, i, &bytes_transferred,
- flags, destination.data(), destination.size(), ptr.get(), 0);
+ int result = ::WSASendTo(impl.socket_, bufs, i, &bytes_transferred, flags,
+ destination.data(), static_cast<int>(destination.size()), ptr.get(), 0);
DWORD last_error = ::WSAGetLastError();
// Check if the operation completed immediately.
@@ -1075,15 +1074,15 @@
: public operation
{
public:
- receive_operation(boost::asio::io_service& io_service,
+ receive_operation(win_iocp_io_service& io_service,
weak_cancel_token_type cancel_token,
const MutableBufferSequence& buffers, Handler handler)
- : operation(
+ : operation(io_service,
&receive_operation<
MutableBufferSequence, Handler>::do_completion_impl,
&receive_operation<
MutableBufferSequence, Handler>::destroy_impl),
- work_(io_service),
+ work_(io_service.get_io_service()),
cancel_token_(cancel_token),
buffers_(buffers),
handler_(handler)
@@ -1186,8 +1185,8 @@
typedef receive_operation<MutableBufferSequence, Handler> value_type;
typedef handler_alloc_traits<Handler, value_type> alloc_traits;
raw_handler_ptr<alloc_traits> raw_ptr(handler);
- handler_ptr<alloc_traits> ptr(raw_ptr,
- this->get_io_service(), impl.cancel_token_, buffers, handler);
+ handler_ptr<alloc_traits> ptr(raw_ptr, iocp_service_,
+ impl.cancel_token_, buffers, handler);
// Copy buffers into WSABUF array.
::WSABUF bufs[max_buffers];
@@ -1291,17 +1290,17 @@
: public operation
{
public:
- receive_from_operation(boost::asio::io_service& io_service,
+ receive_from_operation(win_iocp_io_service& io_service,
endpoint_type& endpoint, const MutableBufferSequence& buffers,
Handler handler)
- : operation(
+ : operation(io_service,
&receive_from_operation<
MutableBufferSequence, Handler>::do_completion_impl,
&receive_from_operation<
MutableBufferSequence, Handler>::destroy_impl),
endpoint_(endpoint),
endpoint_size_(static_cast<int>(endpoint.capacity())),
- work_(io_service),
+ work_(io_service.get_io_service()),
buffers_(buffers),
handler_(handler)
{
@@ -1406,8 +1405,8 @@
typedef receive_from_operation<MutableBufferSequence, Handler> value_type;
typedef handler_alloc_traits<Handler, value_type> alloc_traits;
raw_handler_ptr<alloc_traits> raw_ptr(handler);
- handler_ptr<alloc_traits> ptr(raw_ptr,
- this->get_io_service(), sender_endp, buffers, handler);
+ handler_ptr<alloc_traits> ptr(raw_ptr, iocp_service_,
+ sender_endp, buffers, handler);
// Copy buffers into WSABUF array.
::WSABUF bufs[max_buffers];
@@ -1509,7 +1508,7 @@
socket_type socket, socket_type new_socket, Socket& peer,
const protocol_type& protocol, endpoint_type* peer_endpoint,
bool enable_connection_aborted, Handler handler)
- : operation(
+ : operation(io_service,
&accept_operation<Socket, Handler>::do_completion_impl,
&accept_operation<Socket, Handler>::destroy_impl),
io_service_(io_service),
Modified: branches/release/boost/asio/error.hpp
==============================================================================
--- branches/release/boost/asio/error.hpp (original)
+++ branches/release/boost/asio/error.hpp 2008-02-21 01:54:04 EST (Thu, 21 Feb 2008)
@@ -71,6 +71,11 @@
/// Operation already in progress.
already_started = BOOST_ASIO_SOCKET_ERROR(EALREADY),
+ /// Broken pipe.
+ broken_pipe = BOOST_ASIO_WIN_OR_POSIX(
+ BOOST_ASIO_NATIVE_ERROR(ERROR_BROKEN_PIPE),
+ BOOST_ASIO_NATIVE_ERROR(EPIPE)),
+
/// A connection has been aborted.
connection_aborted = BOOST_ASIO_SOCKET_ERROR(ECONNABORTED),
Modified: branches/release/boost/asio/ssl/detail/openssl_init.hpp
==============================================================================
--- branches/release/boost/asio/ssl/detail/openssl_init.hpp (original)
+++ branches/release/boost/asio/ssl/detail/openssl_init.hpp 2008-02-21 01:54:04 EST (Thu, 21 Feb 2008)
@@ -20,10 +20,12 @@
#include <boost/asio/detail/push_options.hpp>
#include <vector>
+#include <boost/assert.hpp>
#include <boost/shared_ptr.hpp>
#include <boost/asio/detail/pop_options.hpp>
#include <boost/asio/detail/mutex.hpp>
+#include <boost/asio/detail/tss_ptr.hpp>
#include <boost/asio/ssl/detail/openssl_types.hpp>
namespace boost {
@@ -52,6 +54,7 @@
for (size_t i = 0; i < mutexes_.size(); ++i)
mutexes_[i].reset(new boost::asio::detail::mutex);
::CRYPTO_set_locking_callback(&do_init::openssl_locking_func);
+ ::CRYPTO_set_id_callback(&do_init::openssl_id_func);
}
}
@@ -59,6 +62,7 @@
{
if (Do_Init)
{
+ ::CRYPTO_set_id_callback(0);
::CRYPTO_set_locking_callback(0);
::ERR_free_strings();
::ERR_remove_state(0);
@@ -81,6 +85,15 @@
}
private:
+ static unsigned long openssl_id_func()
+ {
+ void* id = instance()->thread_id_;
+ if (id == 0)
+ instance()->thread_id_ = id = &id; // Ugh.
+ BOOST_ASSERT(sizeof(unsigned long) >= sizeof(void*));
+ return reinterpret_cast<unsigned long>(id);
+ }
+
static void openssl_locking_func(int mode, int n,
const char *file, int line)
{
@@ -92,6 +105,9 @@
// Mutexes to be used in locking callbacks.
std::vector<boost::shared_ptr<boost::asio::detail::mutex> > mutexes_;
+
+ // The thread identifiers to be used by openssl.
+ boost::asio::detail::tss_ptr<void> thread_id_;
};
public:
Modified: branches/release/boost/asio/ssl/detail/openssl_operation.hpp
==============================================================================
--- branches/release/boost/asio/ssl/detail/openssl_operation.hpp (original)
+++ branches/release/boost/asio/ssl/detail/openssl_operation.hpp 2008-02-21 01:54:04 EST (Thu, 21 Feb 2008)
@@ -19,6 +19,7 @@
#include <boost/asio/detail/push_options.hpp>
#include <boost/function.hpp>
+#include <boost/assert.hpp>
#include <boost/bind.hpp>
#include <boost/asio/detail/pop_options.hpp>
@@ -88,10 +89,12 @@
net_buffer& recv_buf,
SSL* session,
BIO* ssl_bio,
- user_handler_func handler
+ user_handler_func handler,
+ boost::asio::io_service::strand& strand
)
: primitive_(primitive)
, user_handler_(handler)
+ , strand_(&strand)
, recv_buf_(recv_buf)
, socket_(socket)
, ssl_bio_(ssl_bio)
@@ -118,6 +121,7 @@
SSL* session,
BIO* ssl_bio)
: primitive_(primitive)
+ , strand_(0)
, recv_buf_(recv_buf)
, socket_(socket)
, ssl_bio_(ssl_bio)
@@ -241,6 +245,7 @@
ssl_primitive_func primitive_;
user_handler_func user_handler_;
+ boost::asio::io_service::strand* strand_;
write_func write_;
read_func read_;
int_handler_func handler_;
@@ -304,19 +309,23 @@
{
unsigned char *data_start = send_buf_.get_unused_start();
send_buf_.data_added(len);
-
+
+ BOOST_ASSERT(strand_);
boost::asio::async_write
(
socket_,
boost::asio::buffer(data_start, len),
- boost::bind
+ strand_->wrap
(
- &openssl_operation::async_write_handler,
- this,
- is_operation_done,
- rc,
- boost::asio::placeholders::error,
- boost::asio::placeholders::bytes_transferred
+ boost::bind
+ (
+ &openssl_operation::async_write_handler,
+ this,
+ is_operation_done,
+ rc,
+ boost::asio::placeholders::error,
+ boost::asio::placeholders::bytes_transferred
+ )
)
);
@@ -366,17 +375,21 @@
int do_async_read()
{
// Wait for new data
+ BOOST_ASSERT(strand_);
socket_.async_read_some
(
boost::asio::buffer(recv_buf_.get_unused_start(),
recv_buf_.get_unused_len()),
- boost::bind
+ strand_->wrap
(
- &openssl_operation::async_read_handler,
- this,
- boost::asio::placeholders::error,
- boost::asio::placeholders::bytes_transferred
- )
+ boost::bind
+ (
+ &openssl_operation::async_read_handler,
+ this,
+ boost::asio::placeholders::error,
+ boost::asio::placeholders::bytes_transferred
+ )
+ )
);
return 0;
}
Modified: branches/release/boost/asio/ssl/detail/openssl_stream_service.hpp
==============================================================================
--- branches/release/boost/asio/ssl/detail/openssl_stream_service.hpp (original)
+++ branches/release/boost/asio/ssl/detail/openssl_stream_service.hpp 2008-02-21 01:54:04 EST (Thu, 21 Feb 2008)
@@ -20,6 +20,7 @@
#include <boost/asio/detail/push_options.hpp>
#include <cstddef>
+#include <climits>
#include <boost/config.hpp>
#include <boost/noncopyable.hpp>
#include <boost/function.hpp>
@@ -28,6 +29,7 @@
#include <boost/asio/error.hpp>
#include <boost/asio/io_service.hpp>
+#include <boost/asio/strand.hpp>
#include <boost/asio/detail/service_base.hpp>
#include <boost/asio/ssl/basic_context.hpp>
#include <boost/asio/ssl/stream_base.hpp>
@@ -43,6 +45,8 @@
: public boost::asio::detail::service_base<openssl_stream_service>
{
private:
+ enum { max_buffer_size = INT_MAX };
+
//Base handler for asyncrhonous operations
template <typename Stream>
class base_handler
@@ -161,7 +165,8 @@
// Construct a new stream socket service for the specified io_service.
explicit openssl_stream_service(boost::asio::io_service& io_service)
- : boost::asio::detail::service_base<openssl_stream_service>(io_service)
+ : boost::asio::detail::service_base<openssl_stream_service>(io_service),
+ strand_(io_service)
{
}
@@ -256,11 +261,12 @@
local_handler,
boost::arg<1>(),
boost::arg<2>()
- )
+ ),
+ strand_
);
local_handler->set_operation(op);
- get_io_service().post(boost::bind(&openssl_operation<Stream>::start, op));
+ strand_.post(boost::bind(&openssl_operation<Stream>::start, op));
}
// Shut down SSL on the stream.
@@ -310,11 +316,12 @@
local_handler,
boost::arg<1>(),
boost::arg<2>()
- )
+ ),
+ strand_
);
local_handler->set_operation(op);
- get_io_service().post(boost::bind(&openssl_operation<Stream>::start, op));
+ strand_.post(boost::bind(&openssl_operation<Stream>::start, op));
}
// Write some data to the stream.
@@ -325,10 +332,14 @@
size_t bytes_transferred = 0;
try
{
+ std::size_t buffer_size = boost::asio::buffer_size(*buffers.begin());
+ if (buffer_size > max_buffer_size)
+ buffer_size = max_buffer_size;
+
boost::function<int (SSL*)> send_func =
boost::bind(&::SSL_write, boost::arg<1>(),
boost::asio::buffer_cast<const void*>(*buffers.begin()),
- static_cast<int>(boost::asio::buffer_size(*buffers.begin())));
+ static_cast<int>(buffer_size));
openssl_operation<Stream> op(
send_func,
next_layer,
@@ -357,10 +368,14 @@
send_handler* local_handler = new send_handler(handler, get_io_service());
+ std::size_t buffer_size = boost::asio::buffer_size(*buffers.begin());
+ if (buffer_size > max_buffer_size)
+ buffer_size = max_buffer_size;
+
boost::function<int (SSL*)> send_func =
boost::bind(&::SSL_write, boost::arg<1>(),
boost::asio::buffer_cast<const void*>(*buffers.begin()),
- static_cast<int>(boost::asio::buffer_size(*buffers.begin())));
+ static_cast<int>(buffer_size));
openssl_operation<Stream>* op = new openssl_operation<Stream>
(
@@ -375,11 +390,12 @@
local_handler,
boost::arg<1>(),
boost::arg<2>()
- )
+ ),
+ strand_
);
local_handler->set_operation(op);
- get_io_service().post(boost::bind(&openssl_operation<Stream>::start, op));
+ strand_.post(boost::bind(&openssl_operation<Stream>::start, op));
}
// Read some data from the stream.
@@ -390,10 +406,14 @@
size_t bytes_transferred = 0;
try
{
+ std::size_t buffer_size = boost::asio::buffer_size(*buffers.begin());
+ if (buffer_size > max_buffer_size)
+ buffer_size = max_buffer_size;
+
boost::function<int (SSL*)> recv_func =
boost::bind(&::SSL_read, boost::arg<1>(),
boost::asio::buffer_cast<void*>(*buffers.begin()),
- boost::asio::buffer_size(*buffers.begin()));
+ static_cast<int>(buffer_size));
openssl_operation<Stream> op(recv_func,
next_layer,
impl->recv_buf,
@@ -422,10 +442,14 @@
recv_handler* local_handler = new recv_handler(handler, get_io_service());
+ std::size_t buffer_size = boost::asio::buffer_size(*buffers.begin());
+ if (buffer_size > max_buffer_size)
+ buffer_size = max_buffer_size;
+
boost::function<int (SSL*)> recv_func =
boost::bind(&::SSL_read, boost::arg<1>(),
boost::asio::buffer_cast<void*>(*buffers.begin()),
- boost::asio::buffer_size(*buffers.begin()));
+ static_cast<int>(buffer_size));
openssl_operation<Stream>* op = new openssl_operation<Stream>
(
@@ -440,11 +464,12 @@
local_handler,
boost::arg<1>(),
boost::arg<2>()
- )
+ ),
+ strand_
);
local_handler->set_operation(op);
- get_io_service().post(boost::bind(&openssl_operation<Stream>::start, op));
+ strand_.post(boost::bind(&openssl_operation<Stream>::start, op));
}
// Peek at the incoming data on the stream.
@@ -466,6 +491,8 @@
}
private:
+ boost::asio::io_service::strand strand_;
+
typedef boost::asio::detail::mutex mutex_type;
template<typename Mutex>
Modified: branches/release/boost/asio/ssl/detail/openssl_types.hpp
==============================================================================
--- branches/release/boost/asio/ssl/detail/openssl_types.hpp (original)
+++ branches/release/boost/asio/ssl/detail/openssl_types.hpp 2008-02-21 01:54:04 EST (Thu, 21 Feb 2008)
@@ -17,6 +17,8 @@
#include <boost/asio/detail/push_options.hpp>
+#include <boost/asio/detail/socket_types.hpp>
+
#include <boost/asio/detail/push_options.hpp>
#include <openssl/conf.h>
#include <openssl/ssl.h>
Modified: branches/release/boost/asio/ssl/stream.hpp
==============================================================================
--- branches/release/boost/asio/ssl/stream.hpp (original)
+++ branches/release/boost/asio/ssl/stream.hpp 2008-02-21 01:54:04 EST (Thu, 21 Feb 2008)
@@ -45,16 +45,15 @@
* @e Shared @e objects: Unsafe.
*
* @par Example
- * To use the SSL stream template with a stream_socket, you would write:
+ * To use the SSL stream template with an ip::tcp::socket, you would write:
* @code
* boost::asio::io_service io_service;
* boost::asio::ssl::context context(io_service, boost::asio::ssl::context::sslv23);
- * boost::asio::ssl::stream<boost::asio::stream_socket> sock(io_service, context);
+ * boost::asio::ssl::stream<boost::asio::ip::tcp::socket> sock(io_service, context);
* @endcode
*
* @par Concepts:
- * Async_Object, Async_Read_Stream, Async_Write_Stream, Error_Source, Stream,
- * Sync_Read_Stream, Sync_Write_Stream.
+ * AsyncReadStream, AsyncWriteStream, Stream, SyncRead_Stream, SyncWriteStream.
*/
template <typename Stream, typename Service = stream_service>
class stream
Modified: branches/release/libs/asio/doc/reference.qbk
==============================================================================
--- branches/release/libs/asio/doc/reference.qbk (original)
+++ branches/release/libs/asio/doc/reference.qbk 2008-02-21 01:54:04 EST (Thu, 21 Feb 2008)
@@ -36133,11 +36133,11 @@
[heading Example]
-To use the SSL stream template with a stream\_socket, you would write:
+To use the SSL stream template with an ip::tcp::socket, you would write:
boost::asio::io_service io_service;
boost::asio::ssl::context context(io_service, boost::asio::ssl::context::sslv23);
- boost::asio::ssl::stream<boost::asio::stream_socket> sock(io_service, context);
+ boost::asio::ssl::stream<boost::asio::ip::tcp::socket> sock(io_service, context);
Modified: branches/release/libs/asio/example/allocation/Jamfile.v2
==============================================================================
--- branches/release/libs/asio/example/allocation/Jamfile.v2 (original)
+++ branches/release/libs/asio/example/allocation/Jamfile.v2 2008-02-21 01:54:04 EST (Thu, 21 Feb 2008)
@@ -33,5 +33,6 @@
<os>NT,<toolset>gcc:<library>ws2_32
<os>NT,<toolset>gcc:<library>mswsock
<os>NT,<toolset>gcc-cygwin:<define>__USE_W32_SOCKETS
+ <os>HPUX,<toolset>gcc:<define>_XOPEN_SOURCE_EXTENDED
<os>HPUX:<library>ipv6
;
Modified: branches/release/libs/asio/example/buffers/Jamfile.v2
==============================================================================
--- branches/release/libs/asio/example/buffers/Jamfile.v2 (original)
+++ branches/release/libs/asio/example/buffers/Jamfile.v2 2008-02-21 01:54:04 EST (Thu, 21 Feb 2008)
@@ -33,5 +33,6 @@
<os>NT,<toolset>gcc:<library>ws2_32
<os>NT,<toolset>gcc:<library>mswsock
<os>NT,<toolset>gcc-cygwin:<define>__USE_W32_SOCKETS
+ <os>HPUX,<toolset>gcc:<define>_XOPEN_SOURCE_EXTENDED
<os>HPUX:<library>ipv6
;
Modified: branches/release/libs/asio/example/buffers/reference_counted.cpp
==============================================================================
--- branches/release/libs/asio/example/buffers/reference_counted.cpp (original)
+++ branches/release/libs/asio/example/buffers/reference_counted.cpp 2008-02-21 01:54:04 EST (Thu, 21 Feb 2008)
@@ -27,7 +27,7 @@
{
}
- // Implement the Const_Buffers concept.
+ // Implement the ConstBufferSequence requirements.
typedef boost::asio::const_buffer value_type;
typedef const boost::asio::const_buffer* const_iterator;
const boost::asio::const_buffer* begin() const { return &buffer_; }
Modified: branches/release/libs/asio/example/chat/Jamfile.v2
==============================================================================
--- branches/release/libs/asio/example/chat/Jamfile.v2 (original)
+++ branches/release/libs/asio/example/chat/Jamfile.v2 2008-02-21 01:54:04 EST (Thu, 21 Feb 2008)
@@ -34,6 +34,7 @@
<os>NT,<toolset>gcc:<library>ws2_32
<os>NT,<toolset>gcc:<library>mswsock
<os>NT,<toolset>gcc-cygwin:<define>__USE_W32_SOCKETS
+ <os>HPUX,<toolset>gcc:<define>_XOPEN_SOURCE_EXTENDED
<os>HPUX:<library>ipv6
;
Modified: branches/release/libs/asio/example/echo/Jamfile.v2
==============================================================================
--- branches/release/libs/asio/example/echo/Jamfile.v2 (original)
+++ branches/release/libs/asio/example/echo/Jamfile.v2 2008-02-21 01:54:04 EST (Thu, 21 Feb 2008)
@@ -34,6 +34,7 @@
<os>NT,<toolset>gcc:<library>ws2_32
<os>NT,<toolset>gcc:<library>mswsock
<os>NT,<toolset>gcc-cygwin:<define>__USE_W32_SOCKETS
+ <os>HPUX,<toolset>gcc:<define>_XOPEN_SOURCE_EXTENDED
<os>HPUX:<library>ipv6
;
Modified: branches/release/libs/asio/example/http/client/Jamfile.v2
==============================================================================
--- branches/release/libs/asio/example/http/client/Jamfile.v2 (original)
+++ branches/release/libs/asio/example/http/client/Jamfile.v2 2008-02-21 01:54:04 EST (Thu, 21 Feb 2008)
@@ -33,6 +33,7 @@
<os>NT,<toolset>gcc:<library>ws2_32
<os>NT,<toolset>gcc:<library>mswsock
<os>NT,<toolset>gcc-cygwin:<define>__USE_W32_SOCKETS
+ <os>HPUX,<toolset>gcc:<define>_XOPEN_SOURCE_EXTENDED
<os>HPUX:<library>ipv6
;
Modified: branches/release/libs/asio/example/http/client/async_client.cpp
==============================================================================
--- branches/release/libs/asio/example/http/client/async_client.cpp (original)
+++ branches/release/libs/asio/example/http/client/async_client.cpp 2008-02-21 01:54:04 EST (Thu, 21 Feb 2008)
@@ -83,7 +83,7 @@
}
else
{
- std::cout << "Error: " << err << "\n";
+ std::cout << "Error: " << err.message() << "\n";
}
}
@@ -98,7 +98,7 @@
}
else
{
- std::cout << "Error: " << err << "\n";
+ std::cout << "Error: " << err.message() << "\n";
}
}
Modified: branches/release/libs/asio/example/http/server/Jamfile.v2
==============================================================================
--- branches/release/libs/asio/example/http/server/Jamfile.v2 (original)
+++ branches/release/libs/asio/example/http/server/Jamfile.v2 2008-02-21 01:54:04 EST (Thu, 21 Feb 2008)
@@ -42,5 +42,6 @@
<os>NT,<toolset>gcc:<library>ws2_32
<os>NT,<toolset>gcc:<library>mswsock
<os>NT,<toolset>gcc-cygwin:<define>__USE_W32_SOCKETS
+ <os>HPUX,<toolset>gcc:<define>_XOPEN_SOURCE_EXTENDED
<os>HPUX:<library>ipv6
;
Modified: branches/release/libs/asio/example/http/server2/Jamfile.v2
==============================================================================
--- branches/release/libs/asio/example/http/server2/Jamfile.v2 (original)
+++ branches/release/libs/asio/example/http/server2/Jamfile.v2 2008-02-21 01:54:04 EST (Thu, 21 Feb 2008)
@@ -42,5 +42,6 @@
<os>NT,<toolset>gcc:<library>ws2_32
<os>NT,<toolset>gcc:<library>mswsock
<os>NT,<toolset>gcc-cygwin:<define>__USE_W32_SOCKETS
+ <os>HPUX,<toolset>gcc:<define>_XOPEN_SOURCE_EXTENDED
<os>HPUX:<library>ipv6
;
Modified: branches/release/libs/asio/example/http/server3/Jamfile.v2
==============================================================================
--- branches/release/libs/asio/example/http/server3/Jamfile.v2 (original)
+++ branches/release/libs/asio/example/http/server3/Jamfile.v2 2008-02-21 01:54:04 EST (Thu, 21 Feb 2008)
@@ -41,5 +41,6 @@
<os>NT,<toolset>gcc:<library>ws2_32
<os>NT,<toolset>gcc:<library>mswsock
<os>NT,<toolset>gcc-cygwin:<define>__USE_W32_SOCKETS
+ <os>HPUX,<toolset>gcc:<define>_XOPEN_SOURCE_EXTENDED
<os>HPUX:<library>ipv6
;
Modified: branches/release/libs/asio/example/invocation/Jamfile.v2
==============================================================================
--- branches/release/libs/asio/example/invocation/Jamfile.v2 (original)
+++ branches/release/libs/asio/example/invocation/Jamfile.v2 2008-02-21 01:54:04 EST (Thu, 21 Feb 2008)
@@ -33,5 +33,6 @@
<os>NT,<toolset>gcc:<library>ws2_32
<os>NT,<toolset>gcc:<library>mswsock
<os>NT,<toolset>gcc-cygwin:<define>__USE_W32_SOCKETS
+ <os>HPUX,<toolset>gcc:<define>_XOPEN_SOURCE_EXTENDED
<os>HPUX:<library>ipv6
;
Modified: branches/release/libs/asio/example/iostreams/Jamfile.v2
==============================================================================
--- branches/release/libs/asio/example/iostreams/Jamfile.v2 (original)
+++ branches/release/libs/asio/example/iostreams/Jamfile.v2 2008-02-21 01:54:04 EST (Thu, 21 Feb 2008)
@@ -33,6 +33,7 @@
<os>NT,<toolset>gcc:<library>ws2_32
<os>NT,<toolset>gcc:<library>mswsock
<os>NT,<toolset>gcc-cygwin:<define>__USE_W32_SOCKETS
+ <os>HPUX,<toolset>gcc:<define>_XOPEN_SOURCE_EXTENDED
<os>HPUX:<library>ipv6
;
Modified: branches/release/libs/asio/example/multicast/Jamfile.v2
==============================================================================
--- branches/release/libs/asio/example/multicast/Jamfile.v2 (original)
+++ branches/release/libs/asio/example/multicast/Jamfile.v2 2008-02-21 01:54:04 EST (Thu, 21 Feb 2008)
@@ -33,6 +33,7 @@
<os>NT,<toolset>gcc:<library>ws2_32
<os>NT,<toolset>gcc:<library>mswsock
<os>NT,<toolset>gcc-cygwin:<define>__USE_W32_SOCKETS
+ <os>HPUX,<toolset>gcc:<define>_XOPEN_SOURCE_EXTENDED
<os>HPUX:<library>ipv6
;
Modified: branches/release/libs/asio/example/serialization/Jamfile.v2
==============================================================================
--- branches/release/libs/asio/example/serialization/Jamfile.v2 (original)
+++ branches/release/libs/asio/example/serialization/Jamfile.v2 2008-02-21 01:54:04 EST (Thu, 21 Feb 2008)
@@ -34,6 +34,7 @@
<os>NT,<toolset>gcc:<library>ws2_32
<os>NT,<toolset>gcc:<library>mswsock
<os>NT,<toolset>gcc-cygwin:<define>__USE_W32_SOCKETS
+ <os>HPUX,<toolset>gcc:<define>_XOPEN_SOURCE_EXTENDED
<os>HPUX:<library>ipv6
;
Modified: branches/release/libs/asio/example/services/Jamfile.v2
==============================================================================
--- branches/release/libs/asio/example/services/Jamfile.v2 (original)
+++ branches/release/libs/asio/example/services/Jamfile.v2 2008-02-21 01:54:04 EST (Thu, 21 Feb 2008)
@@ -35,5 +35,6 @@
<os>NT,<toolset>gcc:<library>ws2_32
<os>NT,<toolset>gcc:<library>mswsock
<os>NT,<toolset>gcc-cygwin:<define>__USE_W32_SOCKETS
+ <os>HPUX,<toolset>gcc:<define>_XOPEN_SOURCE_EXTENDED
<os>HPUX:<library>ipv6
;
Modified: branches/release/libs/asio/example/socks4/Jamfile.v2
==============================================================================
--- branches/release/libs/asio/example/socks4/Jamfile.v2 (original)
+++ branches/release/libs/asio/example/socks4/Jamfile.v2 2008-02-21 01:54:04 EST (Thu, 21 Feb 2008)
@@ -33,5 +33,6 @@
<os>NT,<toolset>gcc:<library>ws2_32
<os>NT,<toolset>gcc:<library>mswsock
<os>NT,<toolset>gcc-cygwin:<define>__USE_W32_SOCKETS
+ <os>HPUX,<toolset>gcc:<define>_XOPEN_SOURCE_EXTENDED
<os>HPUX:<library>ipv6
;
Modified: branches/release/libs/asio/example/ssl/Jamfile.v2
==============================================================================
--- branches/release/libs/asio/example/ssl/Jamfile.v2 (original)
+++ branches/release/libs/asio/example/ssl/Jamfile.v2 2008-02-21 01:54:04 EST (Thu, 21 Feb 2008)
@@ -44,6 +44,7 @@
<os>NT,<toolset>gcc:<library>ws2_32
<os>NT,<toolset>gcc:<library>mswsock
<os>NT,<toolset>gcc-cygwin:<define>__USE_W32_SOCKETS
+ <os>HPUX,<toolset>gcc:<define>_XOPEN_SOURCE_EXTENDED
<os>HPUX:<library>ipv6
<library>ssl
<library>crypto
Modified: branches/release/libs/asio/example/timeouts/Jamfile.v2
==============================================================================
--- branches/release/libs/asio/example/timeouts/Jamfile.v2 (original)
+++ branches/release/libs/asio/example/timeouts/Jamfile.v2 2008-02-21 01:54:04 EST (Thu, 21 Feb 2008)
@@ -33,6 +33,7 @@
<os>NT,<toolset>gcc:<library>ws2_32
<os>NT,<toolset>gcc:<library>mswsock
<os>NT,<toolset>gcc-cygwin:<define>__USE_W32_SOCKETS
+ <os>HPUX,<toolset>gcc:<define>_XOPEN_SOURCE_EXTENDED
<os>HPUX:<library>ipv6
;
Modified: branches/release/libs/asio/example/timers/Jamfile.v2
==============================================================================
--- branches/release/libs/asio/example/timers/Jamfile.v2 (original)
+++ branches/release/libs/asio/example/timers/Jamfile.v2 2008-02-21 01:54:04 EST (Thu, 21 Feb 2008)
@@ -33,6 +33,7 @@
<os>NT,<toolset>gcc:<library>ws2_32
<os>NT,<toolset>gcc:<library>mswsock
<os>NT,<toolset>gcc-cygwin:<define>__USE_W32_SOCKETS
+ <os>HPUX,<toolset>gcc:<define>_XOPEN_SOURCE_EXTENDED
<os>HPUX:<library>ipv6
;
Modified: branches/release/libs/asio/example/tutorial/Jamfile.v2
==============================================================================
--- branches/release/libs/asio/example/tutorial/Jamfile.v2 (original)
+++ branches/release/libs/asio/example/tutorial/Jamfile.v2 2008-02-21 01:54:04 EST (Thu, 21 Feb 2008)
@@ -34,6 +34,7 @@
<os>NT,<toolset>gcc:<library>ws2_32
<os>NT,<toolset>gcc:<library>mswsock
<os>NT,<toolset>gcc-cygwin:<define>__USE_W32_SOCKETS
+ <os>HPUX,<toolset>gcc:<define>_XOPEN_SOURCE_EXTENDED
<os>HPUX:<library>ipv6
;
Modified: branches/release/libs/asio/test/Jamfile.v2
==============================================================================
--- branches/release/libs/asio/test/Jamfile.v2 (original)
+++ branches/release/libs/asio/test/Jamfile.v2 2008-02-21 01:54:04 EST (Thu, 21 Feb 2008)
@@ -47,6 +47,7 @@
<os>NT,<toolset>gcc:<library>ws2_32
<os>NT,<toolset>gcc:<library>mswsock
<os>NT,<toolset>gcc-cygwin:<define>__USE_W32_SOCKETS
+ <os>HPUX,<toolset>gcc:<define>_XOPEN_SOURCE_EXTENDED
<os>HPUX:<library>ipv6
;
Modified: branches/release/libs/asio/test/ssl/Jamfile.v2
==============================================================================
--- branches/release/libs/asio/test/ssl/Jamfile.v2 (original)
+++ branches/release/libs/asio/test/ssl/Jamfile.v2 2008-02-21 01:54:04 EST (Thu, 21 Feb 2008)
@@ -44,6 +44,7 @@
<os>NT,<toolset>gcc:<library>ws2_32
<os>NT,<toolset>gcc:<library>mswsock
<os>NT,<toolset>gcc-cygwin:<define>__USE_W32_SOCKETS
+ <os>HPUX,<toolset>gcc:<define>_XOPEN_SOURCE_EXTENDED
<os>HPUX:<library>ipv6
;
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