2
0
mirror of https://github.com/boostorg/asio.git synced 2026-01-27 18:42:07 +00:00
[SVN r43063]
This commit is contained in:
Daniel James
2008-02-03 10:35:18 +00:00
parent a362ec53bf
commit 005f824ca0
3 changed files with 22 additions and 2 deletions

View File

@@ -393,7 +393,12 @@ public:
~buffer_debug_check()
{
#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400)
// MSVC's string iterator checking may crash in a std::string::iterator
// object's destructor when the iterator points to an already-destroyed
// std::string object, unless the iterator is cleared first.
iter_ = Iterator();
#endif // BOOST_WORKAROUND(BOOST_MSVC, >= 1400)
}
void operator()()

View File

@@ -31,6 +31,10 @@
#if defined(BOOST_ASIO_HAS_OLD_WIN_SDK)
// Emulation of types that are missing from old Platform SDKs.
//
// N.B. this emulation is also used if building for a Windows 2000 target with
// a recent (i.e. Vista or later) SDK, as the SDK does not provide IPv6 support
// in that case.
namespace boost {
namespace asio {
@@ -55,9 +59,19 @@ struct sockaddr_storage_emulation
struct in6_addr_emulation
{
u_char s6_addr[16];
union
{
u_char Byte[16];
u_short Word[8];
} u;
};
#if !defined(s6_addr)
# define _S6_un u
# define _S6_u8 Byte
# define s6_addr _S6_un._S6_u8
#endif // !defined(s6_addr)
struct sockaddr_in6_emulation
{
short sin6_family;

View File

@@ -1825,7 +1825,8 @@ inline boost::system::error_code getnameinfo(const socket_addr_type* addr,
if (gni_t gni = (gni_t)::GetProcAddress(winsock_module, "getnameinfo"))
{
clear_error(ec);
int error = gni(addr, addrlen, host, static_cast<DWORD>(hostlen),
int error = gni(addr, static_cast<int>(addrlen),
host, static_cast<DWORD>(hostlen),
serv, static_cast<DWORD>(servlen), flags);
return ec = translate_addrinfo_error(error);
}