epoll_reactor_fwd.hpp 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. //
  2. // epoll_reactor_fwd.hpp
  3. // ~~~~~~~~~~~~~~~~~~~~~
  4. //
  5. // Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com)
  6. //
  7. // Distributed under the Boost Software License, Version 1.0. (See accompanying
  8. // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  9. //
  10. #ifndef BOOST_ASIO_DETAIL_EPOLL_REACTOR_FWD_HPP
  11. #define BOOST_ASIO_DETAIL_EPOLL_REACTOR_FWD_HPP
  12. #if defined(_MSC_VER) && (_MSC_VER >= 1200)
  13. # pragma once
  14. #endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
  15. #include <boost/asio/detail/push_options.hpp>
  16. #if !defined(BOOST_ASIO_DISABLE_EPOLL)
  17. #if defined(__linux__) // This service is only supported on Linux.
  18. #include <boost/asio/detail/push_options.hpp>
  19. #include <linux/version.h>
  20. #include <boost/asio/detail/pop_options.hpp>
  21. #if LINUX_VERSION_CODE >= KERNEL_VERSION (2,5,45) // Only kernels >= 2.5.45.
  22. // Define this to indicate that epoll is supported on the target platform.
  23. #define BOOST_ASIO_HAS_EPOLL 1
  24. namespace boost {
  25. namespace asio {
  26. namespace detail {
  27. template <bool Own_Thread>
  28. class epoll_reactor;
  29. } // namespace detail
  30. } // namespace asio
  31. } // namespace boost
  32. #endif // LINUX_VERSION_CODE >= KERNEL_VERSION (2,5,45)
  33. #endif // defined(__linux__)
  34. #endif // !defined(BOOST_ASIO_DISABLE_EPOLL)
  35. #include <boost/asio/detail/pop_options.hpp>
  36. #endif // BOOST_ASIO_DETAIL_EPOLL_REACTOR_FWD_HPP