qmgr: Build with msvcrt.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alexandre Julliard 2019-06-19 10:28:11 +02:00
parent bd00160c25
commit d6d38f157a
4 changed files with 11 additions and 10 deletions

View File

@ -1,6 +1,8 @@
MODULE = qmgr.dll MODULE = qmgr.dll
IMPORTS = uuid winhttp ole32 advapi32 IMPORTS = uuid winhttp ole32 advapi32
EXTRADLLFLAGS = -mno-cygwin
C_SRCS = \ C_SRCS = \
enum_files.c \ enum_files.c \
enum_jobs.c \ enum_jobs.c \

View File

@ -459,7 +459,7 @@ static BOOL transfer_file_local(BackgroundCopyFileImpl *file, const WCHAR *tmpna
transitionJobState(job, BG_JOB_STATE_QUEUED, BG_JOB_STATE_TRANSFERRING); transitionJobState(job, BG_JOB_STATE_QUEUED, BG_JOB_STATE_TRANSFERRING);
if (strlenW(file->info.RemoteName) > 7 && !strncmpiW(file->info.RemoteName, fileW, 7)) if (lstrlenW(file->info.RemoteName) > 7 && !wcsnicmp(file->info.RemoteName, fileW, 7))
ptr = file->info.RemoteName + 7; ptr = file->info.RemoteName + 7;
else else
ptr = file->info.RemoteName; ptr = file->info.RemoteName;

View File

@ -599,7 +599,7 @@ static HRESULT WINAPI BackgroundCopyJob_SetDescription(
if (!Val) return E_INVALIDARG; if (!Val) return E_INVALIDARG;
len = strlenW(Val); len = lstrlenW(Val);
if (len > max_description_len) return BG_E_STRING_TOO_LONG; if (len > max_description_len) return BG_E_STRING_TOO_LONG;
EnterCriticalSection(&This->cs); EnterCriticalSection(&This->cs);
@ -612,7 +612,7 @@ static HRESULT WINAPI BackgroundCopyJob_SetDescription(
{ {
HeapFree(GetProcessHeap(), 0, This->description); HeapFree(GetProcessHeap(), 0, This->description);
if ((This->description = HeapAlloc(GetProcessHeap(), 0, (len+1)*sizeof(WCHAR)))) if ((This->description = HeapAlloc(GetProcessHeap(), 0, (len+1)*sizeof(WCHAR))))
strcpyW(This->description, Val); lstrcpyW(This->description, Val);
else else
hr = E_OUTOFMEMORY; hr = E_OUTOFMEMORY;
} }

View File

@ -31,7 +31,6 @@
#include <string.h> #include <string.h>
#include "wine/list.h" #include "wine/list.h"
#include "wine/unicode.h"
/* Background copy job vtbl and related data */ /* Background copy job vtbl and related data */
typedef struct typedef struct
@ -118,15 +117,15 @@ BOOL transitionJobState(BackgroundCopyJobImpl *job, BG_JOB_STATE from, BG_JOB_ST
/* Little helper functions */ /* Little helper functions */
static inline WCHAR *strdupW(const WCHAR *src) static inline WCHAR *strdupW(const WCHAR *src)
{ {
WCHAR *dst = HeapAlloc(GetProcessHeap(), 0, (strlenW(src) + 1) * sizeof(WCHAR)); WCHAR *dst = HeapAlloc(GetProcessHeap(), 0, (lstrlenW(src) + 1) * sizeof(WCHAR));
if (dst) strcpyW(dst, src); if (dst) lstrcpyW(dst, src);
return dst; return dst;
} }
static inline WCHAR *co_strdupW(const WCHAR *src) static inline WCHAR *co_strdupW(const WCHAR *src)
{ {
WCHAR *dst = CoTaskMemAlloc((strlenW(src) + 1) * sizeof(WCHAR)); WCHAR *dst = CoTaskMemAlloc((lstrlenW(src) + 1) * sizeof(WCHAR));
if (dst) strcpyW(dst, src); if (dst) lstrcpyW(dst, src);
return dst; return dst;
} }
@ -136,10 +135,10 @@ static inline HRESULT return_strval(const WCHAR *str, WCHAR **ret)
if (!ret) return E_INVALIDARG; if (!ret) return E_INVALIDARG;
len = strlenW(str); len = lstrlenW(str);
*ret = CoTaskMemAlloc((len+1)*sizeof(WCHAR)); *ret = CoTaskMemAlloc((len+1)*sizeof(WCHAR));
if (!*ret) return E_OUTOFMEMORY; if (!*ret) return E_OUTOFMEMORY;
strcpyW(*ret, str); lstrcpyW(*ret, str);
return S_OK; return S_OK;
} }