File tree Expand file tree Collapse file tree 7 files changed +29
-2
lines changed
Expand file tree Collapse file tree 7 files changed +29
-2
lines changed Original file line number Diff line number Diff line change 1313// Platform feature detection
1414// Each macro is always defined to either 0 or 1
1515
16+ #ifdef BOOST_COROSIO_MRDOCS
17+
18+ // MrDocs documentation build: enable all backends so every
19+ // platform-specific tag and specialization appears in the
20+ // generated reference. The native_* headers skip the real
21+ // implementation includes under this guard, so no platform
22+ // system headers are required.
23+ #define BOOST_COROSIO_HAS_IOCP 1
24+ #define BOOST_COROSIO_HAS_EPOLL 1
25+ #define BOOST_COROSIO_HAS_KQUEUE 1
26+ #define BOOST_COROSIO_HAS_SELECT 1
27+ #define BOOST_COROSIO_POSIX 1
28+
29+ #else // !BOOST_COROSIO_MRDOCS
30+
1631// IOCP - Windows I/O completion ports
1732#if defined(_WIN32)
1833#define BOOST_COROSIO_HAS_IOCP 1
4964#define BOOST_COROSIO_POSIX 0
5065#endif
5166
67+ #endif // BOOST_COROSIO_MRDOCS
68+
5269#endif // BOOST_COROSIO_DETAIL_PLATFORM_HPP
Original file line number Diff line number Diff line change 1313#include < boost/corosio/io_context.hpp>
1414#include < boost/corosio/backend.hpp>
1515
16+ #ifndef BOOST_COROSIO_MRDOCS
1617#if BOOST_COROSIO_HAS_EPOLL
1718#include < boost/corosio/native/detail/epoll/epoll_scheduler.hpp>
1819#endif
2829#if BOOST_COROSIO_HAS_IOCP
2930#include < boost/corosio/native/detail/iocp/win_scheduler.hpp>
3031#endif
32+ #endif // !BOOST_COROSIO_MRDOCS
3133
3234namespace boost ::corosio {
3335
Original file line number Diff line number Diff line change 1313#include < boost/corosio/resolver.hpp>
1414#include < boost/corosio/backend.hpp>
1515
16+ #ifndef BOOST_COROSIO_MRDOCS
1617#if BOOST_COROSIO_HAS_EPOLL || BOOST_COROSIO_HAS_SELECT || \
1718 BOOST_COROSIO_HAS_KQUEUE
1819#include < boost/corosio/native/detail/posix/posix_resolver_service.hpp>
2122#if BOOST_COROSIO_HAS_IOCP
2223#include < boost/corosio/native/detail/iocp/win_resolver_service.hpp>
2324#endif
25+ #endif // !BOOST_COROSIO_MRDOCS
2426
2527namespace boost ::corosio {
2628
Original file line number Diff line number Diff line change 1313#include < boost/corosio/signal_set.hpp>
1414#include < boost/corosio/backend.hpp>
1515
16+ #ifndef BOOST_COROSIO_MRDOCS
1617#if BOOST_COROSIO_HAS_EPOLL || BOOST_COROSIO_HAS_SELECT || \
1718 BOOST_COROSIO_HAS_KQUEUE
1819#include < boost/corosio/native/detail/posix/posix_signal_service.hpp>
2122#if BOOST_COROSIO_HAS_IOCP
2223#include < boost/corosio/native/detail/iocp/win_signals.hpp>
2324#endif
25+ #endif // !BOOST_COROSIO_MRDOCS
2426
2527namespace boost ::corosio {
2628
Original file line number Diff line number Diff line change 1313#include < boost/corosio/tcp_acceptor.hpp>
1414#include < boost/corosio/backend.hpp>
1515
16+ #ifndef BOOST_COROSIO_MRDOCS
1617#if BOOST_COROSIO_HAS_EPOLL
1718#include < boost/corosio/native/detail/epoll/epoll_acceptor_service.hpp>
1819#endif
2829#if BOOST_COROSIO_HAS_IOCP
2930#include < boost/corosio/native/detail/iocp/win_acceptor_service.hpp>
3031#endif
32+ #endif // !BOOST_COROSIO_MRDOCS
3133
3234namespace boost ::corosio {
3335
Original file line number Diff line number Diff line change 1313#include < boost/corosio/tcp_socket.hpp>
1414#include < boost/corosio/backend.hpp>
1515
16+ #ifndef BOOST_COROSIO_MRDOCS
1617#if BOOST_COROSIO_HAS_EPOLL
1718#include < boost/corosio/native/detail/epoll/epoll_socket_service.hpp>
1819#endif
2829#if BOOST_COROSIO_HAS_IOCP
2930#include < boost/corosio/native/detail/iocp/win_acceptor_service.hpp>
3031#endif
32+ #endif // !BOOST_COROSIO_MRDOCS
3133
3234namespace boost ::corosio {
3335
Original file line number Diff line number Diff line change 3535
3636namespace boost ::corosio {
3737
38- #if BOOST_COROSIO_HAS_IOCP
38+ #if BOOST_COROSIO_HAS_IOCP && !defined(BOOST_COROSIO_MRDOCS)
3939using native_handle_type = std::uintptr_t ; // SOCKET
4040#else
4141using native_handle_type = int ;
@@ -271,7 +271,7 @@ class BOOST_COROSIO_DECL tcp_socket : public io_stream
271271 */
272272 bool is_open () const noexcept
273273 {
274- #if BOOST_COROSIO_HAS_IOCP
274+ #if BOOST_COROSIO_HAS_IOCP && !defined(BOOST_COROSIO_MRDOCS)
275275 return h_ && get ().native_handle () != ~native_handle_type (0 );
276276#else
277277 return h_ && get ().native_handle () >= 0 ;
You can’t perform that action at this time.
0 commit comments