Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
97591400
Commit
97591400
authored
Dec 19, 2000
by
Ulrich Weigand
Committed by
Alexandre Julliard
Dec 19, 2000
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed IMAGE_RESOURCE_DIRECTORY_ENTRY on big-endian machines.
parent
9ea31be4
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
57 additions
and
13 deletions
+57
-13
configure
configure
+0
-0
configure.in
configure.in
+20
-0
exticon.c
dlls/user/exticon.c
+3
-3
resource.c
dlls/version/resource.c
+2
-2
acconfig.h
include/acconfig.h
+3
-0
config.h.in
include/config.h.in
+3
-0
winnt.h
include/winnt.h
+18
-0
pe_resource.c
loader/pe_resource.c
+8
-8
No files found.
configure
View file @
97591400
This diff is collapsed.
Click to expand it.
configure.in
View file @
97591400
...
@@ -744,6 +744,26 @@ dnl **** Check for endianness ****
...
@@ -744,6 +744,26 @@ dnl **** Check for endianness ****
AC_C_BIGENDIAN
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 ****
dnl **** Check for functions ****
AC_FUNC_ALLOCA()
AC_FUNC_ALLOCA()
...
...
dlls/user/exticon.c
View file @
97591400
...
@@ -77,9 +77,9 @@ static const IMAGE_RESOURCE_DIRECTORY *find_entry_by_id( const IMAGE_RESOURCE_DI
...
@@ -77,9 +77,9 @@ static const IMAGE_RESOURCE_DIRECTORY *find_entry_by_id( const IMAGE_RESOURCE_DI
while
(
min
<=
max
)
while
(
min
<=
max
)
{
{
pos
=
(
min
+
max
)
/
2
;
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
);
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
;
else
min
=
pos
+
1
;
}
}
return
NULL
;
return
NULL
;
...
@@ -411,7 +411,7 @@ static HRESULT ICO_ExtractIconExW(
...
@@ -411,7 +411,7 @@ static HRESULT ICO_ExtractIconExW(
while
(
n
<
iconDirCount
&&
xprdeTmp
)
while
(
n
<
iconDirCount
&&
xprdeTmp
)
{
{
if
(
xprdeTmp
->
u1
.
Id
==
iId
)
if
(
xprdeTmp
->
u1
.
s2
.
Id
==
iId
)
{
{
nIconIndex
=
n
;
nIconIndex
=
n
;
break
;
break
;
...
...
dlls/version/resource.c
View file @
97591400
...
@@ -41,9 +41,9 @@ static const IMAGE_RESOURCE_DIRECTORY *find_entry_by_id( const IMAGE_RESOURCE_DI
...
@@ -41,9 +41,9 @@ static const IMAGE_RESOURCE_DIRECTORY *find_entry_by_id( const IMAGE_RESOURCE_DI
while
(
min
<=
max
)
while
(
min
<=
max
)
{
{
pos
=
(
min
+
max
)
/
2
;
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
);
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
;
else
min
=
pos
+
1
;
}
}
return
NULL
;
return
NULL
;
...
...
include/acconfig.h
View file @
97591400
...
@@ -3,6 +3,9 @@
...
@@ -3,6 +3,9 @@
* defined in the 'configure' script.
* defined in the 'configure' script.
*/
*/
/* Define if bitfields are bigendian */
#undef BITFIELDS_BIGENDIAN
/* Define if .type asm directive must be inside a .def directive */
/* Define if .type asm directive must be inside a .def directive */
#undef NEED_TYPE_IN_DEF
#undef NEED_TYPE_IN_DEF
...
...
include/config.h.in
View file @
97591400
...
@@ -47,6 +47,9 @@
...
@@ -47,6 +47,9 @@
/* Define if lex declares yytext as a char * by default, not a char[]. */
/* Define if lex declares yytext as a char * by default, not a char[]. */
#undef YYTEXT_POINTER
#undef YYTEXT_POINTER
/* Define if bitfields are bigendian */
#undef BITFIELDS_BIGENDIAN
/* Define if .type asm directive must be inside a .def directive */
/* Define if .type asm directive must be inside a .def directive */
#undef NEED_TYPE_IN_DEF
#undef NEED_TYPE_IN_DEF
...
...
include/winnt.h
View file @
97591400
...
@@ -2478,17 +2478,35 @@ typedef struct _IMAGE_RESOURCE_DIRECTORY {
...
@@ -2478,17 +2478,35 @@ typedef struct _IMAGE_RESOURCE_DIRECTORY {
typedef
struct
_IMAGE_RESOURCE_DIRECTORY_ENTRY
{
typedef
struct
_IMAGE_RESOURCE_DIRECTORY_ENTRY
{
union
{
union
{
struct
{
struct
{
#ifdef BITFIELDS_BIGENDIAN
unsigned
NameIsString
:
1
;
unsigned
NameOffset
:
31
;
#else
unsigned
NameOffset
:
31
;
unsigned
NameOffset
:
31
;
unsigned
NameIsString
:
1
;
unsigned
NameIsString
:
1
;
#endif
}
DUMMYSTRUCTNAME1
;
}
DUMMYSTRUCTNAME1
;
DWORD
Name
;
DWORD
Name
;
struct
{
#ifdef WORDS_BIGENDIAN
WORD
__pad
;
WORD
Id
;
#else
WORD
Id
;
WORD
Id
;
WORD
__pad
;
#endif
}
DUMMYSTRUCTNAME2
;
}
DUMMYUNIONNAME1
;
}
DUMMYUNIONNAME1
;
union
{
union
{
DWORD
OffsetToData
;
DWORD
OffsetToData
;
struct
{
struct
{
#ifdef BITFIELDS_BIGENDIAN
unsigned
DataIsDirectory
:
1
;
unsigned
OffsetToDirectory
:
31
;
#else
unsigned
OffsetToDirectory
:
31
;
unsigned
OffsetToDirectory
:
31
;
unsigned
DataIsDirectory
:
1
;
unsigned
DataIsDirectory
:
1
;
#endif
}
DUMMYSTRUCTNAME2
;
}
DUMMYSTRUCTNAME2
;
}
DUMMYUNIONNAME2
;
}
DUMMYUNIONNAME2
;
}
IMAGE_RESOURCE_DIRECTORY_ENTRY
,
*
PIMAGE_RESOURCE_DIRECTORY_ENTRY
;
}
IMAGE_RESOURCE_DIRECTORY_ENTRY
,
*
PIMAGE_RESOURCE_DIRECTORY_ENTRY
;
...
...
loader/pe_resource.c
View file @
97591400
...
@@ -66,9 +66,9 @@ static const IMAGE_RESOURCE_DIRECTORY *find_entry_by_id( const IMAGE_RESOURCE_DI
...
@@ -66,9 +66,9 @@ static const IMAGE_RESOURCE_DIRECTORY *find_entry_by_id( const IMAGE_RESOURCE_DI
while
(
min
<=
max
)
while
(
min
<=
max
)
{
{
pos
=
(
min
+
max
)
/
2
;
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
);
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
;
else
min
=
pos
+
1
;
}
}
return
NULL
;
return
NULL
;
...
@@ -300,7 +300,7 @@ BOOL WINAPI EnumResourceTypesA( HMODULE hmod, ENUMRESTYPEPROCA lpfun, LONG lpara
...
@@ -300,7 +300,7 @@ BOOL WINAPI EnumResourceTypesA( HMODULE hmod, ENUMRESTYPEPROCA lpfun, LONG lpara
}
}
else
else
{
{
type
=
(
LPSTR
)(
int
)
et
[
i
].
u1
.
Id
;
type
=
(
LPSTR
)(
int
)
et
[
i
].
u1
.
s2
.
Id
;
ret
=
lpfun
(
hmod
,
type
,
lparam
);
ret
=
lpfun
(
hmod
,
type
,
lparam
);
}
}
if
(
!
ret
)
if
(
!
ret
)
...
@@ -339,7 +339,7 @@ BOOL WINAPI EnumResourceTypesW( HMODULE hmod, ENUMRESTYPEPROCW lpfun, LONG lpara
...
@@ -339,7 +339,7 @@ BOOL WINAPI EnumResourceTypesW( HMODULE hmod, ENUMRESTYPEPROCW lpfun, LONG lpara
}
}
else
else
{
{
type
=
(
LPWSTR
)(
int
)
et
[
i
].
u1
.
Id
;
type
=
(
LPWSTR
)(
int
)
et
[
i
].
u1
.
s2
.
Id
;
ret
=
lpfun
(
hmod
,
type
,
lparam
);
ret
=
lpfun
(
hmod
,
type
,
lparam
);
}
}
if
(
!
ret
)
if
(
!
ret
)
...
@@ -384,7 +384,7 @@ BOOL WINAPI EnumResourceNamesA( HMODULE hmod, LPCSTR type, ENUMRESNAMEPROCA lpfu
...
@@ -384,7 +384,7 @@ BOOL WINAPI EnumResourceNamesA( HMODULE hmod, LPCSTR type, ENUMRESNAMEPROCA lpfu
}
}
else
else
{
{
name
=
(
LPSTR
)(
int
)
et
[
i
].
u1
.
Id
;
name
=
(
LPSTR
)(
int
)
et
[
i
].
u1
.
s2
.
Id
;
ret
=
lpfun
(
hmod
,
type
,
name
,
lparam
);
ret
=
lpfun
(
hmod
,
type
,
name
,
lparam
);
}
}
if
(
!
ret
)
if
(
!
ret
)
...
@@ -426,7 +426,7 @@ BOOL WINAPI EnumResourceNamesW( HMODULE hmod, LPCWSTR type, ENUMRESNAMEPROCW lpf
...
@@ -426,7 +426,7 @@ BOOL WINAPI EnumResourceNamesW( HMODULE hmod, LPCWSTR type, ENUMRESNAMEPROCW lpf
}
}
else
else
{
{
name
=
(
LPWSTR
)(
int
)
et
[
i
].
u1
.
Id
;
name
=
(
LPWSTR
)(
int
)
et
[
i
].
u1
.
s2
.
Id
;
ret
=
lpfun
(
hmod
,
type
,
name
,
lparam
);
ret
=
lpfun
(
hmod
,
type
,
name
,
lparam
);
}
}
if
(
!
ret
)
if
(
!
ret
)
...
@@ -456,7 +456,7 @@ BOOL WINAPI EnumResourceLanguagesA( HMODULE hmod, LPCSTR type, LPCSTR name,
...
@@ -456,7 +456,7 @@ BOOL WINAPI EnumResourceLanguagesA( HMODULE hmod, LPCSTR type, LPCSTR name,
ret
=
FALSE
;
ret
=
FALSE
;
for
(
i
=
0
;
i
<
resdir
->
NumberOfNamedEntries
+
resdir
->
NumberOfIdEntries
;
i
++
)
{
for
(
i
=
0
;
i
<
resdir
->
NumberOfNamedEntries
+
resdir
->
NumberOfIdEntries
;
i
++
)
{
/* languages are just ids... I hope */
/* 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
)
if
(
!
ret
)
break
;
break
;
}
}
...
@@ -484,7 +484,7 @@ BOOL WINAPI EnumResourceLanguagesW( HMODULE hmod, LPCWSTR type, LPCWSTR name,
...
@@ -484,7 +484,7 @@ BOOL WINAPI EnumResourceLanguagesW( HMODULE hmod, LPCWSTR type, LPCWSTR name,
et
=
(
PIMAGE_RESOURCE_DIRECTORY_ENTRY
)(
resdir
+
1
);
et
=
(
PIMAGE_RESOURCE_DIRECTORY_ENTRY
)(
resdir
+
1
);
ret
=
FALSE
;
ret
=
FALSE
;
for
(
i
=
0
;
i
<
resdir
->
NumberOfNamedEntries
+
resdir
->
NumberOfIdEntries
;
i
++
)
{
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
)
if
(
!
ret
)
break
;
break
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment