Chris@16
|
1 //
|
Chris@16
|
2 // detail/signal_blocker.hpp
|
Chris@16
|
3 // ~~~~~~~~~~~~~~~~~~~~~~~~~
|
Chris@16
|
4 //
|
Chris@101
|
5 // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
|
Chris@16
|
6 //
|
Chris@16
|
7 // Distributed under the Boost Software License, Version 1.0. (See accompanying
|
Chris@16
|
8 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
Chris@16
|
9 //
|
Chris@16
|
10
|
Chris@16
|
11 #ifndef BOOST_ASIO_DETAIL_SIGNAL_BLOCKER_HPP
|
Chris@16
|
12 #define BOOST_ASIO_DETAIL_SIGNAL_BLOCKER_HPP
|
Chris@16
|
13
|
Chris@16
|
14 #if defined(_MSC_VER) && (_MSC_VER >= 1200)
|
Chris@16
|
15 # pragma once
|
Chris@16
|
16 #endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
|
Chris@16
|
17
|
Chris@16
|
18 #include <boost/asio/detail/config.hpp>
|
Chris@16
|
19
|
Chris@16
|
20 #if !defined(BOOST_ASIO_HAS_THREADS) || defined(BOOST_ASIO_WINDOWS) \
|
Chris@16
|
21 || defined(BOOST_ASIO_WINDOWS_RUNTIME) \
|
Chris@16
|
22 || defined(__CYGWIN__) || defined(__SYMBIAN32__)
|
Chris@16
|
23 # include <boost/asio/detail/null_signal_blocker.hpp>
|
Chris@16
|
24 #elif defined(BOOST_ASIO_HAS_PTHREADS)
|
Chris@16
|
25 # include <boost/asio/detail/posix_signal_blocker.hpp>
|
Chris@16
|
26 #else
|
Chris@16
|
27 # error Only Windows and POSIX are supported!
|
Chris@16
|
28 #endif
|
Chris@16
|
29
|
Chris@16
|
30 namespace boost {
|
Chris@16
|
31 namespace asio {
|
Chris@16
|
32 namespace detail {
|
Chris@16
|
33
|
Chris@16
|
34 #if !defined(BOOST_ASIO_HAS_THREADS) || defined(BOOST_ASIO_WINDOWS) \
|
Chris@16
|
35 || defined(BOOST_ASIO_WINDOWS_RUNTIME) \
|
Chris@16
|
36 || defined(__CYGWIN__) || defined(__SYMBIAN32__)
|
Chris@16
|
37 typedef null_signal_blocker signal_blocker;
|
Chris@16
|
38 #elif defined(BOOST_ASIO_HAS_PTHREADS)
|
Chris@16
|
39 typedef posix_signal_blocker signal_blocker;
|
Chris@16
|
40 #endif
|
Chris@16
|
41
|
Chris@16
|
42 } // namespace detail
|
Chris@16
|
43 } // namespace asio
|
Chris@16
|
44 } // namespace boost
|
Chris@16
|
45
|
Chris@16
|
46 #endif // BOOST_ASIO_DETAIL_SIGNAL_BLOCKER_HPP
|