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
854a3cab
Commit
854a3cab
authored
May 14, 2021
by
Piotr Caban
Committed by
Alexandre Julliard
May 14, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Import neabyint implementation from musl.
Signed-off-by:
Piotr Caban
<
piotr@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
2caca437
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
11 additions
and
21 deletions
+11
-21
configure
configure
+0
-1
configure.ac
configure.ac
+0
-1
math.c
dlls/msvcrt/math.c
+11
-2
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 @
854a3cab
...
...
@@ -19640,7 +19640,6 @@ for ac_func in \
log1pf
\
log2
\
log2f
\
nearbyint
\
nexttoward
\
nexttowardf
\
remainder
\
...
...
configure.ac
View file @
854a3cab
...
...
@@ -2680,7 +2680,6 @@ AC_CHECK_FUNCS(\
log1pf \
log2 \
log2f \
nearbyint \
nexttoward \
nexttowardf \
remainder \
...
...
dlls/msvcrt/math.c
View file @
854a3cab
...
...
@@ -3418,10 +3418,19 @@ double CDECL _yn(int n, double x)
/*********************************************************************
* _nearbyint (MSVCR120.@)
*
* Based on musl: src/math/nearbyteint.c
*/
double
CDECL
nearbyint
(
double
num
)
double
CDECL
nearbyint
(
double
x
)
{
return
unix_funcs
->
nearbyint
(
num
);
fenv_t
env
;
fegetenv
(
&
env
);
_control87
(
_MCW_EM
,
_MCW_EM
);
x
=
rint
(
x
);
feclearexcept
(
FE_INEXACT
);
feupdateenv
(
&
env
);
return
x
;
}
/*********************************************************************
...
...
dlls/msvcrt/unixlib.c
View file @
854a3cab
...
...
@@ -548,18 +548,6 @@ static float CDECL unix_modff( float x, float *iptr )
}
/*********************************************************************
* nearbyint
*/
static
double
CDECL
unix_nearbyint
(
double
num
)
{
#ifdef HAVE_NEARBYINT
return
nearbyint
(
num
);
#else
return
num
>=
0
?
floor
(
num
+
0
.
5
)
:
ceil
(
num
-
0
.
5
);
#endif
}
/*********************************************************************
* nextafter
*/
static
double
CDECL
unix_nextafter
(
double
num
,
double
next
)
...
...
@@ -834,7 +822,6 @@ static const struct unix_funcs funcs =
unix_logbf
,
unix_modf
,
unix_modff
,
unix_nearbyint
,
unix_nextafter
,
unix_nextafterf
,
unix_nexttoward
,
...
...
dlls/msvcrt/unixlib.h
View file @
854a3cab
...
...
@@ -72,7 +72,6 @@ struct unix_funcs
float
(
CDECL
*
logbf
)(
float
x
);
double
(
CDECL
*
modf
)(
double
x
,
double
*
iptr
);
float
(
CDECL
*
modff
)(
float
x
,
float
*
iptr
);
double
(
CDECL
*
nearbyint
)(
double
num
);
double
(
CDECL
*
nextafter
)(
double
x
,
double
y
);
float
(
CDECL
*
nextafterf
)(
float
x
,
float
y
);
double
(
CDECL
*
nexttoward
)(
double
x
,
double
y
);
...
...
include/config.h.in
View file @
854a3cab
...
...
@@ -501,9 +501,6 @@
/* Define if MTLDevice protocol has registryID property. */
#undef HAVE_MTLDEVICE_REGISTRYID
/* Define to 1 if you have the `nearbyint' function. */
#undef HAVE_NEARBYINT
/* Define to 1 if you have the <netdb.h> header file. */
#undef HAVE_NETDB_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