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
ad2ecc6e
Commit
ad2ecc6e
authored
May 10, 2021
by
Piotr Caban
Committed by
Alexandre Julliard
May 10, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Import rintf implementation from musl.
Signed-off-by:
Piotr Caban
<
piotr@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
cba9981c
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
18 additions
and
20 deletions
+18
-20
configure
configure
+0
-1
configure.ac
configure.ac
+0
-1
math.c
dlls/msvcrt/math.c
+18
-1
unixlib.c
dlls/msvcrt/unixlib.c
+0
-13
unixlib.h
dlls/msvcrt/unixlib.h
+0
-1
config.h.in
include/config.h.in
+0
-3
No files found.
configure
View file @
ad2ecc6e
...
...
@@ -19652,7 +19652,6 @@ for ac_func in \
remainderf
\
remquo
\
remquof
\
rintf
\
tgamma
\
tgammaf
\
trunc
\
...
...
configure.ac
View file @
ad2ecc6e
...
...
@@ -2692,7 +2692,6 @@ AC_CHECK_FUNCS(\
remainderf \
remquo \
remquof \
rintf \
tgamma \
tgammaf \
trunc \
...
...
dlls/msvcrt/math.c
View file @
ad2ecc6e
...
...
@@ -4312,10 +4312,27 @@ double CDECL rint(double x)
/*********************************************************************
* rintf (MSVCR120.@)
*
* Copied from musl: src/math/rintf.c
*/
float
CDECL
rintf
(
float
x
)
{
return
unix_funcs
->
rintf
(
x
);
static
const
float
toint
=
1
/
FLT_EPSILON
;
unsigned
int
ix
=
*
(
unsigned
int
*
)
&
x
;
int
e
=
ix
>>
23
&
0xff
;
int
s
=
ix
>>
31
;
float
y
;
if
(
e
>=
0x7f
+
23
)
return
x
;
if
(
s
)
y
=
fp_barrierf
(
x
-
toint
)
+
toint
;
else
y
=
fp_barrierf
(
x
+
toint
)
-
toint
;
if
(
y
==
0
)
return
s
?
-
0
.
0
f
:
0
.
0
f
;
return
y
;
}
/*********************************************************************
...
...
dlls/msvcrt/unixlib.c
View file @
ad2ecc6e
...
...
@@ -730,18 +730,6 @@ static float CDECL unix_remquof(float x, float y, int *quo)
}
/*********************************************************************
* rintf
*/
static
float
CDECL
unix_rintf
(
float
x
)
{
#ifdef HAVE_RINTF
return
rintf
(
x
);
#else
return
x
>=
0
?
floorf
(
x
+
0
.
5
)
:
ceilf
(
x
-
0
.
5
);
#endif
}
/*********************************************************************
* sin
*/
static
double
CDECL
unix_sin
(
double
x
)
...
...
@@ -922,7 +910,6 @@ static const struct unix_funcs funcs =
unix_remainderf
,
unix_remquo
,
unix_remquof
,
unix_rintf
,
unix_sin
,
unix_sinf
,
unix_sinh
,
...
...
dlls/msvcrt/unixlib.h
View file @
ad2ecc6e
...
...
@@ -88,7 +88,6 @@ struct unix_funcs
float
(
CDECL
*
remainderf
)(
float
x
,
float
y
);
double
(
CDECL
*
remquo
)(
double
x
,
double
y
,
int
*
quo
);
float
(
CDECL
*
remquof
)(
float
x
,
float
y
,
int
*
quo
);
float
(
CDECL
*
rintf
)(
float
x
);
double
(
CDECL
*
sin
)(
double
x
);
float
(
CDECL
*
sinf
)(
float
x
);
double
(
CDECL
*
sinh
)(
double
x
);
...
...
include/config.h.in
View file @
ad2ecc6e
...
...
@@ -684,9 +684,6 @@
/* Define to 1 if you have the `res_getservers' function. */
#undef HAVE_RES_GETSERVERS
/* Define to 1 if you have the `rintf' function. */
#undef HAVE_RINTF
/* Define to 1 if you have the <sasl/sasl.h> header file. */
#undef HAVE_SASL_SASL_H
...
...
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