diff --git a/programs/ipconfig/Makefile.in b/programs/ipconfig/Makefile.in index 9a56319e4e6..0bb93ec686b 100644 --- a/programs/ipconfig/Makefile.in +++ b/programs/ipconfig/Makefile.in @@ -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 diff --git a/programs/ipconfig/ipconfig.c b/programs/ipconfig/ipconfig.c index 4370a28a447..adb3f8d3018 100644 --- a/programs/ipconfig/ipconfig.c +++ b/programs/ipconfig/ipconfig.c @@ -21,10 +21,10 @@ #define NONAMELESSUNION +#include #include #include #include -#include #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]) {