mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-05 18:29:32 +00:00
DUMMYSTRUCTNAME2 creates a conflict when using anonymous union names.
This commit is contained in:
parent
d45b80386b
commit
5e5c52d477
|
@ -78,7 +78,7 @@ static const IMAGE_RESOURCE_DIRECTORY *find_entry_by_id( const IMAGE_RESOURCE_DI
|
|||
{
|
||||
pos = (min + max) / 2;
|
||||
if (entry[pos].u1.s2.Id == id)
|
||||
return (IMAGE_RESOURCE_DIRECTORY *)((char *)root + entry[pos].u2.s2.OffsetToDirectory);
|
||||
return (IMAGE_RESOURCE_DIRECTORY *)((char *)root + entry[pos].u2.s3.OffsetToDirectory);
|
||||
if (entry[pos].u1.s2.Id > id) max = pos - 1;
|
||||
else min = pos + 1;
|
||||
}
|
||||
|
@ -96,7 +96,7 @@ static const IMAGE_RESOURCE_DIRECTORY *find_entry_default( const IMAGE_RESOURCE_
|
|||
{
|
||||
const IMAGE_RESOURCE_DIRECTORY_ENTRY *entry;
|
||||
entry = (const IMAGE_RESOURCE_DIRECTORY_ENTRY *)(dir + 1);
|
||||
return (IMAGE_RESOURCE_DIRECTORY *)((char *)root + entry->u2.s2.OffsetToDirectory);
|
||||
return (IMAGE_RESOURCE_DIRECTORY *)((char *)root + entry->u2.s3.OffsetToDirectory);
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
|
@ -447,7 +447,7 @@ static HRESULT ICO_ExtractIconExW(
|
|||
const IMAGE_RESOURCE_DIRECTORY *resdir;
|
||||
|
||||
/* go down this resource entry, name */
|
||||
resdir = (PIMAGE_RESOURCE_DIRECTORY)((DWORD)rootresdir+(xresent->u2.s2.OffsetToDirectory));
|
||||
resdir = (PIMAGE_RESOURCE_DIRECTORY)((DWORD)rootresdir+(xresent->u2.s3.OffsetToDirectory));
|
||||
|
||||
/* default language (0) */
|
||||
resdir = find_entry_default(resdir,rootresdir);
|
||||
|
|
|
@ -42,7 +42,7 @@ static const IMAGE_RESOURCE_DIRECTORY *find_entry_by_id( const IMAGE_RESOURCE_DI
|
|||
{
|
||||
pos = (min + max) / 2;
|
||||
if (entry[pos].u1.s2.Id == id)
|
||||
return (IMAGE_RESOURCE_DIRECTORY *)((char *)root + entry[pos].u2.s2.OffsetToDirectory);
|
||||
return (IMAGE_RESOURCE_DIRECTORY *)((char *)root + entry[pos].u2.s3.OffsetToDirectory);
|
||||
if (entry[pos].u1.s2.Id > id) max = pos - 1;
|
||||
else min = pos + 1;
|
||||
}
|
||||
|
@ -62,7 +62,7 @@ static const IMAGE_RESOURCE_DIRECTORY *find_entry_default( const IMAGE_RESOURCE_
|
|||
const IMAGE_RESOURCE_DIRECTORY_ENTRY *entry;
|
||||
|
||||
entry = (const IMAGE_RESOURCE_DIRECTORY_ENTRY *)(dir + 1);
|
||||
return (IMAGE_RESOURCE_DIRECTORY *)((char *)root + entry->u2.s2.OffsetToDirectory);
|
||||
return (IMAGE_RESOURCE_DIRECTORY *)((char *)root + entry->u2.s3.OffsetToDirectory);
|
||||
}
|
||||
|
||||
|
||||
|
@ -104,7 +104,7 @@ static const IMAGE_RESOURCE_DIRECTORY *find_entry_by_name( const IMAGE_RESOURCE_
|
|||
res = strncmpiW( nameW, str->NameString, str->Length );
|
||||
if (!res && namelen == str->Length)
|
||||
{
|
||||
ret = (IMAGE_RESOURCE_DIRECTORY *)((char *)root + entry[pos].u2.s2.OffsetToDirectory);
|
||||
ret = (IMAGE_RESOURCE_DIRECTORY *)((char *)root + entry[pos].u2.s3.OffsetToDirectory);
|
||||
break;
|
||||
}
|
||||
if (res < 0) max = pos - 1;
|
||||
|
|
|
@ -2535,7 +2535,7 @@ typedef struct _IMAGE_RESOURCE_DIRECTORY_ENTRY {
|
|||
unsigned OffsetToDirectory:31;
|
||||
unsigned DataIsDirectory:1;
|
||||
#endif
|
||||
} DUMMYSTRUCTNAME2;
|
||||
} DUMMYSTRUCTNAME3;
|
||||
} DUMMYUNIONNAME2;
|
||||
} IMAGE_RESOURCE_DIRECTORY_ENTRY,*PIMAGE_RESOURCE_DIRECTORY_ENTRY;
|
||||
|
||||
|
|
|
@ -134,8 +134,8 @@ static void fixup_resources( IMAGE_RESOURCE_DIRECTORY *dir, char *root, void *ba
|
|||
entry = (IMAGE_RESOURCE_DIRECTORY_ENTRY *)(dir + 1);
|
||||
for (i = 0; i < dir->NumberOfNamedEntries + dir->NumberOfIdEntries; i++, entry++)
|
||||
{
|
||||
void *ptr = root + entry->u2.s2.OffsetToDirectory;
|
||||
if (entry->u2.s2.DataIsDirectory) fixup_resources( ptr, root, base );
|
||||
void *ptr = root + entry->u2.s3.OffsetToDirectory;
|
||||
if (entry->u2.s3.DataIsDirectory) fixup_resources( ptr, root, base );
|
||||
else
|
||||
{
|
||||
IMAGE_RESOURCE_DATA_ENTRY *data = ptr;
|
||||
|
|
|
@ -67,7 +67,7 @@ static const IMAGE_RESOURCE_DIRECTORY *find_entry_by_id( const IMAGE_RESOURCE_DI
|
|||
{
|
||||
pos = (min + max) / 2;
|
||||
if (entry[pos].u1.s2.Id == id)
|
||||
return (IMAGE_RESOURCE_DIRECTORY *)((char *)root + entry[pos].u2.s2.OffsetToDirectory);
|
||||
return (IMAGE_RESOURCE_DIRECTORY *)((char *)root + entry[pos].u2.s3.OffsetToDirectory);
|
||||
if (entry[pos].u1.s2.Id > id) max = pos - 1;
|
||||
else min = pos + 1;
|
||||
}
|
||||
|
@ -106,7 +106,7 @@ static const IMAGE_RESOURCE_DIRECTORY *find_entry_by_nameW( const IMAGE_RESOURCE
|
|||
str = (IMAGE_RESOURCE_DIR_STRING_U *)((char *)root + entry[pos].u1.s1.NameOffset);
|
||||
res = strncmpiW( name, str->NameString, str->Length );
|
||||
if (!res && namelen == str->Length)
|
||||
return (IMAGE_RESOURCE_DIRECTORY *)((char *)root + entry[pos].u2.s2.OffsetToDirectory);
|
||||
return (IMAGE_RESOURCE_DIRECTORY *)((char *)root + entry[pos].u2.s3.OffsetToDirectory);
|
||||
if (res < 0) max = pos - 1;
|
||||
else min = pos + 1;
|
||||
}
|
||||
|
@ -151,7 +151,7 @@ static const IMAGE_RESOURCE_DIRECTORY *find_entry_default( const IMAGE_RESOURCE_
|
|||
const IMAGE_RESOURCE_DIRECTORY_ENTRY *entry;
|
||||
|
||||
entry = (const IMAGE_RESOURCE_DIRECTORY_ENTRY *)(dir + 1);
|
||||
return (IMAGE_RESOURCE_DIRECTORY *)((char *)root + entry->u2.s2.OffsetToDirectory);
|
||||
return (IMAGE_RESOURCE_DIRECTORY *)((char *)root + entry->u2.s3.OffsetToDirectory);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue