Alexandre Julliard : ntdll: Use the current platform as processorArchitecture instead of a wildcard.
Alexandre Julliard
julliard at winehq.org
Tue Feb 12 16:36:36 CST 2019
Module: wine
Branch: master
Commit: 6abf99b4803003812d4fcf7bf9effc99030cbec9
URL: https://source.winehq.org/git/wine.git/?a=commit;h=6abf99b4803003812d4fcf7bf9effc99030cbec9
Author: Alexandre Julliard <julliard at winehq.org>
Date: Tue Feb 12 10:59:39 2019 +0100
ntdll: Use the current platform as processorArchitecture instead of a wildcard.
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/ntdll/actctx.c | 19 ++++++++++++++++---
1 file changed, 16 insertions(+), 3 deletions(-)
diff --git a/dlls/ntdll/actctx.c b/dlls/ntdll/actctx.c
index 08b6c50..ee1f764 100644
--- a/dlls/ntdll/actctx.c
+++ b/dlls/ntdll/actctx.c
@@ -570,6 +570,18 @@ struct actctx_loader
static const xmlstr_t empty_xmlstr;
+#ifdef __i386__
+static const WCHAR current_archW[] = {'x','8','6',0};
+#elif defined __x86_64__
+static const WCHAR current_archW[] = {'a','m','d','6','4',0};
+#elif defined __arm__
+static const WCHAR current_archW[] = {'a','r','m',0};
+#elif defined __aarch64__
+static const WCHAR current_archW[] = {'a','r','m','6','4',0};
+#else
+static const WCHAR current_archW[] = {'n','o','n','e',0};
+#endif
+
static const WCHAR asmv1W[] = {'u','r','n',':','s','c','h','e','m','a','s','-','m','i','c','r','o','s','o','f','t','-','c','o','m',':','a','s','m','.','v','1',0};
static const WCHAR asmv2W[] = {'u','r','n',':','s','c','h','e','m','a','s','-','m','i','c','r','o','s','o','f','t','-','c','o','m',':','a','s','m','.','v','2',0};
static const WCHAR asmv3W[] = {'u','r','n',':','s','c','h','e','m','a','s','-','m','i','c','r','o','s','o','f','t','-','c','o','m',':','a','s','m','.','v','3',0};
@@ -2197,6 +2209,7 @@ static void parse_dependent_assembly_elem( xmlbuf_t *xmlbuf, struct actctx_loade
{
parse_assembly_identity_elem(xmlbuf, acl->actctx, &ai, &elem);
/* store the newly found identity for later loading */
+ if (ai.arch && !strcmpW(ai.arch, wildcardW)) ai.arch = strdupW( current_archW );
TRACE( "adding name=%s version=%s arch=%s\n",
debugstr_w(ai.name), debugstr_version(&ai.version), debugstr_w(ai.arch) );
if (!add_dependent_assembly_id(acl, &ai)) set_error( xmlbuf );
@@ -3086,13 +3099,13 @@ static WCHAR *lookup_manifest_file( HANDLE dir, struct assembly_identity *ai )
unsigned int data_pos = 0, data_len;
char buffer[8192];
+ if (!lang || !strcmpiW( lang, neutralW )) lang = wildcardW;
+
if (!(lookup = RtlAllocateHeap( GetProcessHeap(), 0,
(strlenW(ai->arch) + strlenW(ai->name)
- + strlenW(ai->public_key) + 20) * sizeof(WCHAR)
+ + strlenW(ai->public_key) + strlenW(lang) + 20) * sizeof(WCHAR)
+ sizeof(lookup_fmtW) )))
return NULL;
-
- if (!lang || !strcmpiW( lang, neutralW )) lang = wildcardW;
sprintfW( lookup, lookup_fmtW, ai->arch, ai->name, ai->public_key,
ai->version.major, ai->version.minor, lang );
RtlInitUnicodeString( &lookup_us, lookup );
More information about the wine-cvs
mailing list