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
20126676
Commit
20126676
authored
Jan 31, 2022
by
Piotr Caban
Committed by
Alexandre Julliard
Feb 01, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Don't use fegetenv in nearbyintf.
Signed-off-by:
Piotr Caban
<
piotr@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
5d9d195f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
5 deletions
+17
-5
math.c
dlls/msvcrt/math.c
+17
-5
No files found.
dlls/msvcrt/math.c
View file @
20126676
...
...
@@ -6873,13 +6873,25 @@ double CDECL nearbyint(double x)
*/
float
CDECL
nearbyintf
(
float
x
)
{
fenv_t
env
;
BOOL
update_cw
,
update_sw
;
unsigned
int
cw
,
sw
;
fegetenv
(
&
env
);
_control87
(
_MCW_EM
,
_MCW_EM
);
_setfp
(
&
cw
,
0
,
&
sw
,
0
);
update_cw
=
!
(
cw
&
_EM_INEXACT
);
update_sw
=
!
(
sw
&
_SW_INEXACT
);
if
(
update_cw
)
{
cw
|=
_EM_INEXACT
;
_setfp
(
&
cw
,
_EM_INEXACT
,
NULL
,
0
);
}
x
=
rintf
(
x
);
feclearexcept
(
FE_INEXACT
);
feupdateenv
(
&
env
);
if
(
update_cw
||
update_sw
)
{
sw
=
0
;
cw
&=
~
_EM_INEXACT
;
_setfp
(
update_cw
?
&
cw
:
NULL
,
_EM_INEXACT
,
update_sw
?
&
sw
:
NULL
,
_SW_INEXACT
);
}
return
x
;
}
...
...
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