Only define BOOST_ASIO_DISABLE_IOCP on Windows XP

That define allows boost::asio::ip::tcp::socket::cancel to work on Windows XP, but there's no
reason to have it enabled on other Windows versions.
This commit is contained in:
Charles Dang 2017-11-16 17:25:22 +11:00
parent bc3c79a3e0
commit f626a2dd31
2 changed files with 4 additions and 0 deletions

View file

@ -16,7 +16,9 @@
#ifdef _WIN32
#if _WIN32_WINNT == _WIN32_WINNT_WINXP
#define BOOST_ASIO_DISABLE_IOCP
#endif
#ifdef INADDR_ANY
#undef INADDR_ANY

View file

@ -20,7 +20,9 @@
// gethostbyname in socket_ops.ipp. This define silences that.
#define _WINSOCK_DEPRECATED_NO_WARNINGS
#if _WIN32_WINNT == _WIN32_WINNT_WINXP
#define BOOST_ASIO_DISABLE_IOCP
#endif
#ifdef INADDR_ANY
#undef INADDR_ANY