Wine-Devel
By thread
wine-devel@list.winehq.org
By month
Messages by month
- ----- 2026 -----
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2005 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2004 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2003 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2002 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2001 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
February 2020
- 80 participants
- 2095 messages
[PATCH] ucrtbase: added function implementation for get_FMA3_enable
by daxcore
replaced the stub with a real implementation for FMA3
Proton-Bug: https://github.com/ValveSoftware/Proton/issues/3227
---
.../api-ms-win-crt-math-l1-1-0.spec | 2 +-
dlls/msvcr120/msvcr120.spec | 1 +
dlls/msvcrt/math.c | 14 ++++++++++++++
dlls/ucrtbase/ucrtbase.spec | 2 +-
4 files changed, 17 insertions(+), 2 deletions(-)
diff --git a/dlls/api-ms-win-crt-math-l1-1-0/api-ms-win-crt-math-l1-1-0.spec b/dlls/api-ms-win-crt-math-l1-1-0/api-ms-win-crt-math-l1-1-0.spec
index cb8fdc9227..579b97fee3 100644
--- a/dlls/api-ms-win-crt-math-l1-1-0/api-ms-win-crt-math-l1-1-0.spec
+++ b/dlls/api-ms-win-crt-math-l1-1-0/api-ms-win-crt-math-l1-1-0.spec
@@ -81,7 +81,7 @@
@ cdecl _fpclass(double) ucrtbase._fpclass
@ stub _fpclassf
@ cdecl -arch=i386 -ret64 _ftol() ucrtbase._ftol
-@ stub _get_FMA3_enable
+@ cdecl -arch=win64 _get_FMA3_enable() ucrtbase._get_FMA3_enable
@ cdecl _hypot(double double) ucrtbase._hypot
@ cdecl _hypotf(float float) ucrtbase._hypotf
@ cdecl _isnan(double) ucrtbase._isnan
diff --git a/dlls/msvcr120/msvcr120.spec b/dlls/msvcr120/msvcr120.spec
index 903f4b7ce3..1016f6a649 100644
--- a/dlls/msvcr120/msvcr120.spec
+++ b/dlls/msvcr120/msvcr120.spec
@@ -1639,6 +1639,7 @@
@ stdcall -arch=i386 _seh_longjmp_unwind4(ptr)
@ stdcall -arch=i386 _seh_longjmp_unwind(ptr)
@ cdecl -arch=i386 _set_SSE2_enable(long) MSVCRT__set_SSE2_enable
+@ cdecl -arch=win64 _get_FMA3_enable() MSVCRT__get_FMA3_enable
@ cdecl -arch=win64 _set_FMA3_enable(long) MSVCRT__set_FMA3_enable
@ cdecl _set_abort_behavior(long long) MSVCRT__set_abort_behavior
@ cdecl _set_controlfp(long long)
diff --git a/dlls/msvcrt/math.c b/dlls/msvcrt/math.c
index f6824128cd..80e73ccefe 100644
--- a/dlls/msvcrt/math.c
+++ b/dlls/msvcrt/math.c
@@ -118,6 +118,20 @@ int CDECL MSVCRT__set_SSE2_enable(int flag)
}
#if defined(_WIN64) && _MSVCR_VER>=120
+/*********************************************************************
+ * _get_FMA3_enable (MSVCR120.@)
+ */
+int CDECL MSVCRT__get_FMA3_enable(void)
+{
+ #if !defined(__FMA__) && defined(__AVX2__)
+ #define __FMA__ 1
+ #endif
+ #if defined(__FMA__)
+ return 1;
+ #endif
+ return 0;
+}
+
/*********************************************************************
* _set_FMA3_enable (MSVCR120.@)
*/
diff --git a/dlls/ucrtbase/ucrtbase.spec b/dlls/ucrtbase/ucrtbase.spec
index 568019da51..6cac7a5ef5 100644
--- a/dlls/ucrtbase/ucrtbase.spec
+++ b/dlls/ucrtbase/ucrtbase.spec
@@ -357,7 +357,7 @@
@ cdecl _fwrite_nolock(ptr long long ptr) MSVCRT__fwrite_nolock
@ cdecl _gcvt(double long str) MSVCRT__gcvt
@ cdecl _gcvt_s(ptr long double long) MSVCRT__gcvt_s
-@ stub _get_FMA3_enable
+@ cdecl -arch=win64 _get_FMA3_enable() MSVCRT__get_FMA3_enable
@ cdecl _get_current_locale() MSVCRT__get_current_locale
@ cdecl _get_daylight(ptr)
@ cdecl _get_doserrno(ptr)
--
2.25.0
Feb. 1, 2020
[PATCH] advapi32: Fix the name and use of DOMAIN_GROUP_RID_USERS.
by Zebediah Figura
From: Qian Hong <qhong(a)codeweavers.com>
Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com>
---
I know of no application that requires this.
The patch was originally sent as part of a set in which some patches were
labeled as for Cygwin:
https://www.winehq.org/pipermail/wine-patches/2015-April/138518.html
However, Cygwin is currently too broken in Wine to test.
dlls/advapi32/security.c | 5 +++--
dlls/advapi32/tests/security.c | 4 ++--
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/dlls/advapi32/security.c b/dlls/advapi32/security.c
index a7707f15d39..700ee7d8eae 100644
--- a/dlls/advapi32/security.c
+++ b/dlls/advapi32/security.c
@@ -187,7 +187,7 @@ static const WCHAR Domain_Admins[] = { 'D','o','m','a','i','n',' ','A','d','m','
static const WCHAR Domain_Computers[] = { 'D','o','m','a','i','n',' ','C','o','m','p','u','t','e','r','s',0 };
static const WCHAR Domain_Controllers[] = { 'D','o','m','a','i','n',' ','C','o','n','t','r','o','l','l','e','r','s',0 };
static const WCHAR Domain_Guests[] = { 'D','o','m','a','i','n',' ','G','u','e','s','t','s',0 };
-static const WCHAR Domain_Users[] = { 'D','o','m','a','i','n',' ','U','s','e','r','s',0 };
+static const WCHAR None[] = { 'N','o','n','e',0 };
static const WCHAR Enterprise_Admins[] = { 'E','n','t','e','r','p','r','i','s','e',' ','A','d','m','i','n','s',0 };
static const WCHAR ENTERPRISE_DOMAIN_CONTROLLERS[] = { 'E','N','T','E','R','P','R','I','S','E',' ','D','O','M','A','I','N',' ','C','O','N','T','R','O','L','L','E','R','S',0 };
static const WCHAR Everyone[] = { 'E','v','e','r','y','o','n','e',0 };
@@ -1185,7 +1185,8 @@ LookupAccountSidW(
ac = Domain_Admins;
break;
case DOMAIN_GROUP_RID_USERS:
- ac = Domain_Users;
+ ac = None;
+ use = SidTypeGroup;
break;
case DOMAIN_GROUP_RID_GUESTS:
ac = Domain_Guests;
diff --git a/dlls/advapi32/tests/security.c b/dlls/advapi32/tests/security.c
index 6d73300c1d4..afcdb6328e0 100644
--- a/dlls/advapi32/tests/security.c
+++ b/dlls/advapi32/tests/security.c
@@ -2928,11 +2928,11 @@ static void test_process_security(void)
dom_size = sizeof(domain);
ret = LookupAccountSidA( NULL, UsersSid, account, &acc_size, domain, &dom_size, &use );
ok(ret, "LookupAccountSid failed with %d\n", ret);
- todo_wine ok(use == SidTypeGroup, "expect SidTypeGroup, got %d\n", use);
+ ok(use == SidTypeGroup, "expect SidTypeGroup, got %d\n", use);
if (PRIMARYLANGID(GetSystemDefaultLangID()) != LANG_ENGLISH)
skip("Non-English locale (test with hardcoded 'None')\n");
else
- todo_wine ok(!strcmp(account, "None"), "expect None, got %s\n", account);
+ ok(!strcmp(account, "None"), "expect None, got %s\n", account);
res = GetTokenInformation( token, TokenUser, NULL, 0, &size );
ok(!res, "Expected failure, got %d\n", res);
--
2.25.0
Feb. 1, 2020
[PATCH 2/2] advapi32: Return the string SID if LookupAccountSid() fails.
by Zebediah Figura
Based on a patch by Qian Hong.
Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com>
---
I know of no application that requires this.
The patch was originally sent as part of a set in which some patches were
labeled as for Cygwin:
https://www.winehq.org/pipermail/wine-patches/2015-April/138518.html
However, Cygwin is currently too broken in Wine to test.
dlls/advapi32/lsa.c | 20 ++++++++++++++++++--
dlls/advapi32/tests/lsa.c | 1 +
2 files changed, 19 insertions(+), 2 deletions(-)
diff --git a/dlls/advapi32/lsa.c b/dlls/advapi32/lsa.c
index ce3a6e94bf9..906beffb036 100644
--- a/dlls/advapi32/lsa.c
+++ b/dlls/advapi32/lsa.c
@@ -29,6 +29,7 @@
#include "winbase.h"
#include "winreg.h"
#include "winternl.h"
+#include "sddl.h"
#include "advapi32_misc.h"
#include "wine/debug.h"
@@ -482,6 +483,7 @@ NTSTATUS WINAPI LsaLookupSids(
WCHAR *name_buffer;
char *domain_data;
SID_NAME_USE use;
+ WCHAR *strsid;
TRACE("(%p, %u, %p, %p, %p)\n", PolicyHandle, Count, Sids, ReferencedDomains, Names);
@@ -557,6 +559,14 @@ NTSTATUS WINAPI LsaLookupSids(
domain.MaximumLength = sizeof(WCHAR);
}
}
+ else if (ConvertSidToStringSidW(Sids[i], &strsid))
+ {
+ (*Names)[i].Name.Length = strlenW(strsid) * sizeof(WCHAR);
+ (*Names)[i].Name.MaximumLength = (strlenW(strsid) + 1) * sizeof(WCHAR);
+ name_fullsize += (strlenW(strsid) + 1) * sizeof(WCHAR);
+
+ LocalFree(strsid);
+ }
}
/* now we have full length needed for both */
@@ -573,6 +583,8 @@ NTSTATUS WINAPI LsaLookupSids(
{
name_size = domain_size = 0;
+ (*Names)[i].Name.Buffer = name_buffer;
+
if (!LookupAccountSidW(NULL, Sids[i], NULL, &name_size, NULL, &domain_size, &use) &&
GetLastError() == ERROR_INSUFFICIENT_BUFFER)
{
@@ -592,15 +604,19 @@ NTSTATUS WINAPI LsaLookupSids(
domain.Buffer = heap_alloc(domain.MaximumLength);
- (*Names)[i].Name.Buffer = name_buffer;
LookupAccountSidW(NULL, Sids[i], (*Names)[i].Name.Buffer, &name_size, domain.Buffer, &domain_size, &use);
(*Names)[i].Use = use;
(*Names)[i].DomainIndex = lsa_reflist_add_domain(*ReferencedDomains, &domain, &domain_data);
heap_free(domain.Buffer);
}
+ else if (ConvertSidToStringSidW(Sids[i], &strsid))
+ {
+ strcpyW((*Names)[i].Name.Buffer, strsid);
+ LocalFree(strsid);
+ }
- name_buffer += name_size;
+ name_buffer += strlenW(name_buffer) + 1;
}
TRACE("mapped %u out of %u\n", mapped, Count);
diff --git a/dlls/advapi32/tests/lsa.c b/dlls/advapi32/tests/lsa.c
index 7b8f6b8e849..57ec8994eb7 100644
--- a/dlls/advapi32/tests/lsa.c
+++ b/dlls/advapi32/tests/lsa.c
@@ -403,6 +403,7 @@ static void test_LsaLookupSids(void)
ok(names[0].Use == SidTypeUnknown, "got type %u\n", names[0].Use);
ok(names[0].DomainIndex == -1, "got index %u\n", names[0].DomainIndex);
+ check_unicode_string(&names[0].Name, L"S-1-1234-5678-1234-5678");
LsaFreeMemory(names);
LsaFreeMemory(list);
--
2.25.0
Feb. 1, 2020
[PATCH 1/2] advapi32/tests: Clean up and expand tests for LsaLookupSids().
by Zebediah Figura
Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com>
---
dlls/advapi32/tests/lsa.c | 83 ++++++++++++++++++++++++---------------
1 file changed, 51 insertions(+), 32 deletions(-)
diff --git a/dlls/advapi32/tests/lsa.c b/dlls/advapi32/tests/lsa.c
index 451bee92e93..7b8f6b8e849 100644
--- a/dlls/advapi32/tests/lsa.c
+++ b/dlls/advapi32/tests/lsa.c
@@ -319,74 +319,93 @@ static void test_LsaLookupNames2(void)
ok(status == STATUS_SUCCESS, "LsaClose() failed, returned 0x%08x\n", status);
}
+static void check_unicode_string_(int line, const LSA_UNICODE_STRING *string, const WCHAR *expect)
+{
+ ok_(__FILE__, line)(string->Length == wcslen(string->Buffer) * sizeof(WCHAR),
+ "expected %u, got %u\n", wcslen(string->Buffer) * sizeof(WCHAR), string->Length);
+ ok_(__FILE__, line)(string->MaximumLength == string->Length + sizeof(WCHAR),
+ "expected %u, got %u\n", string->Length + sizeof(WCHAR), string->MaximumLength);
+ ok_(__FILE__, line)(!wcsicmp(string->Buffer, expect), "expected %s, got %s\n",
+ debugstr_w(expect), debugstr_w(string->Buffer));
+}
+#define check_unicode_string(a, b) check_unicode_string_(__LINE__, a, b)
+
static void test_LsaLookupSids(void)
{
+ char user_buffer[64];
+ LSA_OBJECT_ATTRIBUTES attrs = {.Length = sizeof(attrs)};
+ TOKEN_USER *user = (TOKEN_USER *)user_buffer;
+ WCHAR computer_name[64], user_name[64];
LSA_REFERENCED_DOMAIN_LIST *list;
- LSA_OBJECT_ATTRIBUTES attrs;
LSA_TRANSLATED_NAME *names;
LSA_HANDLE policy;
- TOKEN_USER *user;
NTSTATUS status;
HANDLE token;
DWORD size;
BOOL ret;
PSID sid;
- memset(&attrs, 0, sizeof(attrs));
- attrs.Length = sizeof(attrs);
-
status = LsaOpenPolicy(NULL, &attrs, POLICY_LOOKUP_NAMES, &policy);
ok(status == STATUS_SUCCESS, "got 0x%08x\n", status);
ret = OpenProcessToken(GetCurrentProcess(), MAXIMUM_ALLOWED, &token);
- ok(ret, "got %d\n", ret);
+ ok(ret, "OpenProcessToken() failed, error %u\n", GetLastError());
+
+ ret = GetTokenInformation(token, TokenUser, user, sizeof(user_buffer), &size);
+ ok(ret, "GetTokenInformation() failed, error %u\n", GetLastError());
- ret = GetTokenInformation(token, TokenUser, NULL, 0, &size);
- ok(!ret, "got %d\n", ret);
+ size = ARRAY_SIZE(computer_name);
+ ret = GetComputerNameW(computer_name, &size);
+ ok(ret, "GetComputerName() failed, error %u\n", GetLastError());
- user = HeapAlloc(GetProcessHeap(), 0, size);
- ret = GetTokenInformation(token, TokenUser, user, size, &size);
- ok(ret, "got %d\n", ret);
+ size = ARRAY_SIZE(user_name);
+ ret = GetUserNameW(user_name, &size);
+ ok(ret, "GetUserName() failed, error %u\n", GetLastError());
status = LsaLookupSids(policy, 1, &user->User.Sid, &list, &names);
ok(status == STATUS_SUCCESS, "got 0x%08x\n", status);
- ok(list->Entries > 0, "got %d\n", list->Entries);
- if (list->Entries)
- {
- ok((char*)list->Domains - (char*)list > 0, "%p, %p\n", list, list->Domains);
- ok((char*)list->Domains[0].Sid - (char*)list->Domains > 0, "%p, %p\n", list->Domains, list->Domains[0].Sid);
- ok(list->Domains[0].Name.MaximumLength > list->Domains[0].Name.Length, "got %d, %d\n", list->Domains[0].Name.MaximumLength,
- list->Domains[0].Name.Length);
- }
+ ok(list->Entries == 1, "got %d\n", list->Entries);
+ check_unicode_string(&list->Domains[0].Name, computer_name);
+
+ ok(names[0].Use == SidTypeUser, "got type %u\n", names[0].Use);
+ ok(!names[0].DomainIndex, "got index %u\n", names[0].DomainIndex);
+ check_unicode_string(&names[0].Name, user_name);
LsaFreeMemory(names);
LsaFreeMemory(list);
-
- HeapFree(GetProcessHeap(), 0, user);
-
CloseHandle(token);
ret = ConvertStringSidToSidA("S-1-1-0", &sid);
- ok(ret == TRUE, "ConvertStringSidToSidA returned false\n");
+ ok(ret, "ConvertStringSidToSidA() failed, error %u\n", GetLastError());
status = LsaLookupSids(policy, 1, &sid, &list, &names);
ok(status == STATUS_SUCCESS, "got 0x%08x\n", status);
- ok(list->Entries > 0, "got %d\n", list->Entries);
+ ok(list->Entries == 1, "got %d\n", list->Entries);
+ check_unicode_string(&list->Domains[0].Name, L"");
- if (list->Entries)
- {
- ok((char*)list->Domains - (char*)list > 0, "%p, %p\n", list, list->Domains);
- ok((char*)list->Domains[0].Sid - (char*)list->Domains > 0, "%p, %p\n", list->Domains, list->Domains[0].Sid);
- ok(list->Domains[0].Name.MaximumLength > list->Domains[0].Name.Length, "got %d, %d\n", list->Domains[0].Name.MaximumLength,
- list->Domains[0].Name.Length);
- ok(list->Domains[0].Name.Buffer != NULL, "domain[0] name buffer is null\n");
- }
+ ok(names[0].Use == SidTypeWellKnownGroup, "got type %u\n", names[0].Use);
+ ok(!names[0].DomainIndex, "got index %u\n", names[0].DomainIndex);
+ check_unicode_string(&names[0].Name, L"Everyone");
LsaFreeMemory(names);
LsaFreeMemory(list);
+ FreeSid(sid);
+
+ ret = ConvertStringSidToSidA("S-1-1234-5678-1234-5678", &sid);
+ ok(ret, "ConvertStringSidToSidA() failed, error %u\n", GetLastError());
+ status = LsaLookupSids(policy, 1, &sid, &list, &names);
+ ok(status == STATUS_NONE_MAPPED, "got 0x%08x\n", status);
+
+ ok(!list->Entries, "got %d\n", list->Entries);
+
+ ok(names[0].Use == SidTypeUnknown, "got type %u\n", names[0].Use);
+ ok(names[0].DomainIndex == -1, "got index %u\n", names[0].DomainIndex);
+
+ LsaFreeMemory(names);
+ LsaFreeMemory(list);
FreeSid(sid);
status = LsaClose(policy);
--
2.25.0
Feb. 1, 2020
Re: [PATCH] wined3d: Fix the spelling of a comment.
by Liam Middlebrook
Signed-off-by: Liam Middlebrook <lmiddlebrook(a)nvidia.com>
On 1/31/20 8:16 AM, Zebediah Figura wrote:
> Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com>
> ---
> dlls/wined3d/surface.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
> index bc220f0cf4..fe8e239dea 100644
> --- a/dlls/wined3d/surface.c
> +++ b/dlls/wined3d/surface.c
> @@ -1031,7 +1031,7 @@ static DWORD raw_blitter_blit(struct wined3d_blitter *blitter, enum wined3d_blit
> DWORD location;
>
> /* If we would need to copy from a renderbuffer or drawable, we'd probably
> - * be better of using the FBO blitter directly, since we'd need to use it
> + * be better off using the FBO blitter directly, since we'd need to use it
> * to copy the resource contents to the texture anyway. */
> if (op != WINED3D_BLIT_OP_RAW_BLIT
> || (src_texture->resource.format->id == dst_texture->resource.format->id
>
-----------------------------------------------------------------------------------
This email message is for the sole use of the intended recipient(s) and may contain
confidential information. Any unauthorized review, use, disclosure or distribution
is prohibited. If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.
-----------------------------------------------------------------------------------
Feb. 1, 2020