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
IMPORTS = uuid ole32 advapi32 urlmon xmllite oleaut32
EXTRADLLFLAGS = -mno-cygwin
C_SRCS = \
compress.c \
deflate.c \

View File

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

View File

@ -26,7 +26,6 @@
#include "wine/debug.h"
#include "wine/list.h"
#include "wine/unicode.h"
#include "opc_private.h"
@ -732,7 +731,7 @@ static WCHAR *opc_strdupW(const WCHAR *str)
{
size_t size;
size = (strlenW(str) + 1) * sizeof(WCHAR);
size = (lstrlenW(str) + 1) * sizeof(WCHAR);
ret = CoTaskMemAlloc(size);
if (ret)
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++)
{
if (!strcmpW(id, relationship_set->relationships[i]->id))
if (!wcscmp(id, relationship_set->relationships[i]->id))
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 */
RtlGenRandom(&generated, sizeof(generated));
sprintfW(relationship->id, fmtW, generated);
swprintf(relationship->id, 10, fmtW, generated);
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)
continue;
if (!strcmpiW(cur->u.def.ext, ext))
if (!wcsicmp(cur->u.def.ext, ext))
{
added = TRUE;
if (!strcmpW(cur->u.def.type, content_type))
if (!wcscmp(cur->u.def.type, content_type))
break;
hr = opc_package_add_override_content_type(types, part);

View File

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