opcservices: Build with msvcrt.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alexandre Julliard 2019-11-25 13:30:44 +01:00
parent c6aeabdd2c
commit 8631960745
4 changed files with 12 additions and 14 deletions

View File

@ -1,6 +1,8 @@
MODULE = opcservices.dll MODULE = opcservices.dll
IMPORTS = uuid ole32 advapi32 urlmon xmllite oleaut32 IMPORTS = uuid ole32 advapi32 urlmon xmllite oleaut32
EXTRADLLFLAGS = -mno-cygwin
C_SRCS = \ C_SRCS = \
compress.c \ compress.c \
deflate.c \ deflate.c \

View File

@ -18,8 +18,6 @@
#define COBJMACROS #define COBJMACROS
#include "config.h"
#include <stdarg.h> #include <stdarg.h>
#include "windef.h" #include "windef.h"

View File

@ -26,7 +26,6 @@
#include "wine/debug.h" #include "wine/debug.h"
#include "wine/list.h" #include "wine/list.h"
#include "wine/unicode.h"
#include "opc_private.h" #include "opc_private.h"
@ -732,7 +731,7 @@ static WCHAR *opc_strdupW(const WCHAR *str)
{ {
size_t size; size_t size;
size = (strlenW(str) + 1) * sizeof(WCHAR); size = (lstrlenW(str) + 1) * sizeof(WCHAR);
ret = CoTaskMemAlloc(size); ret = CoTaskMemAlloc(size);
if (ret) if (ret)
memcpy(ret, str, size); memcpy(ret, str, size);
@ -1169,7 +1168,7 @@ static struct opc_relationship *opc_relationshipset_get_rel(struct opc_relations
for (i = 0; i < relationship_set->count; i++) for (i = 0; i < relationship_set->count; i++)
{ {
if (!strcmpW(id, relationship_set->relationships[i]->id)) if (!wcscmp(id, relationship_set->relationships[i]->id))
return relationship_set->relationships[i]; return relationship_set->relationships[i];
} }
@ -1207,7 +1206,7 @@ static HRESULT opc_relationship_create(struct opc_relationship_set *set, const W
/* FIXME: test that generated id is unique */ /* FIXME: test that generated id is unique */
RtlGenRandom(&generated, sizeof(generated)); RtlGenRandom(&generated, sizeof(generated));
sprintfW(relationship->id, fmtW, generated); swprintf(relationship->id, 10, fmtW, generated);
if (opc_relationshipset_get_rel(set, relationship->id)) if (opc_relationshipset_get_rel(set, relationship->id))
{ {
@ -1635,11 +1634,11 @@ static HRESULT opc_package_add_content_type(struct content_types *types, IOpcPar
if (cur->element == CONTENT_TYPE_OVERRIDE) if (cur->element == CONTENT_TYPE_OVERRIDE)
continue; continue;
if (!strcmpiW(cur->u.def.ext, ext)) if (!wcsicmp(cur->u.def.ext, ext))
{ {
added = TRUE; added = TRUE;
if (!strcmpW(cur->u.def.type, content_type)) if (!wcscmp(cur->u.def.type, content_type))
break; break;
hr = opc_package_add_override_content_type(types, part); hr = opc_package_add_override_content_type(types, part);

View File

@ -23,7 +23,6 @@
#include "winbase.h" #include "winbase.h"
#include "wine/debug.h" #include "wine/debug.h"
#include "wine/unicode.h"
#include "opc_private.h" #include "opc_private.h"
@ -467,7 +466,7 @@ static IUri *opc_part_uri_get_rels_uri(IUri *uri)
return NULL; return NULL;
} }
end = strrchrW(path, '/'); end = wcsrchr(path, '/');
if (end && end >= path + ARRAY_SIZE(relsdirW) - 1) if (end && end >= path + ARRAY_SIZE(relsdirW) - 1)
start = end - ARRAY_SIZE(relsdirW) + 1; start = end - ARRAY_SIZE(relsdirW) + 1;
if (!start) if (!start)
@ -476,7 +475,7 @@ static IUri *opc_part_uri_get_rels_uri(IUri *uri)
/* Test if it's already relationships uri. */ /* Test if it's already relationships uri. */
if (len > ARRAY_SIZE(relsextW)) if (len > ARRAY_SIZE(relsextW))
{ {
if (!strcmpW(path + len - ARRAY_SIZE(relsextW) + 1, relsextW)) if (!wcscmp(path + len - ARRAY_SIZE(relsextW) + 1, relsextW))
{ {
if (start && !memcmp(start, relsdirW, ARRAY_SIZE(relsdirW) - sizeof(WCHAR))) if (start && !memcmp(start, relsdirW, ARRAY_SIZE(relsdirW) - sizeof(WCHAR)))
{ {
@ -500,9 +499,9 @@ static IUri *opc_part_uri_get_rels_uri(IUri *uri)
ret[start - path] = 0; ret[start - path] = 0;
} }
strcatW(ret, relsdirW); lstrcatW(ret, relsdirW);
strcatW(ret, end); lstrcatW(ret, end);
strcatW(ret, relsextW); lstrcatW(ret, relsextW);
if (FAILED(hr = CreateUri(ret, Uri_CREATE_ALLOW_RELATIVE, 0, &rels_uri))) if (FAILED(hr = CreateUri(ret, Uri_CREATE_ALLOW_RELATIVE, 0, &rels_uri)))
WARN("Failed to create rels uri, hr %#x.\n", hr); WARN("Failed to create rels uri, hr %#x.\n", hr);