|
Boost : |
Subject: [boost] [asio] help windows.h not littering namespace
From: Bjoern Thiel (thiel_at_[hidden])
Date: 2009-10-23 08:54:56
Hallo,
in socket_types.hpp instead of
...
# if defined(__CYGWIN__)
# if !defined(__USE_W32_SOCKETS)
# error You must add -D__USE_W32_SOCKETS to your compiler options.
# endif // !defined(__USE_W32_SOCKETS)
# if !defined(NOMINMAX)
# define NOMINMAX 1
# endif // !defined(NOMINMAX)
# endif // defined(__CYGWIN__)
# include <winsock2.h>
...
I suggest something like
...
# if defined(__CYGWIN__)
# if !defined(__USE_W32_SOCKETS)
# error You must add -D__USE_W32_SOCKETS to your compiler options.
# endif // !defined(__USE_W32_SOCKETS)
# endif // defined(__CYGWIN__)
# if !defined(NOMINMAX)
# define NOMINMAX 1
# define BOOST_NOMINMAX_DEFINED 1
# endif // !defined(NOMINMAX)
# include <winsock2.h>
# if defined(BOOST_NOMINMAX_DEFINED)
# undef NOMINMAX
# undef BOOST_NOMINMAX_DEFINED
# endif // defined(BOOST_NOMINMAX_DEFINED)
...
Thanks.
Bjoern Thiel
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk