mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-01-28 22:04:43 -08:00
combase-WindowsCompareStringOrdinal: Update patch to implement the function on top of CompareStringOrdinal, as suggested by Michael Müller.
This commit is contained in:
parent
9f61fece0e
commit
3f2d26547d
@ -1,13 +1,14 @@
|
||||
From 390bb740e27741df384d19e78cffa128e997d4f3 Mon Sep 17 00:00:00 2001
|
||||
From 70e8a8c08aa3ef0ac48d267d5917f998f4f09b16 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Sat, 16 Jan 2016 16:12:47 +0100
|
||||
Subject: combase: Implement WindowsCompareStringOrdinal.
|
||||
Subject: combase: Implement WindowsCompareStringOrdinal. (v2)
|
||||
|
||||
---
|
||||
.../api-ms-win-core-winrt-string-l1-1-0.spec | 2 +-
|
||||
dlls/combase/combase.spec | 2 +-
|
||||
dlls/combase/string.c | 33 ++++++++++++++++++++++
|
||||
3 files changed, 35 insertions(+), 2 deletions(-)
|
||||
include/winnls.h | 1 +
|
||||
4 files changed, 36 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dlls/api-ms-win-core-winrt-string-l1-1-0/api-ms-win-core-winrt-string-l1-1-0.spec b/dlls/api-ms-win-core-winrt-string-l1-1-0/api-ms-win-core-winrt-string-l1-1-0.spec
|
||||
index fa048d8..1b661aa 100644
|
||||
@ -36,7 +37,7 @@ index 5082f39..430ca95 100644
|
||||
@ stdcall WindowsCreateString(wstr long ptr)
|
||||
@ stdcall WindowsCreateStringReference(wstr long ptr ptr)
|
||||
diff --git a/dlls/combase/string.c b/dlls/combase/string.c
|
||||
index dd7c8e9..1d49c4b 100644
|
||||
index dd7c8e9..bd18a73 100644
|
||||
--- a/dlls/combase/string.c
|
||||
+++ b/dlls/combase/string.c
|
||||
@@ -372,3 +372,36 @@ BOOL WINAPI WindowsIsStringEmpty(HSTRING str)
|
||||
@ -73,9 +74,21 @@ index dd7c8e9..1d49c4b 100644
|
||||
+ buf2 = priv2->buffer;
|
||||
+ len2 = priv2->length;
|
||||
+ }
|
||||
+ *res = CompareStringEx(NULL, 0, buf1, len1, buf2, len2, NULL, NULL, 0) - CSTR_EQUAL;
|
||||
+ *res = CompareStringOrdinal(buf1, len1, buf2, len2, FALSE) - CSTR_EQUAL;
|
||||
+ return S_OK;
|
||||
+}
|
||||
diff --git a/include/winnls.h b/include/winnls.h
|
||||
index 4b4eb77..0370572 100644
|
||||
--- a/include/winnls.h
|
||||
+++ b/include/winnls.h
|
||||
@@ -831,6 +831,7 @@ WINBASEAPI INT WINAPI CompareStringA(LCID,DWORD,LPCSTR,INT,LPCSTR,INT);
|
||||
WINBASEAPI INT WINAPI CompareStringW(LCID,DWORD,LPCWSTR,INT,LPCWSTR,INT);
|
||||
#define CompareString WINELIB_NAME_AW(CompareString)
|
||||
WINBASEAPI INT WINAPI CompareStringEx(LPCWSTR,DWORD,LPCWSTR,INT,LPCWSTR,INT,LPNLSVERSIONINFO,LPVOID,LPARAM);
|
||||
+WINBASEAPI INT WINAPI CompareStringOrdinal(const WCHAR *,INT,const WCHAR *,INT,BOOL);
|
||||
WINBASEAPI LCID WINAPI ConvertDefaultLocale(LCID);
|
||||
WINBASEAPI BOOL WINAPI EnumCalendarInfoA(CALINFO_ENUMPROCA,LCID,CALID,CALTYPE);
|
||||
WINBASEAPI BOOL WINAPI EnumCalendarInfoW(CALINFO_ENUMPROCW,LCID,CALID,CALTYPE);
|
||||
--
|
||||
2.6.4
|
||||
|
||||
|
@ -2565,13 +2565,13 @@ fi
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/api-ms-win-core-winrt-string-l1-1-0/api-ms-win-core-winrt-string-l1-1-0.spec, dlls/combase/combase.spec,
|
||||
# | dlls/combase/string.c, dlls/combase/tests/string.c
|
||||
# | dlls/combase/string.c, dlls/combase/tests/string.c, include/winnls.h
|
||||
# |
|
||||
if test "$enable_combase_WindowsCompareStringOrdinal" -eq 1; then
|
||||
patch_apply combase-WindowsCompareStringOrdinal/0001-combase-Implement-WindowsCompareStringOrdinal.patch
|
||||
patch_apply combase-WindowsCompareStringOrdinal/0002-combase-tests-Add-tests-for-WindowsCompareStringOrdi.patch
|
||||
(
|
||||
echo '+ { "Sebastian Lackner", "combase: Implement WindowsCompareStringOrdinal.", 1 },';
|
||||
echo '+ { "Sebastian Lackner", "combase: Implement WindowsCompareStringOrdinal.", 2 },';
|
||||
echo '+ { "Sebastian Lackner", "combase/tests: Add tests for WindowsCompareStringOrdinal.", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
Loading…
x
Reference in New Issue
Block a user