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
3044d734
Commit
3044d734
authored
Apr 20, 2010
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Fix structure padding for requests that have a reply.
parent
776527f3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
80 additions
and
7 deletions
+80
-7
server_protocol.h
include/wine/server_protocol.h
+64
-1
request.h
server/request.h
+0
-0
make_requests
tools/make_requests
+16
-6
No files found.
include/wine/server_protocol.h
View file @
3044d734
This diff is collapsed.
Click to expand it.
server/request.h
View file @
3044d734
This diff is collapsed.
Click to expand it.
tools/make_requests
View file @
3044d734
...
...
@@ -63,6 +63,18 @@ my $max_req_size = 64;
my
$warnings
=
scalar
(
@ARGV
)
&&
$ARGV
[
0
]
eq
"-w"
;
sub
add_padding
($$)
{
my
(
$offset
,
$padding
)
=
@_
;
if
(
$offset
%
$padding
)
{
my
$count
=
$padding
-
(
$offset
%
$padding
);
print
SERVER_PROT
" char __pad_$offset\[$count\];\n"
;
$offset
+=
$count
;
}
return
$offset
;
}
### Generate a dumping function
sub
DO_DUMP_FUNC
($$@)
...
...
@@ -151,6 +163,9 @@ sub PARSE_REQUESTS()
if
(
/^\@REPLY/
)
{
die
"Misplaced \@REPLY"
unless
$state
==
2
;
$offset
=
add_padding
(
$offset
,
8
);
# all requests should be 8-byte aligned
die
"request $name too large ($offset)"
if
(
$offset
>
$max_req_size
);
push
@asserts
,
"C_ASSERT( sizeof(struct ${name}_request) == $offset );\n"
;
print
SERVER_PROT
"};\n"
;
print
SERVER_PROT
"struct ${name}_reply\n{\n"
;
print
SERVER_PROT
" struct reply_header __header;\n"
;
...
...
@@ -164,12 +179,7 @@ sub PARSE_REQUESTS()
{
die
"Misplaced \@END"
unless
(
$state
==
2
||
$state
==
3
);
if
(
$offset
&
7
)
# all requests should be 8-byte aligned
{
my
$count
=
8
-
(
$offset
&
7
);
print
SERVER_PROT
" char __pad_$offset\[$count\];\n"
;
$offset
+=
$count
;
}
$offset
=
add_padding
(
$offset
,
8
);
# all requests should be 8-byte aligned
print
SERVER_PROT
"};\n"
;
if
(
$state
==
2
)
# build dummy reply struct
{
...
...
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