Skip to content

Commit 15e6f82

Browse files
Fix wchar build failures
1 parent 4cc2425 commit 15e6f82

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

ACE/ace/INET_Addr.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1028,7 +1028,7 @@ ACE_INET_Addr::get_interface_name () const
10281028
void
10291029
ACE_INET_Addr::set_interface_name (const char * if_name)
10301030
{
1031-
int length (if_name == 0 ? 0 : strnlen (if_name, 52)); // stops counting at 52 if null byte not found by then
1031+
size_t length (if_name == 0 ? 0 : strnlen (if_name, 52)); // stops counting at 52 if null byte not found by then
10321032
if (length > 50)
10331033
{
10341034
// Interface names are usually just a few characters, Windows are the longest, as they are UUIDs

ACE/ace/SOCK_Dgram.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -684,7 +684,7 @@ ACE_SOCK_Dgram::make_multicast_ifaddr (ip_mreq *ret_mreq,
684684
while (pAddrs && set_result == -1)
685685
{
686686
if (ACE_OS::strcmp (net_if_char, pAddrs->AdapterName) == 0 ||
687-
ACE_OS::strcmp (ACE_TEXT_CHAR_TO_TCHAR (net_if_char), pAddrs->FriendlyName) == 0)
687+
ACE_OS::strcmp (ACE_Ascii_To_Wide (net_if_char).wchar_rep (), pAddrs->FriendlyName) == 0)
688688
{
689689
PIP_ADAPTER_UNICAST_ADDRESS pUnicast = pAddrs->FirstUnicastAddress;
690690
LPSOCKADDR sa = pUnicast->Address.lpSockaddr;
@@ -835,7 +835,7 @@ ACE_SOCK_Dgram::make_multicast_ifaddr6 (ipv6_mreq *ret_mreq,
835835
else if ((num_if && pAddrs->Ipv6IfIndex == static_cast<unsigned int>(if_ix))
836836
|| (!num_if &&
837837
(ACE_OS::strcmp (net_if_char, pAddrs->AdapterName) == 0
838-
|| ACE_OS::strcmp (ACE_TEXT_CHAR_TO_TCHAR (net_if_char), pAddrs->FriendlyName) == 0)))
838+
|| ACE_OS::strcmp (ACE_Ascii_To_Wide (net_if_char).wchar_rep (), pAddrs->FriendlyName) == 0)))
839839
{
840840
lmreq.ipv6mr_interface = pAddrs->Ipv6IfIndex;
841841
break;

0 commit comments

Comments
 (0)