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
c12ff71c
Commit
c12ff71c
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 nexttowardf implementation from musl.
Signed-off-by:
Piotr Caban
<
piotr@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
ac4e6759
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
36 additions
and
25 deletions
+36
-25
configure
configure
+0
-1
configure.ac
configure.ac
+0
-1
math.c
dlls/msvcrt/math.c
+36
-5
unixlib.c
dlls/msvcrt/unixlib.c
+0
-14
unixlib.h
dlls/msvcrt/unixlib.h
+0
-1
config.h.in
include/config.h.in
+0
-3
No files found.
configure
View file @
c12ff71c
...
@@ -19640,7 +19640,6 @@ for ac_func in \
...
@@ -19640,7 +19640,6 @@ for ac_func in \
log1pf
\
log1pf
\
log2
\
log2
\
log2f
\
log2f
\
nexttowardf
\
remainder
\
remainder
\
remainderf
\
remainderf
\
remquo
\
remquo
\
...
...
configure.ac
View file @
c12ff71c
...
@@ -2680,7 +2680,6 @@ AC_CHECK_FUNCS(\
...
@@ -2680,7 +2680,6 @@ AC_CHECK_FUNCS(\
log1pf \
log1pf \
log2 \
log2 \
log2f \
log2f \
nexttowardf \
remainder \
remainder \
remainderf \
remainderf \
remquo \
remquo \
...
...
dlls/msvcrt/math.c
View file @
c12ff71c
...
@@ -3492,13 +3492,44 @@ double CDECL MSVCRT_nexttoward(double num, double next)
...
@@ -3492,13 +3492,44 @@ double CDECL MSVCRT_nexttoward(double num, double next)
/*********************************************************************
/*********************************************************************
* nexttowardf (MSVCR120.@)
* nexttowardf (MSVCR120.@)
*
* Copied from musl: src/math/nexttowardf.c
*/
*/
float
CDECL
MSVCRT_nexttowardf
(
float
num
,
double
next
)
float
CDECL
MSVCRT_nexttowardf
(
float
x
,
double
y
)
{
{
float
ret
=
unix_funcs
->
nexttowardf
(
num
,
next
);
unsigned
int
ix
=
*
(
unsigned
int
*
)
&
x
;
if
(
!
(
_fpclass
(
ret
)
&
(
_FPCLASS_PN
|
_FPCLASS_NN
unsigned
int
e
;
|
_FPCLASS_SNAN
|
_FPCLASS_QNAN
))
&&
!
isinf
(
num
))
float
ret
;
{
if
(
isnan
(
x
)
||
isnan
(
y
))
return
x
+
y
;
if
(
x
==
y
)
return
y
;
if
(
x
==
0
)
{
ix
=
1
;
if
(
signbit
(
y
))
ix
|=
0x80000000
;
}
else
if
(
x
<
y
)
{
if
(
signbit
(
x
))
ix
--
;
else
ix
++
;
}
else
{
if
(
signbit
(
x
))
ix
++
;
else
ix
--
;
}
e
=
ix
&
0x7f800000
;
/* raise overflow if ix is infinite and x is finite */
if
(
e
==
0x7f800000
)
{
fp_barrierf
(
x
+
x
);
*
_errno
()
=
ERANGE
;
}
ret
=
*
(
float
*
)
&
ix
;
/* raise underflow if ret is subnormal or zero */
if
(
e
==
0
)
{
fp_barrierf
(
x
*
x
+
ret
*
ret
);
*
_errno
()
=
ERANGE
;
*
_errno
()
=
ERANGE
;
}
}
return
ret
;
return
ret
;
...
...
dlls/msvcrt/unixlib.c
View file @
c12ff71c
...
@@ -548,19 +548,6 @@ static float CDECL unix_modff( float x, float *iptr )
...
@@ -548,19 +548,6 @@ static float CDECL unix_modff( float x, float *iptr )
}
}
/*********************************************************************
/*********************************************************************
* nexttowardf
*/
static
float
CDECL
unix_nexttowardf
(
float
num
,
double
next
)
{
#ifdef HAVE_NEXTTOWARDF
return
nexttowardf
(
num
,
next
);
#else
FIXME
(
"not implemented
\n
"
);
return
0
;
#endif
}
/*********************************************************************
* pow
* pow
*/
*/
static
double
CDECL
unix_pow
(
double
x
,
double
y
)
static
double
CDECL
unix_pow
(
double
x
,
double
y
)
...
@@ -793,7 +780,6 @@ static const struct unix_funcs funcs =
...
@@ -793,7 +780,6 @@ static const struct unix_funcs funcs =
unix_logbf
,
unix_logbf
,
unix_modf
,
unix_modf
,
unix_modff
,
unix_modff
,
unix_nexttowardf
,
unix_pow
,
unix_pow
,
unix_powf
,
unix_powf
,
unix_remainder
,
unix_remainder
,
...
...
dlls/msvcrt/unixlib.h
View file @
c12ff71c
...
@@ -72,7 +72,6 @@ struct unix_funcs
...
@@ -72,7 +72,6 @@ struct unix_funcs
float
(
CDECL
*
logbf
)(
float
x
);
float
(
CDECL
*
logbf
)(
float
x
);
double
(
CDECL
*
modf
)(
double
x
,
double
*
iptr
);
double
(
CDECL
*
modf
)(
double
x
,
double
*
iptr
);
float
(
CDECL
*
modff
)(
float
x
,
float
*
iptr
);
float
(
CDECL
*
modff
)(
float
x
,
float
*
iptr
);
float
(
CDECL
*
nexttowardf
)(
float
x
,
double
y
);
double
(
CDECL
*
pow
)(
double
x
,
double
y
);
double
(
CDECL
*
pow
)(
double
x
,
double
y
);
float
(
CDECL
*
powf
)(
float
x
,
float
y
);
float
(
CDECL
*
powf
)(
float
x
,
float
y
);
double
(
CDECL
*
remainder
)(
double
x
,
double
y
);
double
(
CDECL
*
remainder
)(
double
x
,
double
y
);
...
...
include/config.h.in
View file @
c12ff71c
...
@@ -567,9 +567,6 @@
...
@@ -567,9 +567,6 @@
/* Define to 1 if you have the <net/route.h> header file. */
/* Define to 1 if you have the <net/route.h> header file. */
#undef HAVE_NET_ROUTE_H
#undef HAVE_NET_ROUTE_H
/* Define to 1 if you have the `nexttowardf' function. */
#undef HAVE_NEXTTOWARDF
/* Define to 1 if `_msg_ptr' is a member of `ns_msg'. */
/* Define to 1 if `_msg_ptr' is a member of `ns_msg'. */
#undef HAVE_NS_MSG__MSG_PTR
#undef HAVE_NS_MSG__MSG_PTR
...
...
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