Commit 6abf99b4 authored by Alexandre Julliard's avatar Alexandre Julliard

ntdll: Use the current platform as processorArchitecture instead of a wildcard.

parent d0727dec
......@@ -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 );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment