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
20ca4e9a
Commit
20ca4e9a
authored
Feb 24, 2022
by
Eric Pouech
Committed by
Alexandre Julliard
Feb 24, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dhcpcsvc/tests: Enable compilation with long types.
Signed-off-by:
Eric Pouech
<
eric.pouech@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
56681b53
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
10 deletions
+9
-10
Makefile.in
dlls/dhcpcsvc/tests/Makefile.in
+0
-1
dhcpcsvc.c
dlls/dhcpcsvc/tests/dhcpcsvc.c
+9
-9
No files found.
dlls/dhcpcsvc/tests/Makefile.in
View file @
20ca4e9a
EXTRADEFS
=
-DWINE_NO_LONG_TYPES
TESTDLL
=
dhcpcsvc.dll
IMPORTS
=
dhcpcsvc iphlpapi
...
...
dlls/dhcpcsvc/tests/dhcpcsvc.c
View file @
20ca4e9a
...
...
@@ -56,24 +56,24 @@ static void test_DhcpRequestParams(void)
for
(
ptr
=
adapters
;
ptr
;
ptr
=
ptr
->
Next
)
{
MultiByteToWideChar
(
CP_ACP
,
0
,
ptr
->
AdapterName
,
-
1
,
name
,
ARRAY_SIZE
(
name
)
);
trace
(
"adapter '%s' type %u dhcpv4 enabled %d
\n
"
,
wine_dbgstr_w
(
ptr
->
Description
),
ptr
->
IfType
,
ptr
->
Dhcpv4Enabled
);
trace
(
"adapter '%s' type %
l
u dhcpv4 enabled %d
\n
"
,
wine_dbgstr_w
(
ptr
->
Description
),
ptr
->
IfType
,
ptr
->
Dhcpv4Enabled
);
if
(
ptr
->
IfType
==
IF_TYPE_SOFTWARE_LOOPBACK
)
continue
;
memset
(
&
send_params
,
0
,
sizeof
(
send_params
)
);
memset
(
&
recv_params
,
0
,
sizeof
(
recv_params
)
);
err
=
DhcpRequestParams
(
DHCPCAPI_REQUEST_SYNCHRONOUS
,
NULL
,
NULL
,
NULL
,
send_params
,
recv_params
,
NULL
,
NULL
,
NULL
);
ok
(
err
==
ERROR_INVALID_PARAMETER
,
"got %u
\n
"
,
err
);
ok
(
err
==
ERROR_INVALID_PARAMETER
,
"got %
l
u
\n
"
,
err
);
err
=
DhcpRequestParams
(
DHCPCAPI_REQUEST_SYNCHRONOUS
,
NULL
,
nosuchW
,
NULL
,
send_params
,
recv_params
,
NULL
,
NULL
,
NULL
);
ok
(
err
==
ERROR_INVALID_PARAMETER
,
"got %u
\n
"
,
err
);
ok
(
err
==
ERROR_INVALID_PARAMETER
,
"got %
l
u
\n
"
,
err
);
err
=
DhcpRequestParams
(
DHCPCAPI_REQUEST_SYNCHRONOUS
,
NULL
,
name
,
NULL
,
send_params
,
recv_params
,
NULL
,
NULL
,
NULL
);
ok
(
err
==
ERROR_INVALID_PARAMETER
,
"got %u
\n
"
,
err
);
ok
(
err
==
ERROR_INVALID_PARAMETER
,
"got %
l
u
\n
"
,
err
);
size
=
0
;
err
=
DhcpRequestParams
(
DHCPCAPI_REQUEST_SYNCHRONOUS
,
NULL
,
name
,
NULL
,
send_params
,
recv_params
,
NULL
,
&
size
,
NULL
);
ok
(
err
==
ERROR_INVALID_PARAMETER
,
"got %u
\n
"
,
err
);
ok
(
err
==
ERROR_INVALID_PARAMETER
,
"got %
l
u
\n
"
,
err
);
memset
(
params
,
0
,
sizeof
(
params
)
);
params
[
0
].
OptionId
=
OPTION_SUBNET_MASK
;
...
...
@@ -106,8 +106,8 @@ static void test_DhcpRequestParams(void)
case
OPTION_BROADCAST_ADDRESS
:
if
(
params
[
i
].
Data
)
{
ok
(
params
[
i
].
nBytesData
==
sizeof
(
DWORD
),
"got %u
\n
"
,
params
[
i
].
nBytesData
);
trace
(
"%
u: Data %p (%08x) nBytesData %u OptionId %u Flags %08
x IsVendor %d
\n
"
,
ok
(
params
[
i
].
nBytesData
==
sizeof
(
DWORD
),
"got %
l
u
\n
"
,
params
[
i
].
nBytesData
);
trace
(
"%
lu: Data %p (%08lx) nBytesData %lu OptionId %lu Flags %08l
x IsVendor %d
\n
"
,
i
,
params
[
i
].
Data
,
*
(
DWORD
*
)
params
[
i
].
Data
,
params
[
i
].
nBytesData
,
params
[
i
].
OptionId
,
params
[
i
].
Flags
,
params
[
i
].
IsVendor
);
}
...
...
@@ -120,14 +120,14 @@ static void test_DhcpRequestParams(void)
char
*
str
=
HeapAlloc
(
GetProcessHeap
(),
0
,
params
[
i
].
nBytesData
+
1
);
memcpy
(
str
,
params
[
i
].
Data
,
params
[
i
].
nBytesData
);
str
[
params
[
i
].
nBytesData
]
=
0
;
trace
(
"%
u: Data %p (%s) nBytesData %u OptionId %u Flags %08
x IsVendor %d
\n
"
,
trace
(
"%
lu: Data %p (%s) nBytesData %lu OptionId %lu Flags %08l
x IsVendor %d
\n
"
,
i
,
params
[
i
].
Data
,
str
,
params
[
i
].
nBytesData
,
params
[
i
].
OptionId
,
params
[
i
].
Flags
,
params
[
i
].
IsVendor
);
HeapFree
(
GetProcessHeap
(),
0
,
str
);
}
break
;
default:
ok
(
0
,
"unexpected option %u
\n
"
,
params
[
i
].
OptionId
);
ok
(
0
,
"unexpected option %
l
u
\n
"
,
params
[
i
].
OptionId
);
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