Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r58652 - in trunk/boost/asio: . detail impl posix
From: chris_at_[hidden]
Date: 2010-01-02 16:38:45


Author: chris_kohlhoff
Date: 2010-01-02 16:38:44 EST (Sat, 02 Jan 2010)
New Revision: 58652
URL: http://svn.boost.org/trac/boost/changeset/58652

Log:
Only include implementation headers required for each platform.

Text files modified:
   trunk/boost/asio/datagram_socket_service.hpp | 21 ++++++++++++++++-----
   trunk/boost/asio/deadline_timer_service.hpp | 16 ++++++++++++----
   trunk/boost/asio/detail/select_interrupter.hpp | 9 ++++++---
   trunk/boost/asio/impl/io_service.ipp | 22 ++++++++++++++++------
   trunk/boost/asio/posix/stream_descriptor_service.hpp | 18 ++++++++++++++----
   trunk/boost/asio/raw_socket_service.hpp | 21 ++++++++++++++++-----
   trunk/boost/asio/socket_acceptor_service.hpp | 21 ++++++++++++++++-----
   trunk/boost/asio/stream_socket_service.hpp | 21 ++++++++++++++++-----
   8 files changed, 112 insertions(+), 37 deletions(-)

Modified: trunk/boost/asio/datagram_socket_service.hpp
==============================================================================
--- trunk/boost/asio/datagram_socket_service.hpp (original)
+++ trunk/boost/asio/datagram_socket_service.hpp 2010-01-02 16:38:44 EST (Sat, 02 Jan 2010)
@@ -24,12 +24,23 @@
 
 #include <boost/asio/error.hpp>
 #include <boost/asio/io_service.hpp>
-#include <boost/asio/detail/epoll_reactor.hpp>
-#include <boost/asio/detail/kqueue_reactor.hpp>
-#include <boost/asio/detail/select_reactor.hpp>
 #include <boost/asio/detail/service_base.hpp>
-#include <boost/asio/detail/reactive_socket_service.hpp>
-#include <boost/asio/detail/win_iocp_socket_service.hpp>
+
+#if defined(BOOST_ASIO_HAS_IOCP)
+# include <boost/asio/detail/win_iocp_socket_service.hpp>
+#elif defined(BOOST_ASIO_HAS_EPOLL)
+# include <boost/asio/detail/epoll_reactor.hpp>
+# include <boost/asio/detail/reactive_socket_service.hpp>
+#elif defined(BOOST_ASIO_HAS_KQUEUE)
+# include <boost/asio/detail/kqueue_reactor.hpp>
+# include <boost/asio/detail/reactive_socket_service.hpp>
+#elif defined(BOOST_ASIO_HAS_DEV_POLL)
+# include <boost/asio/detail/dev_poll_reactor.hpp>
+# include <boost/asio/detail/reactive_socket_service.hpp>
+#else
+# include <boost/asio/detail/select_reactor.hpp>
+# include <boost/asio/detail/reactive_socket_service.hpp>
+#endif
 
 namespace boost {
 namespace asio {

Modified: trunk/boost/asio/deadline_timer_service.hpp
==============================================================================
--- trunk/boost/asio/deadline_timer_service.hpp (original)
+++ trunk/boost/asio/deadline_timer_service.hpp 2010-01-02 16:38:44 EST (Sat, 02 Jan 2010)
@@ -25,11 +25,19 @@
 #include <boost/asio/io_service.hpp>
 #include <boost/asio/time_traits.hpp>
 #include <boost/asio/detail/deadline_timer_service.hpp>
-#include <boost/asio/detail/epoll_reactor.hpp>
-#include <boost/asio/detail/kqueue_reactor.hpp>
-#include <boost/asio/detail/select_reactor.hpp>
 #include <boost/asio/detail/service_base.hpp>
-#include <boost/asio/detail/win_iocp_io_service.hpp>
+
+#if defined(BOOST_ASIO_HAS_IOCP)
+# include <boost/asio/detail/win_iocp_io_service.hpp>
+#elif defined(BOOST_ASIO_HAS_EPOLL)
+# include <boost/asio/detail/epoll_reactor.hpp>
+#elif defined(BOOST_ASIO_HAS_KQUEUE)
+# include <boost/asio/detail/kqueue_reactor.hpp>
+#elif defined(BOOST_ASIO_HAS_DEV_POLL)
+# include <boost/asio/detail/dev_poll_reactor.hpp>
+#else
+# include <boost/asio/detail/select_reactor.hpp>
+#endif
 
 namespace boost {
 namespace asio {

Modified: trunk/boost/asio/detail/select_interrupter.hpp
==============================================================================
--- trunk/boost/asio/detail/select_interrupter.hpp (original)
+++ trunk/boost/asio/detail/select_interrupter.hpp 2010-01-02 16:38:44 EST (Sat, 02 Jan 2010)
@@ -21,9 +21,12 @@
 #include <boost/config.hpp>
 #include <boost/asio/detail/pop_options.hpp>
 
-#include <boost/asio/detail/eventfd_select_interrupter.hpp>
-#include <boost/asio/detail/pipe_select_interrupter.hpp>
-#include <boost/asio/detail/socket_select_interrupter.hpp>
+#if defined(BOOST_WINDOWS) || defined(__CYGWIN__)
+# include <boost/asio/detail/socket_select_interrupter.hpp>
+#else
+# include <boost/asio/detail/eventfd_select_interrupter.hpp>
+# include <boost/asio/detail/pipe_select_interrupter.hpp>
+#endif
 
 namespace boost {
 namespace asio {

Modified: trunk/boost/asio/impl/io_service.ipp
==============================================================================
--- trunk/boost/asio/impl/io_service.ipp (original)
+++ trunk/boost/asio/impl/io_service.ipp 2010-01-02 16:38:44 EST (Sat, 02 Jan 2010)
@@ -21,14 +21,24 @@
 #include <limits>
 #include <boost/asio/detail/pop_options.hpp>
 
-#include <boost/asio/detail/dev_poll_reactor.hpp>
-#include <boost/asio/detail/epoll_reactor.hpp>
-#include <boost/asio/detail/kqueue_reactor.hpp>
-#include <boost/asio/detail/select_reactor.hpp>
 #include <boost/asio/detail/service_registry.hpp>
-#include <boost/asio/detail/task_io_service.hpp>
 #include <boost/asio/detail/throw_error.hpp>
-#include <boost/asio/detail/win_iocp_io_service.hpp>
+
+#if defined(BOOST_ASIO_HAS_IOCP)
+# include <boost/asio/detail/win_iocp_io_service.hpp>
+#elif defined(BOOST_ASIO_HAS_EPOLL)
+# include <boost/asio/detail/epoll_reactor.hpp>
+# include <boost/asio/detail/task_io_service.hpp>
+#elif defined(BOOST_ASIO_HAS_KQUEUE)
+# include <boost/asio/detail/kqueue_reactor.hpp>
+# include <boost/asio/detail/task_io_service.hpp>
+#elif defined(BOOST_ASIO_HAS_DEV_POLL)
+# include <boost/asio/detail/dev_poll_reactor.hpp>
+# include <boost/asio/detail/task_io_service.hpp>
+#else
+# include <boost/asio/detail/select_reactor.hpp>
+# include <boost/asio/detail/task_io_service.hpp>
+#endif
 
 namespace boost {
 namespace asio {

Modified: trunk/boost/asio/posix/stream_descriptor_service.hpp
==============================================================================
--- trunk/boost/asio/posix/stream_descriptor_service.hpp (original)
+++ trunk/boost/asio/posix/stream_descriptor_service.hpp 2010-01-02 16:38:44 EST (Sat, 02 Jan 2010)
@@ -24,11 +24,7 @@
 
 #include <boost/asio/error.hpp>
 #include <boost/asio/io_service.hpp>
-#include <boost/asio/detail/epoll_reactor.hpp>
-#include <boost/asio/detail/kqueue_reactor.hpp>
-#include <boost/asio/detail/select_reactor.hpp>
 #include <boost/asio/detail/service_base.hpp>
-#include <boost/asio/detail/reactive_descriptor_service.hpp>
 
 #if !defined(BOOST_ASIO_DISABLE_POSIX_STREAM_DESCRIPTOR)
 # if !defined(BOOST_WINDOWS) && !defined(__CYGWIN__)
@@ -39,6 +35,20 @@
 #if defined(BOOST_ASIO_HAS_POSIX_STREAM_DESCRIPTOR) \
   || defined(GENERATING_DOCUMENTATION)
 
+#if defined(BOOST_ASIO_HAS_EPOLL)
+# include <boost/asio/detail/epoll_reactor.hpp>
+# include <boost/asio/detail/reactive_descriptor_service.hpp>
+#elif defined(BOOST_ASIO_HAS_KQUEUE)
+# include <boost/asio/detail/kqueue_reactor.hpp>
+# include <boost/asio/detail/reactive_descriptor_service.hpp>
+#elif defined(BOOST_ASIO_HAS_DEV_POLL)
+# include <boost/asio/detail/dev_poll_reactor.hpp>
+# include <boost/asio/detail/reactive_descriptor_service.hpp>
+#else
+# include <boost/asio/detail/select_reactor.hpp>
+# include <boost/asio/detail/reactive_descriptor_service.hpp>
+#endif
+
 namespace boost {
 namespace asio {
 namespace posix {

Modified: trunk/boost/asio/raw_socket_service.hpp
==============================================================================
--- trunk/boost/asio/raw_socket_service.hpp (original)
+++ trunk/boost/asio/raw_socket_service.hpp 2010-01-02 16:38:44 EST (Sat, 02 Jan 2010)
@@ -24,12 +24,23 @@
 
 #include <boost/asio/error.hpp>
 #include <boost/asio/io_service.hpp>
-#include <boost/asio/detail/epoll_reactor.hpp>
-#include <boost/asio/detail/kqueue_reactor.hpp>
-#include <boost/asio/detail/select_reactor.hpp>
 #include <boost/asio/detail/service_base.hpp>
-#include <boost/asio/detail/reactive_socket_service.hpp>
-#include <boost/asio/detail/win_iocp_socket_service.hpp>
+
+#if defined(BOOST_ASIO_HAS_IOCP)
+# include <boost/asio/detail/win_iocp_socket_service.hpp>
+#elif defined(BOOST_ASIO_HAS_EPOLL)
+# include <boost/asio/detail/epoll_reactor.hpp>
+# include <boost/asio/detail/reactive_socket_service.hpp>
+#elif defined(BOOST_ASIO_HAS_KQUEUE)
+# include <boost/asio/detail/kqueue_reactor.hpp>
+# include <boost/asio/detail/reactive_socket_service.hpp>
+#elif defined(BOOST_ASIO_HAS_DEV_POLL)
+# include <boost/asio/detail/dev_poll_reactor.hpp>
+# include <boost/asio/detail/reactive_socket_service.hpp>
+#else
+# include <boost/asio/detail/select_reactor.hpp>
+# include <boost/asio/detail/reactive_socket_service.hpp>
+#endif
 
 namespace boost {
 namespace asio {

Modified: trunk/boost/asio/socket_acceptor_service.hpp
==============================================================================
--- trunk/boost/asio/socket_acceptor_service.hpp (original)
+++ trunk/boost/asio/socket_acceptor_service.hpp 2010-01-02 16:38:44 EST (Sat, 02 Jan 2010)
@@ -20,12 +20,23 @@
 #include <boost/asio/basic_socket.hpp>
 #include <boost/asio/error.hpp>
 #include <boost/asio/io_service.hpp>
-#include <boost/asio/detail/epoll_reactor.hpp>
-#include <boost/asio/detail/kqueue_reactor.hpp>
-#include <boost/asio/detail/select_reactor.hpp>
 #include <boost/asio/detail/service_base.hpp>
-#include <boost/asio/detail/reactive_socket_service.hpp>
-#include <boost/asio/detail/win_iocp_socket_service.hpp>
+
+#if defined(BOOST_ASIO_HAS_IOCP)
+# include <boost/asio/detail/win_iocp_socket_service.hpp>
+#elif defined(BOOST_ASIO_HAS_EPOLL)
+# include <boost/asio/detail/epoll_reactor.hpp>
+# include <boost/asio/detail/reactive_socket_service.hpp>
+#elif defined(BOOST_ASIO_HAS_KQUEUE)
+# include <boost/asio/detail/kqueue_reactor.hpp>
+# include <boost/asio/detail/reactive_socket_service.hpp>
+#elif defined(BOOST_ASIO_HAS_DEV_POLL)
+# include <boost/asio/detail/dev_poll_reactor.hpp>
+# include <boost/asio/detail/reactive_socket_service.hpp>
+#else
+# include <boost/asio/detail/select_reactor.hpp>
+# include <boost/asio/detail/reactive_socket_service.hpp>
+#endif
 
 namespace boost {
 namespace asio {

Modified: trunk/boost/asio/stream_socket_service.hpp
==============================================================================
--- trunk/boost/asio/stream_socket_service.hpp (original)
+++ trunk/boost/asio/stream_socket_service.hpp 2010-01-02 16:38:44 EST (Sat, 02 Jan 2010)
@@ -24,12 +24,23 @@
 
 #include <boost/asio/error.hpp>
 #include <boost/asio/io_service.hpp>
-#include <boost/asio/detail/epoll_reactor.hpp>
-#include <boost/asio/detail/kqueue_reactor.hpp>
-#include <boost/asio/detail/select_reactor.hpp>
 #include <boost/asio/detail/service_base.hpp>
-#include <boost/asio/detail/win_iocp_socket_service.hpp>
-#include <boost/asio/detail/reactive_socket_service.hpp>
+
+#if defined(BOOST_ASIO_HAS_IOCP)
+# include <boost/asio/detail/win_iocp_socket_service.hpp>
+#elif defined(BOOST_ASIO_HAS_EPOLL)
+# include <boost/asio/detail/epoll_reactor.hpp>
+# include <boost/asio/detail/reactive_socket_service.hpp>
+#elif defined(BOOST_ASIO_HAS_KQUEUE)
+# include <boost/asio/detail/kqueue_reactor.hpp>
+# include <boost/asio/detail/reactive_socket_service.hpp>
+#elif defined(BOOST_ASIO_HAS_DEV_POLL)
+# include <boost/asio/detail/dev_poll_reactor.hpp>
+# include <boost/asio/detail/reactive_socket_service.hpp>
+#else
+# include <boost/asio/detail/select_reactor.hpp>
+# include <boost/asio/detail/reactive_socket_service.hpp>
+#endif
 
 namespace boost {
 namespace asio {


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