mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-03 21:02:14 +00:00
Attempt to silence warning about deprecated stuff in Boost
For some reason, after d7302d684d9d a warning about Boost's use of gethostbyaddr and appeared when compiling wesnothd_connection.cpp on Windows. No idea what change in the above commit caused it, but it seems moving the _WINSOCK_DEPRECATED_NO_WARNINGS define to wesnothd_connection.hpp silences it.
This commit is contained in:
parent
6a92a0fdcd
commit
f1749c8d9b
@ -21,11 +21,6 @@
|
||||
|
||||
#include "exceptions.hpp"
|
||||
|
||||
// MSVC compilation throws deprecation warnings on boost's use of gethostbyaddr and gethostbyname in socket_ops.ipp
|
||||
#ifdef _WIN32
|
||||
#define _WINSOCK_DEPRECATED_NO_WARNINGS
|
||||
#endif
|
||||
|
||||
#include <boost/asio.hpp>
|
||||
#include <boost/asio/signal_set.hpp>
|
||||
#include <boost/shared_array.hpp>
|
||||
|
@ -15,18 +15,27 @@
|
||||
#pragma once
|
||||
|
||||
#ifdef _WIN32
|
||||
# define BOOST_ASIO_DISABLE_IOCP
|
||||
# ifdef INADDR_ANY
|
||||
# undef INADDR_ANY
|
||||
# endif
|
||||
# ifdef INADDR_BROADCAST
|
||||
# undef INADDR_BROADCAST
|
||||
# endif
|
||||
# ifdef INADDR_NONE
|
||||
# undef INADDR_NONE
|
||||
# endif
|
||||
|
||||
// MSVC compilation throws deprecation warnings on boost's use of gethostbyaddr and
|
||||
// gethostbyname in socket_ops.ipp. This define silences that.
|
||||
#define _WINSOCK_DEPRECATED_NO_WARNINGS
|
||||
|
||||
#define BOOST_ASIO_DISABLE_IOCP
|
||||
|
||||
#ifdef INADDR_ANY
|
||||
#undef INADDR_ANY
|
||||
#endif
|
||||
|
||||
#ifdef INADDR_BROADCAST
|
||||
#undef INADDR_BROADCAST
|
||||
#endif
|
||||
|
||||
#ifdef INADDR_NONE
|
||||
#undef INADDR_NONE
|
||||
#endif
|
||||
|
||||
#endif // endif _WIN32
|
||||
|
||||
#include <boost/asio.hpp>
|
||||
#include <deque>
|
||||
#include <list>
|
||||
|
Loading…
x
Reference in New Issue
Block a user