Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
d9d43231
Commit
d9d43231
authored
Dec 28, 2010
by
Jörg Höhle
Committed by
Alexandre Julliard
Feb 17, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt/tests: sizeof(long double) is 12 with MS.
parent
c6d67fad
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
2 deletions
+13
-2
misc.c
dlls/msvcrt/tests/misc.c
+13
-2
No files found.
dlls/msvcrt/tests/misc.c
View file @
d9d43231
...
...
@@ -170,17 +170,28 @@ static const I10_OUTPUT_test I10_OUTPUT_tests[] = {
static
void
test_I10_OUTPUT
(
void
)
{
I10_OUTPUT_data
out
;
int
i
,
j
,
ret
;
int
i
,
j
=
sizeof
(
long
double
)
,
ret
;
if
(
!
pI10_OUTPUT
)
{
win_skip
(
"I10_OUTPUT not available
\n
"
);
return
;
}
if
(
j
!=
12
)
trace
(
"sizeof(long double) = %d on this machine
\n
"
,
j
);
for
(
i
=
0
;
i
<
sizeof
(
I10_OUTPUT_tests
)
/
sizeof
(
I10_OUTPUT_test
);
i
++
)
{
memset
(
out
.
str
,
'#'
,
sizeof
(
out
.
str
));
ret
=
pI10_OUTPUT
(
I10_OUTPUT_tests
[
i
].
d
,
I10_OUTPUT_tests
[
i
].
size
,
I10_OUTPUT_tests
[
i
].
flags
,
&
out
);
if
(
sizeof
(
long
double
)
==
12
)
ret
=
pI10_OUTPUT
(
I10_OUTPUT_tests
[
i
].
d
,
I10_OUTPUT_tests
[
i
].
size
,
I10_OUTPUT_tests
[
i
].
flags
,
&
out
);
else
{
/* MS' "long double" is an 80 bit FP that takes 12 bytes*/
typedef
struct
{
ULONG
x80
[
3
];
}
uld
;
/* same calling convention */
union
{
long
double
ld
;
uld
ld12
;
}
fp80
;
int
(
__cdecl
*
pI10_OUTPUT12
)(
uld
,
int
,
int
,
void
*
)
=
(
void
*
)
pI10_OUTPUT
;
fp80
.
ld
=
I10_OUTPUT_tests
[
i
].
d
;
ret
=
pI10_OUTPUT12
(
fp80
.
ld12
,
I10_OUTPUT_tests
[
i
].
size
,
I10_OUTPUT_tests
[
i
].
flags
,
&
out
);
}
ok
(
ret
==
I10_OUTPUT_tests
[
i
].
ret
,
"%d: ret = %d
\n
"
,
i
,
ret
);
ok
(
out
.
pos
==
I10_OUTPUT_tests
[
i
].
out
.
pos
,
"%d: out.pos = %hd
\n
"
,
i
,
out
.
pos
);
ok
(
out
.
sign
==
I10_OUTPUT_tests
[
i
].
out
.
sign
,
"%d: out.size = %c
\n
"
,
i
,
out
.
sign
);
...
...
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