Fixed IMAGE_RESOURCE_DIRECTORY_ENTRY on big-endian machines.

This commit is contained in:
Ulrich Weigand 2000-12-19 03:38:53 +00:00 committed by Alexandre Julliard
parent 9ea31be4ff
commit 975914003b
8 changed files with 174 additions and 83 deletions

185
configure vendored
View File

@ -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 <<EOF
#line 5263 "configure"
#include "confdefs.h"
union
{
int word;
struct
{
int bit0 : 1;
int rest : sizeof(int)*8 - 1;
} bitfield;
} u;
main() { u.word = 0; u.bitfield.bit0 = 1; exit( u.word == 1 ); }
EOF
if { (eval echo configure:5277: \"$ac_link\") 1>&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 <<EOF
#line 5263 "configure"
#line 5310 "configure"
#include "confdefs.h"
#include <alloca.h>
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 <<EOF
#line 5296 "configure"
#line 5343 "configure"
#include "confdefs.h"
#ifdef __GNUC__
@ -5320,7 +5367,7 @@ int main() {
char *p = (char *) alloca(1);
; return 0; }
EOF
if { (eval echo configure:5324: \"$ac_link\") 1>&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 <<EOF
#line 5361 "configure"
#line 5408 "configure"
#include "confdefs.h"
#if defined(CRAY) && ! defined(CRAY2)
webecray
@ -5382,12 +5429,12 @@ echo "$ac_t""$ac_cv_os_cray" 1>&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 <<EOF
#line 5391 "configure"
#line 5438 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@ -5410,7 +5457,7 @@ $ac_func();
; return 0; }
EOF
if { (eval echo configure:5414: \"$ac_link\") 1>&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 <<EOF
#line 5449 "configure"
#line 5496 "configure"
#include "confdefs.h"
find_stack_direction ()
{
@ -5464,7 +5511,7 @@ main ()
exit (find_stack_direction() < 0);
}
EOF
if { (eval echo configure:5468: \"$ac_link\") 1>&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 <<EOF
#line 5530 "configure"
#line 5577 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@ -5549,7 +5596,7 @@ $ac_func();
; return 0; }
EOF
if { (eval echo configure:5553: \"$ac_link\") 1>&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
#line 5639 "configure"
#line 5686 "configure"
#include "confdefs.h"
#include <$ac_hdr>
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 <<EOF
#line 5676 "configure"
#line 5723 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/stat.h>
@ -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 <<EOF
#line 5734 "configure"
#line 5781 "configure"
#include "confdefs.h"
int main() {
@ -5779,7 +5826,7 @@ ccp = (char const *const *) p;
; return 0; }
EOF
if { (eval echo configure:5783: \"$ac_compile\") 1>&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 <<EOF
#line 5811 "configure"
#line 5858 "configure"
#include "confdefs.h"
int main() {
} int $ac_kw foo() {
; return 0; }
EOF
if { (eval echo configure:5818: \"$ac_compile\") 1>&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 <<EOF
#line 5849 "configure"
#line 5896 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
@ -5853,7 +5900,7 @@ else
#include <float.h>
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
#line 5874 "configure"
#line 5921 "configure"
#include "confdefs.h"
#include <string.h>
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
#line 5892 "configure"
#line 5939 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
@ -5909,7 +5956,7 @@ if test "$cross_compiling" = yes; then
:
else
cat > conftest.$ac_ext <<EOF
#line 5913 "configure"
#line 5960 "configure"
#include "confdefs.h"
#include <ctype.h>
#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 <<EOF
#line 5953 "configure"
#line 6000 "configure"
#include "confdefs.h"
#include <sys/types.h>
#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 <<EOF
#line 5989 "configure"
#line 6036 "configure"
#include "confdefs.h"
#include <stdio.h>
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 <<EOF
#line 6027 "configure"
#line 6074 "configure"
#include "confdefs.h"
#include <netdb.h>
@ -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 <<EOF
#line 6079 "configure"
#line 6126 "configure"
#include "confdefs.h"
#include <sys/ioctl.h>
@ -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 <<EOF
#line 6126 "configure"
#line 6173 "configure"
#include "confdefs.h"
#include <sys/types.h>
@ -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 <<EOF
#line 6175 "configure"
#line 6222 "configure"
#include "confdefs.h"
#include <sys/types.h>
@ -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 <<EOF
#line 6222 "configure"
#line 6269 "configure"
#include "confdefs.h"
#include <sys/types.h>
@ -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 <<EOF
#line 6272 "configure"
#line 6319 "configure"
#include "confdefs.h"
#include <sys/types.h>
@ -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 <<EOF
#line 6332 "configure"
#line 6379 "configure"
#include "confdefs.h"
#include <sys/types.h>
@ -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 <<EOF
#line 6389 "configure"
#line 6436 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/socket.h>
@ -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 <<EOF
#line 6425 "configure"
#line 6472 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/socket.h>
@ -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 <<EOF
#line 6462 "configure"
#line 6509 "configure"
#include "confdefs.h"
#if (defined(i386) || defined(__i386)) && !defined(__i386__)
yes

View File

@ -744,6 +744,26 @@ dnl **** Check for endianness ****
AC_C_BIGENDIAN
AC_CACHE_CHECK( "whether bitfields are bigendian", wine_cv_bitfields_bigendian,
[AC_TRY_RUN([
union
{
int word;
struct
{
int bit0 : 1;
int rest : sizeof(int)*8 - 1;
} bitfield;
} u;
main() { u.word = 0; u.bitfield.bit0 = 1; exit( u.word == 1 ); } ],
wine_cv_bitfields_bigendian=yes, wine_cv_bitfields_bigendian=no,
wine_cv_bitfields_bigendian=no ) ])
if test "$wine_cv_bitfields_bigendian" = "yes"
then
AC_DEFINE(BITFIELDS_BIGENDIAN)
fi
dnl **** Check for functions ****
AC_FUNC_ALLOCA()

View File

@ -77,9 +77,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;
@ -411,7 +411,7 @@ static HRESULT ICO_ExtractIconExW(
while(n<iconDirCount && xprdeTmp)
{
if(xprdeTmp->u1.Id == iId)
if(xprdeTmp->u1.s2.Id == iId)
{
nIconIndex = n;
break;

View File

@ -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;

View File

@ -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

View File

@ -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

View File

@ -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;

View File

@ -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;i<resdir->NumberOfNamedEntries+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;i<resdir->NumberOfNamedEntries+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;
}