msvcrt: Import remainderf implementation from musl.
Signed-off-by: Piotr Caban <piotr@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
fd22e3b61b
commit
b48e80a520
|
@ -19638,7 +19638,6 @@ for ac_func in \
|
|||
log1pf \
|
||||
log2 \
|
||||
log2f \
|
||||
remainderf \
|
||||
tgamma \
|
||||
tgammaf
|
||||
|
||||
|
|
|
@ -2678,7 +2678,6 @@ AC_CHECK_FUNCS(\
|
|||
log1pf \
|
||||
log2 \
|
||||
log2f \
|
||||
remainderf \
|
||||
tgamma \
|
||||
tgammaf
|
||||
)
|
||||
|
|
|
@ -5488,13 +5488,16 @@ double CDECL remainder(double x, double y)
|
|||
|
||||
/*********************************************************************
|
||||
* remainderf (MSVCR120.@)
|
||||
*
|
||||
* Copied from musl: src/math/remainderf.c
|
||||
*/
|
||||
float CDECL remainderf(float x, float y)
|
||||
{
|
||||
/* this matches 64-bit Windows. 32-bit Windows is slightly different */
|
||||
if(!isfinite(x)) *_errno() = EDOM;
|
||||
if(isnan(y) || y==0.0f) *_errno() = EDOM;
|
||||
return unix_funcs->remainderf( x, y );
|
||||
int q;
|
||||
#if _MSVCR_VER == 120 && defined(__x86_64__)
|
||||
if (isnan(x) || isnan(y)) *_errno() = EDOM;
|
||||
#endif
|
||||
return remquof(x, y, &q);
|
||||
}
|
||||
|
||||
/*********************************************************************
|
||||
|
|
|
@ -475,19 +475,6 @@ static float CDECL unix_powf( float x, float y )
|
|||
return powf( x, y );
|
||||
}
|
||||
|
||||
/*********************************************************************
|
||||
* remainderf
|
||||
*/
|
||||
static float CDECL unix_remainderf(float x, float y)
|
||||
{
|
||||
#ifdef HAVE_REMAINDERF
|
||||
return remainderf(x, y);
|
||||
#else
|
||||
FIXME( "not implemented\n" );
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
/*********************************************************************
|
||||
* sin
|
||||
*/
|
||||
|
@ -621,7 +608,6 @@ static const struct unix_funcs funcs =
|
|||
unix_logbf,
|
||||
unix_pow,
|
||||
unix_powf,
|
||||
unix_remainderf,
|
||||
unix_sin,
|
||||
unix_sinf,
|
||||
unix_sinh,
|
||||
|
|
|
@ -64,7 +64,6 @@ struct unix_funcs
|
|||
float (CDECL *logbf)(float x);
|
||||
double (CDECL *pow)(double x, double y);
|
||||
float (CDECL *powf)(float x, float y);
|
||||
float (CDECL *remainderf)(float x, float y);
|
||||
double (CDECL *sin)(double x);
|
||||
float (CDECL *sinf)(float x);
|
||||
double (CDECL *sinh)(double x);
|
||||
|
|
|
@ -630,9 +630,6 @@
|
|||
/* Define to 1 if you have the `readlink' function. */
|
||||
#undef HAVE_READLINK
|
||||
|
||||
/* Define to 1 if you have the `remainderf' function. */
|
||||
#undef HAVE_REMAINDERF
|
||||
|
||||
/* Define to 1 if the system has the type `request_sense'. */
|
||||
#undef HAVE_REQUEST_SENSE
|
||||
|
||||
|
|
Loading…
Reference in New Issue