https://git.reactos.org/?p=reactos.git;a=commitdiff;h=5a217e3a6fc26be54ea2d…
commit 5a217e3a6fc26be54ea2dc087cf293be1f87ac10
Author: Amine Khaldi <amine.khaldi(a)reactos.org>
AuthorDate: Mon Oct 1 00:15:34 2018 +0100
Commit: Amine Khaldi <amine.khaldi(a)reactos.org>
CommitDate: Mon Oct 1 00:15:34 2018 +0100
[WMIC] Sync with Wine Staging 3.17. CORE-15127
---
base/applications/cmdutils/wmic/CMakeLists.txt | 1 +
base/applications/cmdutils/wmic/main.c | 6 +++---
media/doc/README.WINE | 2 +-
3 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/base/applications/cmdutils/wmic/CMakeLists.txt
b/base/applications/cmdutils/wmic/CMakeLists.txt
index 8da30f4ec1..0add8850c2 100644
--- a/base/applications/cmdutils/wmic/CMakeLists.txt
+++ b/base/applications/cmdutils/wmic/CMakeLists.txt
@@ -1,4 +1,5 @@
+add_definitions(-D__WINESRC__)
add_executable(wmic main.c wmic.rc)
target_link_libraries(wmic wine)
set_module_type(wmic win32cui UNICODE)
diff --git a/base/applications/cmdutils/wmic/main.c
b/base/applications/cmdutils/wmic/main.c
index ddd2aecd53..f4a5bc74f1 100644
--- a/base/applications/cmdutils/wmic/main.c
+++ b/base/applications/cmdutils/wmic/main.c
@@ -82,7 +82,7 @@ static const WCHAR *find_class( const WCHAR *alias )
{
unsigned int i;
- for (i = 0; i < sizeof(alias_map)/sizeof(alias_map[0]); i++)
+ for (i = 0; i < ARRAY_SIZE(alias_map); i++)
{
if (!strcmpiW( alias, alias_map[i].alias )) return alias_map[i].class;
}
@@ -158,7 +158,7 @@ static int output_message( int msg )
static const WCHAR fmtW[] = {'%','s',0};
WCHAR buffer[8192];
- LoadStringW( GetModuleHandleW(NULL), msg, buffer, sizeof(buffer)/sizeof(WCHAR) );
+ LoadStringW( GetModuleHandleW(NULL), msg, buffer, ARRAY_SIZE(buffer));
return output_string( fmtW, buffer );
}
@@ -193,7 +193,7 @@ static int query_prop( const WCHAR *class, const WCHAR *propname )
hr = IWbemLocator_ConnectServer( locator, path, NULL, NULL, NULL, 0, NULL, NULL,
&services );
if (hr != S_OK) goto done;
- len = strlenW( class ) + sizeof(select_allW) / sizeof(select_allW[0]);
+ len = strlenW( class ) + ARRAY_SIZE(select_allW);
if (!(query = SysAllocStringLen( NULL, len ))) goto done;
strcpyW( query, select_allW );
strcatW( query, class );
diff --git a/media/doc/README.WINE b/media/doc/README.WINE
index d5c5983ad4..487a21882a 100644
--- a/media/doc/README.WINE
+++ b/media/doc/README.WINE
@@ -230,7 +230,7 @@ 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.17
-reactos/base/applications/cmdutils/wmic # Synced to WineStaging-3.3
+reactos/base/applications/cmdutils/wmic # Synced to WineStaging-3.17
reactos/base/applications/cmdutils/wscript # Synced to WineStaging-3.17
reactos/base/applications/cmdutils/xcopy # Synced to WineStaging-3.3
reactos/base/applications/games/winmine # Synced to WineStaging-2.16 with our own
resources.