Alexandre Julliard : taskschd: Build with msvcrt.

Alexandre Julliard julliard at winehq.org
Mon Jun 24 16:06:21 CDT 2019


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

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Mon Jun 24 10:10:24 2019 +0200

taskschd: Build with msvcrt.

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

---

 dlls/taskschd/Makefile.in         |  2 ++
 dlls/taskschd/folder.c            | 21 ++++++++++-----------
 dlls/taskschd/folder_collection.c |  1 -
 dlls/taskschd/regtask.c           |  3 +--
 dlls/taskschd/task.c              |  7 +++----
 dlls/taskschd/taskschd_private.h  |  3 +--
 6 files changed, 17 insertions(+), 20 deletions(-)

diff --git a/dlls/taskschd/Makefile.in b/dlls/taskschd/Makefile.in
index c6df2a3..8d12fed 100644
--- a/dlls/taskschd/Makefile.in
+++ b/dlls/taskschd/Makefile.in
@@ -1,6 +1,8 @@
 MODULE    = taskschd.dll
 IMPORTS   = oleaut32 ole32 advapi32 xmllite rpcrt4
 
+EXTRADLLFLAGS = -mno-cygwin
+
 C_SRCS = \
 	folder.c \
 	folder_collection.c \
diff --git a/dlls/taskschd/folder.c b/dlls/taskschd/folder.c
index 26993ca..eea404a 100644
--- a/dlls/taskschd/folder.c
+++ b/dlls/taskschd/folder.c
@@ -28,7 +28,6 @@
 #include "schrpc.h"
 #include "taskschd_private.h"
 
-#include "wine/unicode.h"
 #include "wine/debug.h"
 
 WINE_DEFAULT_DEBUG_CHANNEL(taskschd);
@@ -122,7 +121,7 @@ static HRESULT WINAPI TaskFolder_get_Name(ITaskFolder *iface, BSTR *name)
 
     if (!name) return E_POINTER;
 
-    p_name = strrchrW(folder->path, '\\');
+    p_name = wcsrchr(folder->path, '\\');
     if (!p_name)
         p_name = folder->path;
     else
@@ -208,9 +207,9 @@ WCHAR *get_full_path(const WCHAR *parent, const WCHAR *path)
     WCHAR *folder_path;
     int len = 0;
 
-    if (path) len = strlenW(path);
+    if (path) len = lstrlenW(path);
 
-    if (parent) len += strlenW(parent);
+    if (parent) len += lstrlenW(parent);
 
     /* +1 if parent is not '\' terminated */
     folder_path = heap_alloc((len + 2) * sizeof(WCHAR));
@@ -219,21 +218,21 @@ WCHAR *get_full_path(const WCHAR *parent, const WCHAR *path)
     folder_path[0] = 0;
 
     if (parent)
-        strcpyW(folder_path, parent);
+        lstrcpyW(folder_path, parent);
 
     if (path && *path)
     {
-        len = strlenW(folder_path);
+        len = lstrlenW(folder_path);
         if (!len || folder_path[len - 1] != '\\')
-            strcatW(folder_path, bslash);
+            lstrcatW(folder_path, bslash);
 
         while (*path == '\\') path++;
-        strcatW(folder_path, path);
+        lstrcatW(folder_path, path);
     }
 
-    len = strlenW(folder_path);
+    len = lstrlenW(folder_path);
     if (!len)
-        strcatW(folder_path, bslash);
+        lstrcatW(folder_path, bslash);
 
     return folder_path;
 }
@@ -416,7 +415,7 @@ HRESULT TaskFolder_create(const WCHAR *parent, const WCHAR *path, ITaskFolder **
 
     if (path)
     {
-        int len = strlenW(path);
+        int len = lstrlenW(path);
         if (len && path[len - 1] == '\\') return HRESULT_FROM_WIN32(ERROR_INVALID_NAME);
     }
 
diff --git a/dlls/taskschd/folder_collection.c b/dlls/taskschd/folder_collection.c
index 0b2b513..394210d 100644
--- a/dlls/taskschd/folder_collection.c
+++ b/dlls/taskschd/folder_collection.c
@@ -27,7 +27,6 @@
 #include "schrpc.h"
 #include "taskschd_private.h"
 
-#include "wine/unicode.h"
 #include "wine/debug.h"
 
 WINE_DEFAULT_DEBUG_CHANNEL(taskschd);
diff --git a/dlls/taskschd/regtask.c b/dlls/taskschd/regtask.c
index 74f95d9..b5d7269 100644
--- a/dlls/taskschd/regtask.c
+++ b/dlls/taskschd/regtask.c
@@ -28,7 +28,6 @@
 #include "schrpc.h"
 #include "taskschd_private.h"
 
-#include "wine/unicode.h"
 #include "wine/debug.h"
 
 WINE_DEFAULT_DEBUG_CHANNEL(taskschd);
@@ -124,7 +123,7 @@ static HRESULT WINAPI regtask_get_Name(IRegisteredTask *iface, BSTR *name)
 
     if (!name) return E_POINTER;
 
-    p_name = strrchrW(regtask->path, '\\');
+    p_name = wcsrchr(regtask->path, '\\');
     if (!p_name)
         p_name = regtask->path;
     else
diff --git a/dlls/taskschd/task.c b/dlls/taskschd/task.c
index 54b6782..b75cfff 100644
--- a/dlls/taskschd/task.c
+++ b/dlls/taskschd/task.c
@@ -30,7 +30,6 @@
 #include "schrpc.h"
 #include "taskschd_private.h"
 
-#include "wine/unicode.h"
 #include "wine/debug.h"
 
 WINE_DEFAULT_DEBUG_CHANNEL(taskschd);
@@ -2919,7 +2918,7 @@ static HRESULT read_int_value(IXmlReader *reader, int *int_val)
     hr = read_text_value(reader, &value);
     if (hr != S_OK) return hr;
 
-    *int_val = strtolW(value, NULL, 10);
+    *int_val = wcstol(value, NULL, 10);
 
     return S_OK;
 }
@@ -3871,7 +3870,7 @@ static HRESULT WINAPI TaskService_Connect(ITaskService *iface, VARIANT server, V
         if (server_name[0] == '\\' && server_name[1] == '\\')
             server_name += 2;
 
-        if (strcmpiW(server_name, comp_name))
+        if (wcsicmp(server_name, comp_name))
         {
             FIXME("connection to remote server %s is not supported\n", debugstr_w(V_BSTR(&server)));
             return HRESULT_FROM_WIN32(ERROR_BAD_NETPATH);
@@ -3893,7 +3892,7 @@ static HRESULT WINAPI TaskService_Connect(ITaskService *iface, VARIANT server, V
 
     TRACE("server version %#x\n", task_svc->version);
 
-    strcpyW(task_svc->comp_name, comp_name);
+    lstrcpyW(task_svc->comp_name, comp_name);
     task_svc->connected = TRUE;
 
     return S_OK;
diff --git a/dlls/taskschd/taskschd_private.h b/dlls/taskschd/taskschd_private.h
index 6c7f916..accbc76 100644
--- a/dlls/taskschd/taskschd_private.h
+++ b/dlls/taskschd/taskschd_private.h
@@ -19,7 +19,6 @@
 #ifndef __WINE_TASKSCHD_PRIVATE_H__
 #define __WINE_TASKSCHD_PRIVATE_H__
 
-#include "wine/unicode.h"
 #include "wine/heap.h"
 
 HRESULT TaskService_create(void **obj) DECLSPEC_HIDDEN;
@@ -37,7 +36,7 @@ static inline WCHAR *heap_strdupW(const WCHAR *src)
     WCHAR *dst;
     unsigned len;
     if (!src) return NULL;
-    len = (strlenW(src) + 1) * sizeof(WCHAR);
+    len = (lstrlenW(src) + 1) * sizeof(WCHAR);
     if ((dst = heap_alloc(len))) memcpy(dst, src, len);
     return dst;
 }




More information about the wine-cvs mailing list