Alexandre Julliard : msiexec: Build with msvcrt.

Alexandre Julliard julliard at winehq.org
Tue Apr 30 15:59:55 CDT 2019


Module: wine
Branch: master
Commit: 8dff0e34452f4874873c91a7ec3b92a7cf1c3e16
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=8dff0e34452f4874873c91a7ec3b92a7cf1c3e16

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Mon Apr 29 12:10:09 2019 +0200

msiexec: Build with msvcrt.

Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 programs/msiexec/Makefile.in |  3 ++-
 programs/msiexec/msiexec.c   | 11 +++++------
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/programs/msiexec/Makefile.in b/programs/msiexec/Makefile.in
index 6d0cf9a..e82acc0 100644
--- a/programs/msiexec/Makefile.in
+++ b/programs/msiexec/Makefile.in
@@ -1,7 +1,8 @@
 MODULE    = msiexec.exe
-APPMODE   = -mwindows
 IMPORTS   = msi ole32 advapi32 user32
 
+EXTRADLLFLAGS = -mwindows -mno-cygwin
+
 C_SRCS = \
 	msiexec.c \
 	service.c
diff --git a/programs/msiexec/msiexec.c b/programs/msiexec/msiexec.c
index 3340ade..17d4bf8 100644
--- a/programs/msiexec/msiexec.c
+++ b/programs/msiexec/msiexec.c
@@ -29,7 +29,6 @@
 
 #include "wine/debug.h"
 #include "wine/heap.h"
-#include "wine/unicode.h"
 
 #include "initguid.h"
 DEFINE_GUID(GUID_NULL,0,0,0,0,0,0,0,0,0,0,0);
@@ -92,7 +91,7 @@ static void ShowUsage(int ExitCode)
         *msi_res = 0;
         LoadStringW(hmsi, 10, msi_res, len + 1);
 
-        sprintfW(msiexec_help, msi_res, msiexec_version);
+        swprintf(msiexec_help, len + 1 + ARRAY_SIZE(msiexec_version), msi_res, msiexec_version);
         MsiMessageBoxW(0, msiexec_help, NULL, 0, GetUserDefaultLangID(), 0);
     }
     HeapFree(GetProcessHeap(), 0, msi_res);
@@ -153,7 +152,7 @@ static LPWSTR build_properties(struct string_list *property_list)
 	p = ret;
 	for(list = property_list; list; list = list->next)
 	{
-		value = strchrW(list->str,'=');
+		value = wcschr(list->str,'=');
 		if(!value)
 			continue;
 		len = value - list->str;
@@ -164,7 +163,7 @@ static LPWSTR build_properties(struct string_list *property_list)
 
 		/* check if the value contains spaces and maybe quote it */
 		value++;
-		needs_quote = strchrW(value,' ') ? 1 : 0;
+		needs_quote = wcschr(value,' ') ? 1 : 0;
 		if(needs_quote)
 			*p++ = '"';
 		len = lstrlenW(value);
@@ -420,13 +419,13 @@ static int custom_action_server(const WCHAR *arg)
 
     TRACE("%s\n", debugstr_w(arg));
 
-    if (!(client_pid = atoiW(arg)))
+    if (!(client_pid = wcstol(arg, NULL, 10)))
     {
         ERR("Invalid parameter %s\n", debugstr_w(arg));
         return 1;
     }
 
-    sprintfW(buffer, pipe_name, client_pid, sizeof(void *) * 8);
+    swprintf(buffer, ARRAY_SIZE(buffer), pipe_name, client_pid, sizeof(void *) * 8);
     pipe = CreateFileW(buffer, GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL);
     if (pipe == INVALID_HANDLE_VALUE)
     {




More information about the wine-cvs mailing list