ipconfig: Build with msvcrt.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alexandre Julliard 2019-04-29 10:49:31 +02:00
parent d47770e503
commit adeb282c33
2 changed files with 8 additions and 7 deletions

View File

@ -1,7 +1,8 @@
MODULE = ipconfig.exe
APPMODE = -mconsole -municode
IMPORTS = iphlpapi ws2_32 user32
EXTRADLLFLAGS = -mconsole -municode -mno-cygwin
C_SRCS = ipconfig.c
RC_SRCS = ipconfig.rc

View File

@ -21,10 +21,10 @@
#define NONAMELESSUNION
#include <stdio.h>
#include <winsock2.h>
#include <windows.h>
#include <iphlpapi.h>
#include <wine/unicode.h>
#include "ipconfig.h"
@ -130,7 +130,7 @@ static void print_field(int msg, const WCHAR *value)
WCHAR name_buffer[ARRAY_SIZE(field)];
LoadStringW(GetModuleHandleW(NULL), msg, name_buffer, ARRAY_SIZE(name_buffer));
memcpy(field, name_buffer, sizeof(WCHAR) * min(strlenW(name_buffer), ARRAY_SIZE(field) - 1));
memcpy(field, name_buffer, sizeof(WCHAR) * min(lstrlenW(name_buffer), ARRAY_SIZE(field) - 1));
ipconfig_printfW(formatW, field, value);
}
@ -259,10 +259,10 @@ static WCHAR *physaddr_to_string(WCHAR *buf, BYTE *addr, DWORD len)
for (i = 0; i < len - 1; i++)
{
sprintfW(p, fmtW, addr[i]);
swprintf(p, 4, fmtW, addr[i]);
p += 3;
}
sprintfW(p, fmt2W, addr[i]);
swprintf(p, 3, fmt2W, addr[i]);
}
return buf;
@ -386,13 +386,13 @@ int wmain(int argc, WCHAR *argv[])
if (argc > 1)
{
if (!strcmpW(slashHelp, argv[1]))
if (!lstrcmpW(slashHelp, argv[1]))
{
ipconfig_message(STRING_USAGE);
WSACleanup();
return 1;
}
else if (!strcmpiW(slashAll, argv[1]))
else if (!wcsicmp(slashAll, argv[1]))
{
if (argv[2])
{