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
0838c995
Commit
0838c995
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: Implement lrint using rint function.
Signed-off-by:
Piotr Caban
<
piotr@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
ad2ecc6e
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
9 additions
and
20 deletions
+9
-20
configure
configure
+0
-1
configure.ac
configure.ac
+0
-1
math.c
dlls/msvcrt/math.c
+9
-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 @
0838c995
...
...
@@ -19642,7 +19642,6 @@ for ac_func in \
log1pf
\
log2
\
log2f
\
lrint
\
lrintf
\
nearbyint
\
nearbyintf
\
...
...
configure.ac
View file @
0838c995
...
...
@@ -2682,7 +2682,6 @@ AC_CHECK_FUNCS(\
log1pf \
log2 \
log2f \
lrint \
lrintf \
nearbyint \
nearbyintf \
...
...
dlls/msvcrt/math.c
View file @
0838c995
...
...
@@ -4340,7 +4340,15 @@ float CDECL rintf(float x)
*/
__msvcrt_long
CDECL
lrint
(
double
x
)
{
return
unix_funcs
->
lrint
(
x
);
double
d
;
d
=
rint
(
x
);
if
((
d
<
0
&&
d
!=
(
double
)(
__msvcrt_long
)
d
)
||
(
d
>=
0
&&
d
!=
(
double
)(
__msvcrt_ulong
)
d
))
{
*
_errno
()
=
EDOM
;
return
0
;
}
return
d
;
}
/*********************************************************************
...
...
dlls/msvcrt/unixlib.c
View file @
0838c995
...
...
@@ -556,18 +556,6 @@ static float CDECL unix_logbf( float x )
}
/*********************************************************************
* lrint
*/
static
int
CDECL
unix_lrint
(
double
x
)
{
#ifdef HAVE_LRINT
return
lrint
(
x
);
#else
return
x
>=
0
?
floor
(
x
+
0
.
5
)
:
ceil
(
x
-
0
.
5
);
#endif
}
/*********************************************************************
* lrintf
*/
static
int
CDECL
unix_lrintf
(
float
x
)
...
...
@@ -894,7 +882,6 @@ static const struct unix_funcs funcs =
unix_log2f
,
unix_logb
,
unix_logbf
,
unix_lrint
,
unix_lrintf
,
unix_modf
,
unix_modff
,
...
...
dlls/msvcrt/unixlib.h
View file @
0838c995
...
...
@@ -72,7 +72,6 @@ struct unix_funcs
float
(
CDECL
*
log2f
)(
float
x
);
double
(
CDECL
*
logb
)(
double
x
);
float
(
CDECL
*
logbf
)(
float
x
);
int
(
CDECL
*
lrint
)(
double
x
);
int
(
CDECL
*
lrintf
)(
float
x
);
double
(
CDECL
*
modf
)(
double
x
,
double
*
iptr
);
float
(
CDECL
*
modff
)(
float
x
,
float
*
iptr
);
...
...
include/config.h.in
View file @
0838c995
...
...
@@ -471,9 +471,6 @@
/* Define to 1 if you have the `log2f' function. */
#undef HAVE_LOG2F
/* Define to 1 if you have the `lrint' function. */
#undef HAVE_LRINT
/* Define to 1 if you have the `lrintf' function. */
#undef HAVE_LRINTF
...
...
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