diff --git a/configure b/configure index 7a30249d59d..9ec827fb075 100755 --- a/configure +++ b/configure @@ -5250,23 +5250,70 @@ EOF fi +echo $ac_n "checking "whether bitfields are bigendian"""... $ac_c" 1>&6 +echo "configure:5255: checking "whether bitfields are bigendian"" >&5 +if eval "test \"`echo '$''{'wine_cv_bitfields_bigendian'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + wine_cv_bitfields_bigendian=no +else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + wine_cv_bitfields_bigendian=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + wine_cv_bitfields_bigendian=no +fi +rm -fr conftest* +fi + +fi + +echo "$ac_t""$wine_cv_bitfields_bigendian" 1>&6 +if test "$wine_cv_bitfields_bigendian" = "yes" +then + cat >> confdefs.h <<\EOF +#define BITFIELDS_BIGENDIAN 1 +EOF + +fi + + # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 -echo "configure:5258: checking for working alloca.h" >&5 +echo "configure:5305: checking for working alloca.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { void *p = alloca(2 * sizeof(int)); ; return 0; } EOF -if { (eval echo configure:5270: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5317: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_header_alloca_h=yes else @@ -5287,12 +5334,12 @@ EOF fi echo $ac_n "checking for alloca""... $ac_c" 1>&6 -echo "configure:5291: checking for alloca" >&5 +echo "configure:5338: checking for alloca" >&5 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5371: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func_alloca_works=yes else @@ -5352,12 +5399,12 @@ EOF echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 -echo "configure:5356: checking whether alloca needs Cray hooks" >&5 +echo "configure:5403: checking whether alloca needs Cray hooks" >&5 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 if test $ac_cv_os_cray = yes; then for ac_func in _getb67 GETB67 getb67; do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5386: checking for $ac_func" >&5 +echo "configure:5433: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5461: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5437,7 +5484,7 @@ done fi echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 -echo "configure:5441: checking stack direction for C alloca" >&5 +echo "configure:5488: checking stack direction for C alloca" >&5 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5445,7 +5492,7 @@ else ac_cv_c_stack_direction=0 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5515: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_stack_direction=1 else @@ -5521,12 +5568,12 @@ for ac_func in \ do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5525: checking for $ac_func" >&5 +echo "configure:5572: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5600: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5630,17 +5677,17 @@ for ac_hdr in \ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:5634: checking for $ac_hdr" >&5 +echo "configure:5681: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5644: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5691: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -5667,12 +5714,12 @@ fi done echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6 -echo "configure:5671: checking whether stat file-mode macros are broken" >&5 +echo "configure:5718: checking whether stat file-mode macros are broken" >&5 if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -5725,12 +5772,12 @@ fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:5729: checking for working const" >&5 +echo "configure:5776: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5830: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -5800,21 +5847,21 @@ EOF fi echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:5804: checking for inline" >&5 +echo "configure:5851: checking for inline" >&5 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5865: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break else @@ -5840,12 +5887,12 @@ EOF esac echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:5844: checking for ANSI C header files" >&5 +echo "configure:5891: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -5853,7 +5900,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5857: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5904: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -5870,7 +5917,7 @@ rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -5888,7 +5935,7 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -5909,7 +5956,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -5920,7 +5967,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:5924: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5971: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -5944,12 +5991,12 @@ EOF fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:5948: checking for size_t" >&5 +echo "configure:5995: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -5977,7 +6024,7 @@ EOF fi echo $ac_n "checking size of long long""... $ac_c" 1>&6 -echo "configure:5981: checking size of long long" >&5 +echo "configure:6028: checking size of long long" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5985,7 +6032,7 @@ else ac_cv_sizeof_long_long=0 else cat > conftest.$ac_ext < main() @@ -5996,7 +6043,7 @@ main() exit(0); } EOF -if { (eval echo configure:6000: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:6047: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_long_long=`cat conftestval` else @@ -6018,12 +6065,12 @@ EOF echo $ac_n "checking "whether we can use re-entrant gethostbyname_r Linux style"""... $ac_c" 1>&6 -echo "configure:6022: checking "whether we can use re-entrant gethostbyname_r Linux style"" >&5 +echo "configure:6069: checking "whether we can use re-entrant gethostbyname_r Linux style"" >&5 if eval "test \"`echo '$''{'wine_cv_linux_gethostbyname_r_6'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -6044,7 +6091,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:6048: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6095: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wine_cv_linux_gethostbyname_r_6=yes else @@ -6070,12 +6117,12 @@ EOF if test "$ac_cv_header_linux_joystick_h" = "yes" then echo $ac_n "checking "whether linux/joystick.h uses the Linux 2.2+ API"""... $ac_c" 1>&6 -echo "configure:6074: checking "whether linux/joystick.h uses the Linux 2.2+ API"" >&5 +echo "configure:6121: checking "whether linux/joystick.h uses the Linux 2.2+ API"" >&5 if eval "test \"`echo '$''{'wine_cv_linux_joystick_22_api'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -6090,7 +6137,7 @@ int main() { /*empty*/ ; return 0; } EOF -if { (eval echo configure:6094: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6141: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wine_cv_linux_joystick_22_api=yes else @@ -6117,12 +6164,12 @@ fi if test "$ac_cv_header_sys_vfs_h" = "yes" then echo $ac_n "checking "whether sys/vfs.h defines statfs"""... $ac_c" 1>&6 -echo "configure:6121: checking "whether sys/vfs.h defines statfs"" >&5 +echo "configure:6168: checking "whether sys/vfs.h defines statfs"" >&5 if eval "test \"`echo '$''{'wine_cv_sys_vfs_has_statfs'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -6139,7 +6186,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:6143: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6190: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wine_cv_sys_vfs_has_statfs=yes else @@ -6166,12 +6213,12 @@ fi if test "$ac_cv_header_sys_statfs_h" = "yes" then echo $ac_n "checking "whether sys/statfs.h defines statfs"""... $ac_c" 1>&6 -echo "configure:6170: checking "whether sys/statfs.h defines statfs"" >&5 +echo "configure:6217: checking "whether sys/statfs.h defines statfs"" >&5 if eval "test \"`echo '$''{'wine_cv_sys_statfs_has_statfs'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -6186,7 +6233,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:6190: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6237: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wine_cv_sys_statfs_has_statfs=yes else @@ -6213,12 +6260,12 @@ fi if test "$ac_cv_header_sys_mount_h" = "yes" then echo $ac_n "checking "whether sys/mount.h defines statfs"""... $ac_c" 1>&6 -echo "configure:6217: checking "whether sys/mount.h defines statfs"" >&5 +echo "configure:6264: checking "whether sys/mount.h defines statfs"" >&5 if eval "test \"`echo '$''{'wine_cv_sys_mount_has_statfs'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -6233,7 +6280,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:6237: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6284: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wine_cv_sys_mount_has_statfs=yes else @@ -6259,7 +6306,7 @@ fi echo $ac_n "checking "for statfs.f_bfree"""... $ac_c" 1>&6 -echo "configure:6263: checking "for statfs.f_bfree"" >&5 +echo "configure:6310: checking "for statfs.f_bfree"" >&5 if eval "test \"`echo '$''{'wine_cv_statfs_bfree'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -6268,7 +6315,7 @@ else wine_cv_statfs_bfree=no else cat > conftest.$ac_ext < @@ -6295,7 +6342,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:6299: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6346: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wine_cv_statfs_bfree=yes else @@ -6319,7 +6366,7 @@ EOF fi echo $ac_n "checking "for statfs.f_bavail"""... $ac_c" 1>&6 -echo "configure:6323: checking "for statfs.f_bavail"" >&5 +echo "configure:6370: checking "for statfs.f_bavail"" >&5 if eval "test \"`echo '$''{'wine_cv_statfs_bavail'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -6328,7 +6375,7 @@ else wine_cv_statfs_bavail=no else cat > conftest.$ac_ext < @@ -6355,7 +6402,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:6359: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6406: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wine_cv_statfs_bavail=yes else @@ -6380,12 +6427,12 @@ fi echo $ac_n "checking "for msg_accrights in struct msghdr"""... $ac_c" 1>&6 -echo "configure:6384: checking "for msg_accrights in struct msghdr"" >&5 +echo "configure:6431: checking "for msg_accrights in struct msghdr"" >&5 if eval "test \"`echo '$''{'ac_cv_c_msg_accrights'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -6393,7 +6440,7 @@ int main() { struct msghdr hdr; hdr.msg_accrights=0 ; return 0; } EOF -if { (eval echo configure:6397: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6444: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_msg_accrights="yes" else @@ -6416,12 +6463,12 @@ fi echo $ac_n "checking "for sun_len in struct sockaddr_un"""... $ac_c" 1>&6 -echo "configure:6420: checking "for sun_len in struct sockaddr_un"" >&5 +echo "configure:6467: checking "for sun_len in struct sockaddr_un"" >&5 if eval "test \"`echo '$''{'ac_cv_c_sun_len'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -6430,7 +6477,7 @@ int main() { static struct sockaddr_un addr; addr.sun_len = 1 ; return 0; } EOF -if { (eval echo configure:6434: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6481: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_sun_len="yes" else @@ -6453,12 +6500,12 @@ fi echo $ac_n "checking "whether we need to define __i386__"""... $ac_c" 1>&6 -echo "configure:6457: checking "whether we need to define __i386__"" >&5 +echo "configure:6504: checking "whether we need to define __i386__"" >&5 if eval "test \"`echo '$''{'ac_cv_cpp_def_i386'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < id) max = pos - 1; + if (entry[pos].u1.s2.Id > id) max = pos - 1; else min = pos + 1; } return NULL; @@ -411,7 +411,7 @@ static HRESULT ICO_ExtractIconExW( while(nu1.Id == iId) + if(xprdeTmp->u1.s2.Id == iId) { nIconIndex = n; break; diff --git a/dlls/version/resource.c b/dlls/version/resource.c index 9fb6d1e865c..4279cd4683a 100644 --- a/dlls/version/resource.c +++ b/dlls/version/resource.c @@ -41,9 +41,9 @@ static const IMAGE_RESOURCE_DIRECTORY *find_entry_by_id( const IMAGE_RESOURCE_DI while (min <= max) { pos = (min + max) / 2; - if (entry[pos].u1.Id == id) + if (entry[pos].u1.s2.Id == id) return (IMAGE_RESOURCE_DIRECTORY *)((char *)root + entry[pos].u2.s2.OffsetToDirectory); - if (entry[pos].u1.Id > id) max = pos - 1; + if (entry[pos].u1.s2.Id > id) max = pos - 1; else min = pos + 1; } return NULL; diff --git a/include/acconfig.h b/include/acconfig.h index 2bf4f64180f..d1c7581ffe0 100644 --- a/include/acconfig.h +++ b/include/acconfig.h @@ -3,6 +3,9 @@ * defined in the 'configure' script. */ +/* Define if bitfields are bigendian */ +#undef BITFIELDS_BIGENDIAN + /* Define if .type asm directive must be inside a .def directive */ #undef NEED_TYPE_IN_DEF diff --git a/include/config.h.in b/include/config.h.in index 4e4ee3f4faa..4226b9c025f 100644 --- a/include/config.h.in +++ b/include/config.h.in @@ -47,6 +47,9 @@ /* Define if lex declares yytext as a char * by default, not a char[]. */ #undef YYTEXT_POINTER +/* Define if bitfields are bigendian */ +#undef BITFIELDS_BIGENDIAN + /* Define if .type asm directive must be inside a .def directive */ #undef NEED_TYPE_IN_DEF diff --git a/include/winnt.h b/include/winnt.h index 0b90e92d401..e72f4392b97 100644 --- a/include/winnt.h +++ b/include/winnt.h @@ -2478,17 +2478,35 @@ typedef struct _IMAGE_RESOURCE_DIRECTORY { typedef struct _IMAGE_RESOURCE_DIRECTORY_ENTRY { union { struct { +#ifdef BITFIELDS_BIGENDIAN + unsigned NameIsString:1; + unsigned NameOffset:31; +#else unsigned NameOffset:31; unsigned NameIsString:1; +#endif } DUMMYSTRUCTNAME1; DWORD Name; - WORD Id; + struct { +#ifdef WORDS_BIGENDIAN + WORD __pad; + WORD Id; +#else + WORD Id; + WORD __pad; +#endif + } DUMMYSTRUCTNAME2; } DUMMYUNIONNAME1; union { DWORD OffsetToData; struct { +#ifdef BITFIELDS_BIGENDIAN + unsigned DataIsDirectory:1; + unsigned OffsetToDirectory:31; +#else unsigned OffsetToDirectory:31; unsigned DataIsDirectory:1; +#endif } DUMMYSTRUCTNAME2; } DUMMYUNIONNAME2; } IMAGE_RESOURCE_DIRECTORY_ENTRY,*PIMAGE_RESOURCE_DIRECTORY_ENTRY; diff --git a/loader/pe_resource.c b/loader/pe_resource.c index f30ca6536c2..e473bfc506e 100644 --- a/loader/pe_resource.c +++ b/loader/pe_resource.c @@ -66,9 +66,9 @@ static const IMAGE_RESOURCE_DIRECTORY *find_entry_by_id( const IMAGE_RESOURCE_DI while (min <= max) { pos = (min + max) / 2; - if (entry[pos].u1.Id == id) + if (entry[pos].u1.s2.Id == id) return (IMAGE_RESOURCE_DIRECTORY *)((char *)root + entry[pos].u2.s2.OffsetToDirectory); - if (entry[pos].u1.Id > id) max = pos - 1; + if (entry[pos].u1.s2.Id > id) max = pos - 1; else min = pos + 1; } return NULL; @@ -300,7 +300,7 @@ BOOL WINAPI EnumResourceTypesA( HMODULE hmod, ENUMRESTYPEPROCA lpfun, LONG lpara } else { - type = (LPSTR)(int)et[i].u1.Id; + type = (LPSTR)(int)et[i].u1.s2.Id; ret = lpfun(hmod,type,lparam); } if (!ret) @@ -339,7 +339,7 @@ BOOL WINAPI EnumResourceTypesW( HMODULE hmod, ENUMRESTYPEPROCW lpfun, LONG lpara } else { - type = (LPWSTR)(int)et[i].u1.Id; + type = (LPWSTR)(int)et[i].u1.s2.Id; ret = lpfun(hmod,type,lparam); } if (!ret) @@ -384,7 +384,7 @@ BOOL WINAPI EnumResourceNamesA( HMODULE hmod, LPCSTR type, ENUMRESNAMEPROCA lpfu } else { - name = (LPSTR)(int)et[i].u1.Id; + name = (LPSTR)(int)et[i].u1.s2.Id; ret = lpfun(hmod,type,name,lparam); } if (!ret) @@ -426,7 +426,7 @@ BOOL WINAPI EnumResourceNamesW( HMODULE hmod, LPCWSTR type, ENUMRESNAMEPROCW lpf } else { - name = (LPWSTR)(int)et[i].u1.Id; + name = (LPWSTR)(int)et[i].u1.s2.Id; ret = lpfun(hmod,type,name,lparam); } if (!ret) @@ -456,7 +456,7 @@ BOOL WINAPI EnumResourceLanguagesA( HMODULE hmod, LPCSTR type, LPCSTR name, ret = FALSE; for (i=0;iNumberOfNamedEntries+resdir->NumberOfIdEntries;i++) { /* languages are just ids... I hope */ - ret = lpfun(hmod,type,name,et[i].u1.Id,lparam); + ret = lpfun(hmod,type,name,et[i].u1.s2.Id,lparam); if (!ret) break; } @@ -484,7 +484,7 @@ BOOL WINAPI EnumResourceLanguagesW( HMODULE hmod, LPCWSTR type, LPCWSTR name, et =(PIMAGE_RESOURCE_DIRECTORY_ENTRY)(resdir + 1); ret = FALSE; for (i=0;iNumberOfNamedEntries+resdir->NumberOfIdEntries;i++) { - ret = lpfun(hmod,type,name,et[i].u1.Id,lparam); + ret = lpfun(hmod,type,name,et[i].u1.s2.Id,lparam); if (!ret) break; }