From 953af362d56546452461074683c17b25a53ae1c1 Mon Sep 17 00:00:00 2001 From: chris Date: Sun, 14 Sep 2003 01:13:00 +0000 Subject: [PATCH] Protect all code from compiler option changes that may be caused by included system/boost headers. This fixes the crashes with borland c++. --- asio/src/Makefile.bor | 4 ++-- asio/src/asio/buffered_recv_stream.hpp | 9 ++++++--- asio/src/asio/buffered_send_stream.hpp | 9 ++++++--- asio/src/asio/buffered_stream.hpp | 9 ++++++--- asio/src/asio/completion_context.hpp | 4 +++- asio/src/asio/counting_completion_context.cpp | 3 +++ asio/src/asio/counting_completion_context.hpp | 4 ++-- asio/src/asio/demuxer.hpp | 9 ++++++--- asio/src/asio/demuxer_service.hpp | 4 ++-- asio/src/asio/demuxer_task.hpp | 4 +++- .../asio/detail/default_service_provider_factory.hpp | 4 ++-- asio/src/asio/detail/demuxer_thread_pool.cpp | 3 +++ asio/src/asio/detail/demuxer_thread_pool.hpp | 8 +++++--- asio/src/asio/detail/select_interrupter.cpp | 10 +++++++--- asio/src/asio/detail/select_interrupter.hpp | 4 ++-- asio/src/asio/detail/select_op.hpp | 4 ++-- asio/src/asio/detail/select_op_queue.cpp | 4 ++++ asio/src/asio/detail/select_op_queue.hpp | 7 +++++-- asio/src/asio/detail/select_provider.cpp | 3 +++ asio/src/asio/detail/select_provider.hpp | 4 ++-- asio/src/asio/detail/selector.cpp | 4 ++++ asio/src/asio/detail/selector.hpp | 7 +++++-- asio/src/asio/detail/service_registry.cpp | 4 ++++ asio/src/asio/detail/service_registry.hpp | 7 +++++-- .../asio/detail/shared_thread_demuxer_provider.cpp | 3 +++ .../asio/detail/shared_thread_demuxer_provider.hpp | 7 +++++-- asio/src/asio/detail/socket_connector_impl.cpp | 3 +++ asio/src/asio/detail/socket_connector_impl.hpp | 7 +++++-- asio/src/asio/detail/socket_holder.hpp | 7 +++++-- asio/src/asio/detail/socket_ops.hpp | 7 +++++-- asio/src/asio/detail/socket_types.hpp | 6 ++++-- asio/src/asio/detail/timer_queue_provider.cpp | 4 ++++ asio/src/asio/detail/timer_queue_provider.hpp | 7 +++++-- asio/src/asio/detail/win_iocp_provider.hpp | 8 ++++---- asio/src/asio/dgram_socket.cpp | 4 ++++ asio/src/asio/dgram_socket.hpp | 11 +++++++---- asio/src/asio/dgram_socket_service.hpp | 4 ++-- asio/src/asio/generic_address.cpp | 3 +++ asio/src/asio/generic_address.hpp | 4 ++-- asio/src/asio/inet_address_v4.cpp | 3 +++ asio/src/asio/inet_address_v4.hpp | 9 ++++++--- asio/src/asio/service_provider.hpp | 4 ++-- asio/src/asio/service_unavailable.hpp | 7 +++++-- asio/src/asio/socket_acceptor.cpp | 5 +++++ asio/src/asio/socket_acceptor.hpp | 7 +++++-- asio/src/asio/socket_acceptor_service.hpp | 4 ++-- asio/src/asio/socket_address.hpp | 4 ++-- asio/src/asio/socket_connector.cpp | 4 ++++ asio/src/asio/socket_connector.hpp | 7 +++++-- asio/src/asio/socket_connector_service.hpp | 4 ++-- asio/src/asio/socket_error.cpp | 1 - asio/src/asio/socket_error.hpp | 10 +++++++--- asio/src/asio/stream_socket.cpp | 4 ++++ asio/src/asio/stream_socket.hpp | 11 +++++++---- asio/src/asio/stream_socket_service.hpp | 4 ++-- asio/src/asio/timer_queue.hpp | 7 +++++-- asio/src/asio/timer_queue_service.hpp | 4 ++-- 57 files changed, 221 insertions(+), 95 deletions(-) diff --git a/asio/src/Makefile.bor b/asio/src/Makefile.bor index 28d046c0..b945c759 100644 --- a/asio/src/Makefile.bor +++ b/asio/src/Makefile.bor @@ -4,8 +4,8 @@ BOOSTDIR = ../../boost_1_30_0 !endif -BOR_CXXFLAGS = -q -O2 -v -vi -y -tWM -tWR -tWC -w-inl -w-par -I$(BOOSTDIR) -BOR_LDFLAGS = -q -O2 -v -vi -y -tWM -tWR -tWC -L$(BOOSTDIR)/libs/thread/build/bin-stage +BOR_CXXFLAGS = -q -O2 -v -vi -y -a8 -b -Ve- -Vx- -tWM -tWR -tWC -w-inl -w-par -I$(BOOSTDIR) +BOR_LDFLAGS = -q -O2 -v -vi -y -a8 -b -Ve- -Vx- -tWM -tWR -tWC -L$(BOOSTDIR)/libs/thread/build/bin-stage BOR_lib_libasio_a = ../lib/asio.lib BOR_lib_LIBRARIES = $(BOR_lib_libasio_a) diff --git a/asio/src/asio/buffered_recv_stream.hpp b/asio/src/asio/buffered_recv_stream.hpp index 29084ee4..3dc63aaf 100644 --- a/asio/src/asio/buffered_recv_stream.hpp +++ b/asio/src/asio/buffered_recv_stream.hpp @@ -15,11 +15,14 @@ #ifndef ASIO_BUFFERED_RECV_STREAM_HPP #define ASIO_BUFFERED_RECV_STREAM_HPP -#include -#include -#include "asio/completion_context.hpp" +#include "asio/detail/push_options.hpp" #include "asio/detail/push_options.hpp" +#include +#include +#include "asio/detail/pop_options.hpp" + +#include "asio/completion_context.hpp" namespace asio { diff --git a/asio/src/asio/buffered_send_stream.hpp b/asio/src/asio/buffered_send_stream.hpp index c0a17ec1..7f0c40e8 100644 --- a/asio/src/asio/buffered_send_stream.hpp +++ b/asio/src/asio/buffered_send_stream.hpp @@ -15,11 +15,14 @@ #ifndef ASIO_BUFFERED_SEND_STREAM_HPP #define ASIO_BUFFERED_SEND_STREAM_HPP -#include -#include -#include "asio/completion_context.hpp" +#include "asio/detail/push_options.hpp" #include "asio/detail/push_options.hpp" +#include +#include +#include "asio/detail/pop_options.hpp" + +#include "asio/completion_context.hpp" namespace asio { diff --git a/asio/src/asio/buffered_stream.hpp b/asio/src/asio/buffered_stream.hpp index 61f6683b..e89deca5 100644 --- a/asio/src/asio/buffered_stream.hpp +++ b/asio/src/asio/buffered_stream.hpp @@ -15,11 +15,14 @@ #ifndef ASIO_BUFFERED_STREAM_HPP #define ASIO_BUFFERED_STREAM_HPP -#include -#include "asio/buffered_recv_stream.hpp" -#include "asio/buffered_send_stream.hpp" +#include "asio/detail/push_options.hpp" #include "asio/detail/push_options.hpp" +#include +#include "asio/detail/pop_options.hpp" + +#include "asio/buffered_recv_stream.hpp" +#include "asio/buffered_send_stream.hpp" namespace asio { diff --git a/asio/src/asio/completion_context.hpp b/asio/src/asio/completion_context.hpp index 04c96529..1dba1c7d 100644 --- a/asio/src/asio/completion_context.hpp +++ b/asio/src/asio/completion_context.hpp @@ -15,9 +15,11 @@ #ifndef ASIO_COMPLETION_CONTEXT_HPP #define ASIO_COMPLETION_CONTEXT_HPP -#include +#include "asio/detail/push_options.hpp" #include "asio/detail/push_options.hpp" +#include +#include "asio/detail/pop_options.hpp" namespace asio { diff --git a/asio/src/asio/counting_completion_context.cpp b/asio/src/asio/counting_completion_context.cpp index 2919f749..df826a9c 100644 --- a/asio/src/asio/counting_completion_context.cpp +++ b/asio/src/asio/counting_completion_context.cpp @@ -13,9 +13,12 @@ // #include "asio/counting_completion_context.hpp" + +#include "asio/detail/push_options.hpp" #include #include #include +#include "asio/detail/pop_options.hpp" namespace asio { diff --git a/asio/src/asio/counting_completion_context.hpp b/asio/src/asio/counting_completion_context.hpp index f93f2e74..6af8c1f0 100644 --- a/asio/src/asio/counting_completion_context.hpp +++ b/asio/src/asio/counting_completion_context.hpp @@ -15,10 +15,10 @@ #ifndef ASIO_COUNTING_COMPLETION_CONTEXT_HPP #define ASIO_COUNTING_COMPLETION_CONTEXT_HPP -#include "asio/completion_context.hpp" - #include "asio/detail/push_options.hpp" +#include "asio/completion_context.hpp" + namespace asio { /// The counting_completion_context class is a concrete implementation of the diff --git a/asio/src/asio/demuxer.hpp b/asio/src/asio/demuxer.hpp index 6cab3576..5a005db0 100644 --- a/asio/src/asio/demuxer.hpp +++ b/asio/src/asio/demuxer.hpp @@ -15,11 +15,14 @@ #ifndef ASIO_DEMUXER_HPP #define ASIO_DEMUXER_HPP -#include -#include -#include "asio/completion_context.hpp" +#include "asio/detail/push_options.hpp" #include "asio/detail/push_options.hpp" +#include +#include +#include "asio/detail/pop_options.hpp" + +#include "asio/completion_context.hpp" namespace asio { diff --git a/asio/src/asio/demuxer_service.hpp b/asio/src/asio/demuxer_service.hpp index 60ed6872..051e0793 100644 --- a/asio/src/asio/demuxer_service.hpp +++ b/asio/src/asio/demuxer_service.hpp @@ -15,12 +15,12 @@ #ifndef ASIO_DEMUXER_SERVICE_HPP #define ASIO_DEMUXER_SERVICE_HPP +#include "asio/detail/push_options.hpp" + #include "asio/demuxer.hpp" #include "asio/service.hpp" #include "asio/service_type_id.hpp" -#include "asio/detail/push_options.hpp" - namespace asio { /// The demuxer_service class is a base class for service implementations that diff --git a/asio/src/asio/demuxer_task.hpp b/asio/src/asio/demuxer_task.hpp index 1108244b..d7abaf83 100644 --- a/asio/src/asio/demuxer_task.hpp +++ b/asio/src/asio/demuxer_task.hpp @@ -15,9 +15,11 @@ #ifndef ASIO_DEMUXER_TASK_HPP #define ASIO_DEMUXER_TASK_HPP -#include +#include "asio/detail/push_options.hpp" #include "asio/detail/push_options.hpp" +#include +#include "asio/detail/pop_options.hpp" namespace asio { diff --git a/asio/src/asio/detail/default_service_provider_factory.hpp b/asio/src/asio/detail/default_service_provider_factory.hpp index 5bd1eff3..3c220f12 100644 --- a/asio/src/asio/detail/default_service_provider_factory.hpp +++ b/asio/src/asio/detail/default_service_provider_factory.hpp @@ -15,10 +15,10 @@ #ifndef ASIO_DETAIL_DEFAULT_SERVICE_PROVIDER_FACTORY_HPP #define ASIO_DETAIL_DEFAULT_SERVICE_PROVIDER_FACTORY_HPP -#include "asio/service_provider_factory.hpp" - #include "asio/detail/push_options.hpp" +#include "asio/service_provider_factory.hpp" + namespace asio { namespace detail { diff --git a/asio/src/asio/detail/demuxer_thread_pool.cpp b/asio/src/asio/detail/demuxer_thread_pool.cpp index ecd9f3a7..d7e131ec 100644 --- a/asio/src/asio/detail/demuxer_thread_pool.cpp +++ b/asio/src/asio/detail/demuxer_thread_pool.cpp @@ -13,7 +13,10 @@ // #include "asio/detail/demuxer_thread_pool.hpp" + +#include "asio/detail/push_options.hpp" #include +#include "asio/detail/pop_options.hpp" namespace asio { namespace detail { diff --git a/asio/src/asio/detail/demuxer_thread_pool.hpp b/asio/src/asio/detail/demuxer_thread_pool.hpp index d3bcc36a..3d5b4ff8 100644 --- a/asio/src/asio/detail/demuxer_thread_pool.hpp +++ b/asio/src/asio/detail/demuxer_thread_pool.hpp @@ -15,13 +15,15 @@ #ifndef ASIO_DETAIL_DEMUXER_THREAD_POOL_HPP #define ASIO_DETAIL_DEMUXER_THREAD_POOL_HPP +#include "asio/detail/push_options.hpp" + #if defined(_WIN32) #include "asio/detail/socket_types.hpp" #else -#include -#endif // defined(_WIN32) - #include "asio/detail/push_options.hpp" +#include +#include "asio/detail/pop_options.hpp" +#endif // defined(_WIN32) namespace asio { namespace detail { diff --git a/asio/src/asio/detail/select_interrupter.cpp b/asio/src/asio/detail/select_interrupter.cpp index fe2e5fc4..a283cc06 100644 --- a/asio/src/asio/detail/select_interrupter.cpp +++ b/asio/src/asio/detail/select_interrupter.cpp @@ -13,13 +13,17 @@ // #include "asio/detail/select_interrupter.hpp" + +#include "asio/detail/push_options.hpp" #include -#include "asio/socket_error.hpp" -#include "asio/detail/socket_holder.hpp" -#include "asio/detail/socket_ops.hpp" #if !defined(_WIN32) #include #endif // !defined(_WIN32) +#include "asio/detail/pop_options.hpp" + +#include "asio/socket_error.hpp" +#include "asio/detail/socket_holder.hpp" +#include "asio/detail/socket_ops.hpp" namespace asio { namespace detail { diff --git a/asio/src/asio/detail/select_interrupter.hpp b/asio/src/asio/detail/select_interrupter.hpp index 8fa5e0f5..f6308212 100644 --- a/asio/src/asio/detail/select_interrupter.hpp +++ b/asio/src/asio/detail/select_interrupter.hpp @@ -15,10 +15,10 @@ #ifndef ASIO_DETAIL_SELECT_INTERRUPTER_HPP #define ASIO_DETAIL_SELECT_INTERRUPTER_HPP -#include "asio/detail/socket_types.hpp" - #include "asio/detail/push_options.hpp" +#include "asio/detail/socket_types.hpp" + namespace asio { namespace detail { diff --git a/asio/src/asio/detail/select_op.hpp b/asio/src/asio/detail/select_op.hpp index c24fbab6..4b5d1f1c 100644 --- a/asio/src/asio/detail/select_op.hpp +++ b/asio/src/asio/detail/select_op.hpp @@ -15,10 +15,10 @@ #ifndef ASIO_DETAIL_SELECT_OP_HPP #define ASIO_DETAIL_SELECT_OP_HPP -#include "asio/detail/socket_types.hpp" - #include "asio/detail/push_options.hpp" +#include "asio/detail/socket_types.hpp" + namespace asio { namespace detail { diff --git a/asio/src/asio/detail/select_op_queue.cpp b/asio/src/asio/detail/select_op_queue.cpp index 6d753c4c..09b83ef3 100644 --- a/asio/src/asio/detail/select_op_queue.cpp +++ b/asio/src/asio/detail/select_op_queue.cpp @@ -13,7 +13,11 @@ // #include "asio/detail/select_op_queue.hpp" + +#include "asio/detail/push_options.hpp" #include +#include "asio/detail/pop_options.hpp" + #include "asio/detail/select_op.hpp" namespace asio { diff --git a/asio/src/asio/detail/select_op_queue.hpp b/asio/src/asio/detail/select_op_queue.hpp index fd8eb007..583ebaa6 100644 --- a/asio/src/asio/detail/select_op_queue.hpp +++ b/asio/src/asio/detail/select_op_queue.hpp @@ -15,10 +15,13 @@ #ifndef ASIO_DETAIL_SELECT_OP_QUEUE_HPP #define ASIO_DETAIL_SELECT_OP_QUEUE_HPP -#include -#include "asio/detail/socket_types.hpp" +#include "asio/detail/push_options.hpp" #include "asio/detail/push_options.hpp" +#include +#include "asio/detail/pop_options.hpp" + +#include "asio/detail/socket_types.hpp" namespace asio { namespace detail { diff --git a/asio/src/asio/detail/select_provider.cpp b/asio/src/asio/detail/select_provider.cpp index 9564af46..28d965ab 100644 --- a/asio/src/asio/detail/select_provider.cpp +++ b/asio/src/asio/detail/select_provider.cpp @@ -21,7 +21,10 @@ #include "asio/detail/socket_connector_impl.hpp" #include "asio/detail/socket_holder.hpp" #include "asio/detail/socket_ops.hpp" + +#include "asio/detail/push_options.hpp" #include +#include "asio/detail/pop_options.hpp" namespace asio { namespace detail { diff --git a/asio/src/asio/detail/select_provider.hpp b/asio/src/asio/detail/select_provider.hpp index babe6f0b..80d94b38 100644 --- a/asio/src/asio/detail/select_provider.hpp +++ b/asio/src/asio/detail/select_provider.hpp @@ -15,6 +15,8 @@ #ifndef ASIO_DETAIL_SELECT_PROVIDER_HPP #define ASIO_DETAIL_SELECT_PROVIDER_HPP +#include "asio/detail/push_options.hpp" + #include "asio/dgram_socket_service.hpp" #include "asio/service_provider.hpp" #include "asio/socket_acceptor_service.hpp" @@ -22,8 +24,6 @@ #include "asio/stream_socket_service.hpp" #include "asio/detail/selector.hpp" -#include "asio/detail/push_options.hpp" - namespace asio { namespace detail { diff --git a/asio/src/asio/detail/selector.cpp b/asio/src/asio/detail/selector.cpp index 46d581fb..7b1873f7 100644 --- a/asio/src/asio/detail/selector.cpp +++ b/asio/src/asio/detail/selector.cpp @@ -13,8 +13,12 @@ // #include "asio/detail/selector.hpp" + +#include "asio/detail/push_options.hpp" #include #include +#include "asio/detail/pop_options.hpp" + #include "asio/demuxer.hpp" #include "asio/detail/socket_types.hpp" diff --git a/asio/src/asio/detail/selector.hpp b/asio/src/asio/detail/selector.hpp index c8260d5f..7e5859be 100644 --- a/asio/src/asio/detail/selector.hpp +++ b/asio/src/asio/detail/selector.hpp @@ -15,14 +15,17 @@ #ifndef ASIO_DETAIL_SELECTOR_HPP #define ASIO_DETAIL_SELECTOR_HPP +#include "asio/detail/push_options.hpp" + +#include "asio/detail/push_options.hpp" #include #include +#include "asio/detail/pop_options.hpp" + #include "asio/demuxer_task.hpp" #include "asio/detail/select_interrupter.hpp" #include "asio/detail/select_op_queue.hpp" -#include "asio/detail/push_options.hpp" - namespace asio { class demuxer; } namespace asio { diff --git a/asio/src/asio/detail/service_registry.cpp b/asio/src/asio/detail/service_registry.cpp index 6b574969..b2bc5e73 100644 --- a/asio/src/asio/detail/service_registry.cpp +++ b/asio/src/asio/detail/service_registry.cpp @@ -13,7 +13,11 @@ // #include "asio/detail/service_registry.hpp" + +#include "asio/detail/push_options.hpp" #include +#include "asio/detail/pop_options.hpp" + #include "asio/service_unavailable.hpp" namespace asio { diff --git a/asio/src/asio/detail/service_registry.hpp b/asio/src/asio/detail/service_registry.hpp index 281d387b..fcab6370 100644 --- a/asio/src/asio/detail/service_registry.hpp +++ b/asio/src/asio/detail/service_registry.hpp @@ -15,16 +15,19 @@ #ifndef ASIO_DETAIL_SERVICE_REGISTRY_HPP #define ASIO_DETAIL_SERVICE_REGISTRY_HPP +#include "asio/detail/push_options.hpp" + +#include "asio/detail/push_options.hpp" #include #include #include #include #include +#include "asio/detail/pop_options.hpp" + #include "asio/service_provider.hpp" #include "asio/service_provider_factory.hpp" -#include "asio/detail/push_options.hpp" - namespace asio { namespace detail { diff --git a/asio/src/asio/detail/shared_thread_demuxer_provider.cpp b/asio/src/asio/detail/shared_thread_demuxer_provider.cpp index 09b40fa9..639827da 100644 --- a/asio/src/asio/detail/shared_thread_demuxer_provider.cpp +++ b/asio/src/asio/detail/shared_thread_demuxer_provider.cpp @@ -13,8 +13,11 @@ // #include "asio/detail/shared_thread_demuxer_provider.hpp" + +#include "asio/detail/push_options.hpp" #include #include +#include "asio/detail/pop_options.hpp" namespace asio { namespace detail { diff --git a/asio/src/asio/detail/shared_thread_demuxer_provider.hpp b/asio/src/asio/detail/shared_thread_demuxer_provider.hpp index 996e70db..8a4af8f4 100644 --- a/asio/src/asio/detail/shared_thread_demuxer_provider.hpp +++ b/asio/src/asio/detail/shared_thread_demuxer_provider.hpp @@ -15,17 +15,20 @@ #ifndef ASIO_DETAIL_SHARED_THREAD_DEMUXER_PROVIDER_HPP #define ASIO_DETAIL_SHARED_THREAD_DEMUXER_PROVIDER_HPP +#include "asio/detail/push_options.hpp" + +#include "asio/detail/push_options.hpp" #include #include #include +#include "asio/detail/pop_options.hpp" + #include "asio/completion_context_locker.hpp" #include "asio/demuxer_service.hpp" #include "asio/demuxer_task.hpp" #include "asio/service_provider.hpp" #include "asio/detail/demuxer_thread_pool.hpp" -#include "asio/detail/push_options.hpp" - namespace asio { namespace detail { diff --git a/asio/src/asio/detail/socket_connector_impl.cpp b/asio/src/asio/detail/socket_connector_impl.cpp index 4b97b1c4..eafaf04b 100644 --- a/asio/src/asio/detail/socket_connector_impl.cpp +++ b/asio/src/asio/detail/socket_connector_impl.cpp @@ -13,7 +13,10 @@ // #include "asio/detail/socket_connector_impl.hpp" + +#include "asio/detail/push_options.hpp" #include +#include "asio/detail/pop_options.hpp" namespace asio { namespace detail { diff --git a/asio/src/asio/detail/socket_connector_impl.hpp b/asio/src/asio/detail/socket_connector_impl.hpp index 00687521..fd9fb0a7 100644 --- a/asio/src/asio/detail/socket_connector_impl.hpp +++ b/asio/src/asio/detail/socket_connector_impl.hpp @@ -15,12 +15,15 @@ #ifndef ASIO_DETAIL_SOCKET_CONNECTOR_IMPL_HPP #define ASIO_DETAIL_SOCKET_CONNECTOR_IMPL_HPP +#include "asio/detail/push_options.hpp" + +#include "asio/detail/push_options.hpp" #include #include #include -#include "asio/detail/socket_types.hpp" +#include "asio/detail/pop_options.hpp" -#include "asio/detail/push_options.hpp" +#include "asio/detail/socket_types.hpp" namespace asio { namespace detail { diff --git a/asio/src/asio/detail/socket_holder.hpp b/asio/src/asio/detail/socket_holder.hpp index 56f1c5a7..8c755abc 100644 --- a/asio/src/asio/detail/socket_holder.hpp +++ b/asio/src/asio/detail/socket_holder.hpp @@ -15,10 +15,13 @@ #ifndef ASIO_DETAIL_SOCKET_HOLDER_HPP #define ASIO_DETAIL_SOCKET_HOLDER_HPP -#include -#include "asio/detail/socket_ops.hpp" +#include "asio/detail/push_options.hpp" #include "asio/detail/push_options.hpp" +#include +#include "asio/detail/pop_options.hpp" + +#include "asio/detail/socket_ops.hpp" namespace asio { namespace detail { diff --git a/asio/src/asio/detail/socket_ops.hpp b/asio/src/asio/detail/socket_ops.hpp index abd18710..3010ae27 100644 --- a/asio/src/asio/detail/socket_ops.hpp +++ b/asio/src/asio/detail/socket_ops.hpp @@ -15,13 +15,16 @@ #ifndef ASIO_DETAIL_SOCKET_OPS_HPP #define ASIO_DETAIL_SOCKET_OPS_HPP +#include "asio/detail/push_options.hpp" + +#include "asio/detail/push_options.hpp" #include -#include "asio/detail/socket_types.hpp" #if !defined(_WIN32) #include #endif +#include "asio/detail/pop_options.hpp" -#include "asio/detail/push_options.hpp" +#include "asio/detail/socket_types.hpp" namespace asio { namespace detail { diff --git a/asio/src/asio/detail/socket_types.hpp b/asio/src/asio/detail/socket_types.hpp index a80c4119..d065a297 100644 --- a/asio/src/asio/detail/socket_types.hpp +++ b/asio/src/asio/detail/socket_types.hpp @@ -15,6 +15,9 @@ #ifndef ASIO_DETAIL_SOCKET_TYPES_HPP #define ASIO_DETAIL_SOCKET_TYPES_HPP +#include "asio/detail/push_options.hpp" + +#include "asio/detail/push_options.hpp" #if defined(_WIN32) # define FD_SETSIZE 1024 # include @@ -26,8 +29,7 @@ # include # include #endif - -#include "asio/detail/push_options.hpp" +#include "asio/detail/pop_options.hpp" namespace asio { namespace detail { diff --git a/asio/src/asio/detail/timer_queue_provider.cpp b/asio/src/asio/detail/timer_queue_provider.cpp index ac0c4568..35bd30da 100644 --- a/asio/src/asio/detail/timer_queue_provider.cpp +++ b/asio/src/asio/detail/timer_queue_provider.cpp @@ -13,7 +13,11 @@ // #include "asio/detail/timer_queue_provider.hpp" + +#include "asio/detail/push_options.hpp" #include +#include "asio/detail/pop_options.hpp" + #include "asio/completion_context.hpp" #include "asio/demuxer.hpp" #include "asio/service_unavailable.hpp" diff --git a/asio/src/asio/detail/timer_queue_provider.hpp b/asio/src/asio/detail/timer_queue_provider.hpp index d9a5ad75..9e0991bc 100644 --- a/asio/src/asio/detail/timer_queue_provider.hpp +++ b/asio/src/asio/detail/timer_queue_provider.hpp @@ -15,15 +15,18 @@ #ifndef ASIO_DETAIL_TIMER_QUEUE_PROVIDER_HPP #define ASIO_DETAIL_TIMER_QUEUE_PROVIDER_HPP +#include "asio/detail/push_options.hpp" + +#include "asio/detail/push_options.hpp" #include #include #include +#include "asio/detail/pop_options.hpp" + #include "asio/completion_context.hpp" #include "asio/service_provider.hpp" #include "asio/timer_queue_service.hpp" -#include "asio/detail/push_options.hpp" - namespace asio { namespace detail { diff --git a/asio/src/asio/detail/win_iocp_provider.hpp b/asio/src/asio/detail/win_iocp_provider.hpp index 9bb56995..f83bee5b 100644 --- a/asio/src/asio/detail/win_iocp_provider.hpp +++ b/asio/src/asio/detail/win_iocp_provider.hpp @@ -15,6 +15,8 @@ #ifndef ASIO_DETAIL_WIN_IOCP_PROVIDER_HPP #define ASIO_DETAIL_WIN_IOCP_PROVIDER_HPP +#include "asio/detail/push_options.hpp" + #if defined(_WIN32) // This provider is only supported on Win32 #include "asio/completion_context_locker.hpp" @@ -24,8 +26,6 @@ #include "asio/stream_socket_service.hpp" #include "asio/detail/demuxer_thread_pool.hpp" -#include "asio/detail/push_options.hpp" - namespace asio { namespace detail { @@ -151,8 +151,8 @@ private: } // namespace detail } // namespace asio -#include "asio/detail/pop_options.hpp" - #endif // defined(_WIN32) +#include "asio/detail/pop_options.hpp" + #endif // ASIO_DETAIL_WIN_IOCP_PROVIDER_HPP diff --git a/asio/src/asio/dgram_socket.cpp b/asio/src/asio/dgram_socket.cpp index b86c38a2..2ea49a93 100644 --- a/asio/src/asio/dgram_socket.cpp +++ b/asio/src/asio/dgram_socket.cpp @@ -13,8 +13,12 @@ // #include "asio/dgram_socket.hpp" + +#include "asio/detail/push_options.hpp" #include #include +#include "asio/detail/pop_options.hpp" + #include "asio/demuxer.hpp" #include "asio/dgram_socket_service.hpp" #include "asio/socket_address.hpp" diff --git a/asio/src/asio/dgram_socket.hpp b/asio/src/asio/dgram_socket.hpp index e82fff23..dd83f253 100644 --- a/asio/src/asio/dgram_socket.hpp +++ b/asio/src/asio/dgram_socket.hpp @@ -15,12 +15,15 @@ #ifndef ASIO_DGRAM_SOCKET_HPP #define ASIO_DGRAM_SOCKET_HPP -#include -#include -#include "asio/completion_context.hpp" -#include "asio/detail/socket_types.hpp" +#include "asio/detail/push_options.hpp" #include "asio/detail/push_options.hpp" +#include +#include +#include "asio/detail/pop_options.hpp" + +#include "asio/completion_context.hpp" +#include "asio/detail/socket_types.hpp" namespace asio { diff --git a/asio/src/asio/dgram_socket_service.hpp b/asio/src/asio/dgram_socket_service.hpp index 334a18cb..9bde89da 100644 --- a/asio/src/asio/dgram_socket_service.hpp +++ b/asio/src/asio/dgram_socket_service.hpp @@ -15,12 +15,12 @@ #ifndef ASIO_DGRAM_SOCKET_SERVICE_HPP #define ASIO_DGRAM_SOCKET_SERVICE_HPP +#include "asio/detail/push_options.hpp" + #include "asio/service.hpp" #include "asio/service_type_id.hpp" #include "asio/dgram_socket.hpp" -#include "asio/detail/push_options.hpp" - namespace asio { /// The dgram_socket_service class is a base class for service implementations diff --git a/asio/src/asio/generic_address.cpp b/asio/src/asio/generic_address.cpp index ba476fae..63bed970 100644 --- a/asio/src/asio/generic_address.cpp +++ b/asio/src/asio/generic_address.cpp @@ -13,7 +13,10 @@ // #include "asio/generic_address.hpp" + +#include "asio/detail/push_options.hpp" #include +#include "asio/detail/pop_options.hpp" namespace asio { diff --git a/asio/src/asio/generic_address.hpp b/asio/src/asio/generic_address.hpp index ca1ec5d4..3f3ce42d 100644 --- a/asio/src/asio/generic_address.hpp +++ b/asio/src/asio/generic_address.hpp @@ -15,10 +15,10 @@ #ifndef ASIO_GENERIC_ADDRESS_HPP #define ASIO_GENERIC_ADDRESS_HPP -#include "asio/socket_address.hpp" - #include "asio/detail/push_options.hpp" +#include "asio/socket_address.hpp" + namespace asio { /// The generic_address class may be used to hold any type of socket address. diff --git a/asio/src/asio/inet_address_v4.cpp b/asio/src/asio/inet_address_v4.cpp index 40633273..1963c294 100644 --- a/asio/src/asio/inet_address_v4.cpp +++ b/asio/src/asio/inet_address_v4.cpp @@ -13,10 +13,13 @@ // #include "asio/inet_address_v4.hpp" + +#include "asio/detail/push_options.hpp" #if !defined(_WIN32) #include #endif #include +#include "asio/detail/pop_options.hpp" namespace asio { diff --git a/asio/src/asio/inet_address_v4.hpp b/asio/src/asio/inet_address_v4.hpp index dd6d4908..ada0c8e7 100644 --- a/asio/src/asio/inet_address_v4.hpp +++ b/asio/src/asio/inet_address_v4.hpp @@ -15,11 +15,14 @@ #ifndef ASIO_INET_ADDRESS_V4_HPP #define ASIO_INET_ADDRESS_V4_HPP -#include -#include -#include "asio/socket_address.hpp" +#include "asio/detail/push_options.hpp" #include "asio/detail/push_options.hpp" +#include +#include +#include "asio/detail/pop_options.hpp" + +#include "asio/socket_address.hpp" namespace asio { diff --git a/asio/src/asio/service_provider.hpp b/asio/src/asio/service_provider.hpp index fd3acaf9..046bca55 100644 --- a/asio/src/asio/service_provider.hpp +++ b/asio/src/asio/service_provider.hpp @@ -15,10 +15,10 @@ #ifndef ASIO_SERVICE_PROVIDER_HPP #define ASIO_SERVICE_PROVIDER_HPP -#include "asio/service_type_id.hpp" - #include "asio/detail/push_options.hpp" +#include "asio/service_type_id.hpp" + namespace asio { class service; diff --git a/asio/src/asio/service_unavailable.hpp b/asio/src/asio/service_unavailable.hpp index 29aa80ba..b898c932 100644 --- a/asio/src/asio/service_unavailable.hpp +++ b/asio/src/asio/service_unavailable.hpp @@ -15,10 +15,13 @@ #ifndef ASIO_SERVICE_UNAVAILABLE_HPP #define ASIO_SERVICE_UNAVAILABLE_HPP -#include -#include "asio/service_type_id.hpp" +#include "asio/detail/push_options.hpp" #include "asio/detail/push_options.hpp" +#include +#include "asio/detail/pop_options.hpp" + +#include "asio/service_type_id.hpp" namespace asio { diff --git a/asio/src/asio/socket_acceptor.cpp b/asio/src/asio/socket_acceptor.cpp index 9ce28074..04a92b0f 100644 --- a/asio/src/asio/socket_acceptor.cpp +++ b/asio/src/asio/socket_acceptor.cpp @@ -13,7 +13,12 @@ // #include "asio/socket_acceptor.hpp" + +#include "asio/detail/push_options.hpp" #include +#include +#include "asio/detail/pop_options.hpp" + #include "asio/demuxer.hpp" #include "asio/socket_acceptor_service.hpp" #include "asio/socket_address.hpp" diff --git a/asio/src/asio/socket_acceptor.hpp b/asio/src/asio/socket_acceptor.hpp index a79772b6..0bae4b65 100644 --- a/asio/src/asio/socket_acceptor.hpp +++ b/asio/src/asio/socket_acceptor.hpp @@ -15,14 +15,17 @@ #ifndef ASIO_SOCKET_ACCEPTOR_HPP #define ASIO_SOCKET_ACCEPTOR_HPP +#include "asio/detail/push_options.hpp" + +#include "asio/detail/push_options.hpp" #include #include +#include "asio/detail/pop_options.hpp" + #include "asio/completion_context.hpp" #include "asio/stream_socket.hpp" #include "asio/detail/socket_types.hpp" -#include "asio/detail/push_options.hpp" - namespace asio { class demuxer; diff --git a/asio/src/asio/socket_acceptor_service.hpp b/asio/src/asio/socket_acceptor_service.hpp index b21046bb..5c5af79c 100644 --- a/asio/src/asio/socket_acceptor_service.hpp +++ b/asio/src/asio/socket_acceptor_service.hpp @@ -15,13 +15,13 @@ #ifndef ASIO_SOCKET_ACCEPTOR_SERVICE_HPP #define ASIO_SOCKET_ACCEPTOR_SERVICE_HPP +#include "asio/detail/push_options.hpp" + #include "asio/service.hpp" #include "asio/service_type_id.hpp" #include "asio/socket_acceptor.hpp" #include "asio/stream_socket.hpp" -#include "asio/detail/push_options.hpp" - namespace asio { /// The socket_acceptor_service class is a base class for service diff --git a/asio/src/asio/socket_address.hpp b/asio/src/asio/socket_address.hpp index 95482c3e..337fb293 100644 --- a/asio/src/asio/socket_address.hpp +++ b/asio/src/asio/socket_address.hpp @@ -15,10 +15,10 @@ #ifndef ASIO_SOCKET_ADDRESS_HPP #define ASIO_SOCKET_ADDRESS_HPP -#include "asio/detail/socket_types.hpp" - #include "asio/detail/push_options.hpp" +#include "asio/detail/socket_types.hpp" + namespace asio { /// The socket_address class is the base class for all supported types of diff --git a/asio/src/asio/socket_connector.cpp b/asio/src/asio/socket_connector.cpp index 2b28622d..b53bd62f 100644 --- a/asio/src/asio/socket_connector.cpp +++ b/asio/src/asio/socket_connector.cpp @@ -13,8 +13,12 @@ // #include "asio/socket_connector.hpp" + +#include "asio/detail/push_options.hpp" #include #include +#include "asio/detail/pop_options.hpp" + #include "asio/demuxer.hpp" #include "asio/socket_connector_service.hpp" #include "asio/socket_address.hpp" diff --git a/asio/src/asio/socket_connector.hpp b/asio/src/asio/socket_connector.hpp index 2c36cf2a..9f02e8a7 100644 --- a/asio/src/asio/socket_connector.hpp +++ b/asio/src/asio/socket_connector.hpp @@ -15,14 +15,17 @@ #ifndef ASIO_SOCKET_CONNECTOR_HPP #define ASIO_SOCKET_CONNECTOR_HPP +#include "asio/detail/push_options.hpp" + +#include "asio/detail/push_options.hpp" #include #include +#include "asio/detail/pop_options.hpp" + #include "asio/completion_context.hpp" #include "asio/stream_socket.hpp" #include "asio/detail/socket_types.hpp" -#include "asio/detail/push_options.hpp" - namespace asio { class demuxer; diff --git a/asio/src/asio/socket_connector_service.hpp b/asio/src/asio/socket_connector_service.hpp index e3cd1dc9..ca80d820 100644 --- a/asio/src/asio/socket_connector_service.hpp +++ b/asio/src/asio/socket_connector_service.hpp @@ -15,13 +15,13 @@ #ifndef ASIO_SOCKET_CONNECTOR_SERVICE_HPP #define ASIO_SOCKET_CONNECTOR_SERVICE_HPP +#include "asio/detail/push_options.hpp" + #include "asio/service.hpp" #include "asio/service_type_id.hpp" #include "asio/socket_connector.hpp" #include "asio/stream_socket.hpp" -#include "asio/detail/push_options.hpp" - namespace asio { /// The socket_connector_service class is a base class for service diff --git a/asio/src/asio/socket_error.cpp b/asio/src/asio/socket_error.cpp index ff4c9f23..0d5e37b2 100644 --- a/asio/src/asio/socket_error.cpp +++ b/asio/src/asio/socket_error.cpp @@ -13,7 +13,6 @@ // #include "asio/socket_error.hpp" -#include namespace asio { diff --git a/asio/src/asio/socket_error.hpp b/asio/src/asio/socket_error.hpp index b44f05a2..055eb862 100644 --- a/asio/src/asio/socket_error.hpp +++ b/asio/src/asio/socket_error.hpp @@ -15,11 +15,15 @@ #ifndef ASIO_SOCKET_ERROR_HPP #define ASIO_SOCKET_ERROR_HPP -#include -#include -#include "asio/detail/socket_types.hpp" +#include "asio/detail/push_options.hpp" #include "asio/detail/push_options.hpp" +#include +#include +#include +#include "asio/detail/pop_options.hpp" + +#include "asio/detail/socket_types.hpp" namespace asio { diff --git a/asio/src/asio/stream_socket.cpp b/asio/src/asio/stream_socket.cpp index 838e4349..b39e38a1 100644 --- a/asio/src/asio/stream_socket.cpp +++ b/asio/src/asio/stream_socket.cpp @@ -13,8 +13,12 @@ // #include "asio/stream_socket.hpp" + +#include "asio/detail/push_options.hpp" #include #include +#include "asio/detail/pop_options.hpp" + #include "asio/demuxer.hpp" #include "asio/socket_error.hpp" #include "asio/stream_socket_service.hpp" diff --git a/asio/src/asio/stream_socket.hpp b/asio/src/asio/stream_socket.hpp index 026b1bd9..efbe30a5 100644 --- a/asio/src/asio/stream_socket.hpp +++ b/asio/src/asio/stream_socket.hpp @@ -15,12 +15,15 @@ #ifndef ASIO_STREAM_SOCKET_HPP #define ASIO_STREAM_SOCKET_HPP -#include -#include -#include "asio/completion_context.hpp" -#include "asio/detail/socket_types.hpp" +#include "asio/detail/push_options.hpp" #include "asio/detail/push_options.hpp" +#include +#include +#include "asio/detail/pop_options.hpp" + +#include "asio/completion_context.hpp" +#include "asio/detail/socket_types.hpp" namespace asio { diff --git a/asio/src/asio/stream_socket_service.hpp b/asio/src/asio/stream_socket_service.hpp index 92a518b5..c5918022 100644 --- a/asio/src/asio/stream_socket_service.hpp +++ b/asio/src/asio/stream_socket_service.hpp @@ -15,12 +15,12 @@ #ifndef ASIO_STREAM_SOCKET_SERVICE_HPP #define ASIO_STREAM_SOCKET_SERVICE_HPP +#include "asio/detail/push_options.hpp" + #include "asio/service.hpp" #include "asio/service_type_id.hpp" #include "asio/stream_socket.hpp" -#include "asio/detail/push_options.hpp" - namespace asio { /// The stream_socket_service class is a base class for service implementations diff --git a/asio/src/asio/timer_queue.hpp b/asio/src/asio/timer_queue.hpp index 312700da..124ece8c 100644 --- a/asio/src/asio/timer_queue.hpp +++ b/asio/src/asio/timer_queue.hpp @@ -15,12 +15,15 @@ #ifndef ASIO_TIMER_QUEUE_HPP #define ASIO_TIMER_QUEUE_HPP +#include "asio/detail/push_options.hpp" + +#include "asio/detail/push_options.hpp" #include #include #include -#include "asio/completion_context.hpp" +#include "asio/detail/pop_options.hpp" -#include "asio/detail/push_options.hpp" +#include "asio/completion_context.hpp" namespace asio { diff --git a/asio/src/asio/timer_queue_service.hpp b/asio/src/asio/timer_queue_service.hpp index 72cc0942..53bd01f6 100644 --- a/asio/src/asio/timer_queue_service.hpp +++ b/asio/src/asio/timer_queue_service.hpp @@ -15,12 +15,12 @@ #ifndef ASIO_TIMER_QUEUE_SERVICE_HPP #define ASIO_TIMER_QUEUE_SERVICE_HPP +#include "asio/detail/push_options.hpp" + #include "asio/service.hpp" #include "asio/service_type_id.hpp" #include "asio/timer_queue.hpp" -#include "asio/detail/push_options.hpp" - namespace asio { /// The timer_queue_service class is a base class for service implementations