2 // detail/signal_blocker.hpp
3 // ~~~~~~~~~~~~~~~~~~~~~~~~~
5 // Copyright (c) 2003-2022 Christopher M. Kohlhoff (chris at kohlhoff dot com)
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)
11 #ifndef BOOST_ASIO_DETAIL_SIGNAL_BLOCKER_HPP
12 #define BOOST_ASIO_DETAIL_SIGNAL_BLOCKER_HPP
14 #if defined(_MSC_VER) && (_MSC_VER >= 1200)
16 #endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
18 #include <boost/asio/detail/config.hpp>
20 #if !defined(BOOST_ASIO_HAS_THREADS) || defined(BOOST_ASIO_WINDOWS) \
21 || defined(BOOST_ASIO_WINDOWS_RUNTIME) \
22 || defined(__CYGWIN__) || defined(__SYMBIAN32__)
23 # include <boost/asio/detail/null_signal_blocker.hpp>
24 #elif defined(BOOST_ASIO_HAS_PTHREADS)
25 # include <boost/asio/detail/posix_signal_blocker.hpp>
27 # error Only Windows and POSIX are supported!
34 #if !defined(BOOST_ASIO_HAS_THREADS) || defined(BOOST_ASIO_WINDOWS) \
35 || defined(BOOST_ASIO_WINDOWS_RUNTIME) \
36 || defined(__CYGWIN__) || defined(__SYMBIAN32__)
37 typedef null_signal_blocker signal_blocker;
38 #elif defined(BOOST_ASIO_HAS_PTHREADS)
39 typedef posix_signal_blocker signal_blocker;
46 #endif // BOOST_ASIO_DETAIL_SIGNAL_BLOCKER_HPP