mirror of
https://github.com/boostorg/asio.git
synced 2026-02-25 14:32:08 +00:00
Don't include termios.h unless BOOST_ASIO_HAS_SERIAL_PORT is defined.
Fixes #2917. [SVN r52478]
This commit is contained in:
@@ -23,11 +23,10 @@
|
||||
#include <string>
|
||||
#include <boost/asio/detail/pop_options.hpp>
|
||||
|
||||
#if !defined(BOOST_WINDOWS) && !defined(__CYGWIN__)
|
||||
#include <boost/asio/serial_port_base.hpp>
|
||||
|
||||
#include <boost/asio/detail/push_options.hpp>
|
||||
#include <termios.h>
|
||||
#include <boost/asio/detail/pop_options.hpp>
|
||||
#if defined(BOOST_ASIO_HAS_SERIAL_PORT) \
|
||||
&& !defined(BOOST_WINDOWS) && !defined(__CYGWIN__)
|
||||
|
||||
#include <boost/asio/error.hpp>
|
||||
#include <boost/asio/io_service.hpp>
|
||||
@@ -263,7 +262,8 @@ private:
|
||||
} // namespace asio
|
||||
} // namespace boost
|
||||
|
||||
#endif // !defined(BOOST_WINDOWS) && !defined(__CYGWIN__)
|
||||
#endif // defined(BOOST_ASIO_HAS_SERIAL_PORT)
|
||||
// && !defined(BOOST_WINDOWS) && !defined(__CYGWIN__)
|
||||
|
||||
#include <boost/asio/detail/pop_options.hpp>
|
||||
|
||||
|
||||
@@ -22,12 +22,25 @@
|
||||
#include <stdexcept>
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/detail/workaround.hpp>
|
||||
#if !defined(BOOST_WINDOWS) && !defined(__CYGWIN__)
|
||||
# include <termios.h>
|
||||
#endif
|
||||
#include <boost/system/error_code.hpp>
|
||||
#include <boost/asio/detail/pop_options.hpp>
|
||||
|
||||
#if !defined(BOOST_ASIO_DISABLE_SERIAL_PORT)
|
||||
# if defined(BOOST_ASIO_HAS_IOCP) \
|
||||
|| !defined(BOOST_WINDOWS) && !defined(__CYGWIN__)
|
||||
# define BOOST_ASIO_HAS_SERIAL_PORT 1
|
||||
# endif // defined(BOOST_ASIO_HAS_IOCP)
|
||||
#endif // !defined(BOOST_ASIO_DISABLE_STREAM_HANDLE)
|
||||
|
||||
#if defined(BOOST_ASIO_HAS_SERIAL_PORT) \
|
||||
|| defined(GENERATING_DOCUMENTATION)
|
||||
|
||||
#if !defined(BOOST_WINDOWS) && !defined(__CYGWIN__)
|
||||
# include <boost/asio/detail/push_options.hpp>
|
||||
# include <termios.h>
|
||||
# include <boost/asio/detail/pop_options.hpp>
|
||||
#endif // !defined(BOOST_WINDOWS) && !defined(__CYGWIN__)
|
||||
|
||||
#include <boost/asio/detail/socket_types.hpp>
|
||||
|
||||
#if defined(GENERATING_DOCUMENTATION)
|
||||
@@ -154,6 +167,9 @@ private:
|
||||
|
||||
#undef BOOST_ASIO_OPTION_STORAGE
|
||||
|
||||
#endif // defined(BOOST_ASIO_HAS_SERIAL_PORT)
|
||||
// || defined(GENERATING_DOCUMENTATION)
|
||||
|
||||
#include <boost/asio/detail/pop_options.hpp>
|
||||
|
||||
#endif // BOOST_ASIO_SERIAL_PORT_BASE_HPP
|
||||
|
||||
@@ -25,17 +25,11 @@
|
||||
|
||||
#include <boost/asio/error.hpp>
|
||||
#include <boost/asio/io_service.hpp>
|
||||
#include <boost/asio/serial_port_base.hpp>
|
||||
#include <boost/asio/detail/service_base.hpp>
|
||||
#include <boost/asio/detail/reactive_serial_port_service.hpp>
|
||||
#include <boost/asio/detail/win_iocp_serial_port_service.hpp>
|
||||
|
||||
#if !defined(BOOST_ASIO_DISABLE_SERIAL_PORT)
|
||||
# if defined(BOOST_ASIO_HAS_IOCP) \
|
||||
|| !defined(BOOST_WINDOWS) && !defined(__CYGWIN__)
|
||||
# define BOOST_ASIO_HAS_SERIAL_PORT 1
|
||||
# endif // defined(BOOST_ASIO_HAS_IOCP)
|
||||
#endif // !defined(BOOST_ASIO_DISABLE_STREAM_HANDLE)
|
||||
|
||||
#if defined(BOOST_ASIO_HAS_SERIAL_PORT) \
|
||||
|| defined(GENERATING_DOCUMENTATION)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user