https://git.reactos.org/?p=reactos.git;a=commitdiff;h=cb0f46bddf30b568b3123…
commit cb0f46bddf30b568b3123e405c12d40b91d5f663
Author: Amine Khaldi <amine.khaldi(a)reactos.org>
AuthorDate: Mon Oct 1 00:14:52 2018 +0100
Commit: Amine Khaldi <amine.khaldi(a)reactos.org>
CommitDate: Mon Oct 1 00:14:52 2018 +0100
[TASKKILL] Sync with Wine Staging 3.17. CORE-15127
---
base/applications/cmdutils/taskkill/CMakeLists.txt | 1 +
base/applications/cmdutils/taskkill/taskkill.c | 8 +++-----
media/doc/README.WINE | 2 +-
3 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/base/applications/cmdutils/taskkill/CMakeLists.txt
b/base/applications/cmdutils/taskkill/CMakeLists.txt
index 4b5e3498c8..5006fb3b6f 100644
--- a/base/applications/cmdutils/taskkill/CMakeLists.txt
+++ b/base/applications/cmdutils/taskkill/CMakeLists.txt
@@ -1,4 +1,5 @@
+add_definitions(-D__WINESRC__)
add_executable(taskkill taskkill.c taskkill.rc)
target_link_libraries(taskkill wine)
set_module_type(taskkill win32cui UNICODE)
diff --git a/base/applications/cmdutils/taskkill/taskkill.c
b/base/applications/cmdutils/taskkill/taskkill.c
index 6e4e1eb55a..59ce98dc6d 100644
--- a/base/applications/cmdutils/taskkill/taskkill.c
+++ b/base/applications/cmdutils/taskkill/taskkill.c
@@ -47,7 +47,7 @@ static int taskkill_vprintfW(const WCHAR *msg, __ms_va_list va_args)
WCHAR msg_buffer[8192];
wlen = FormatMessageW(FORMAT_MESSAGE_FROM_STRING, msg, 0, 0, msg_buffer,
- sizeof(msg_buffer)/sizeof(*msg_buffer), &va_args);
+ ARRAY_SIZE(msg_buffer), &va_args);
ret = WriteConsoleW(GetStdHandle(STD_OUTPUT_HANDLE), msg_buffer, wlen, &count,
NULL);
if (!ret)
@@ -92,8 +92,7 @@ static int WINAPIV taskkill_message_printfW(int msg, ...)
WCHAR msg_buffer[8192];
int len;
- LoadStringW(GetModuleHandleW(NULL), msg, msg_buffer,
- sizeof(msg_buffer)/sizeof(WCHAR));
+ LoadStringW(GetModuleHandleW(NULL), msg, msg_buffer, ARRAY_SIZE(msg_buffer));
__ms_va_start(va_args, msg);
len = taskkill_vprintfW(msg_buffer, va_args);
@@ -107,8 +106,7 @@ static int taskkill_message(int msg)
static const WCHAR formatW[] = {'%','1',0};
WCHAR msg_buffer[8192];
- LoadStringW(GetModuleHandleW(NULL), msg, msg_buffer,
- sizeof(msg_buffer)/sizeof(WCHAR));
+ LoadStringW(GetModuleHandleW(NULL), msg, msg_buffer, ARRAY_SIZE(msg_buffer));
return taskkill_printfW(formatW, msg_buffer);
}
diff --git a/media/doc/README.WINE b/media/doc/README.WINE
index 518cef18c2..d5c5983ad4 100644
--- a/media/doc/README.WINE
+++ b/media/doc/README.WINE
@@ -229,7 +229,7 @@ ReactOS shares the following programs with Winehq.
reactos/base/applications/cmdutils/cscript # Synced to WineStaging-3.17
reactos/base/applications/cmdutils/reg # Synced to WineStaging-3.17
reactos/base/applications/cmdutils/schtasks # Synced to WineStaging-3.3
-reactos/base/applications/cmdutils/taskkill # Synced to WineStaging-3.3
+reactos/base/applications/cmdutils/taskkill # Synced to WineStaging-3.17
reactos/base/applications/cmdutils/wmic # Synced to WineStaging-3.3
reactos/base/applications/cmdutils/wscript # Synced to WineStaging-3.17
reactos/base/applications/cmdutils/xcopy # Synced to WineStaging-3.3