msvcrt: Import llround 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
668cf2e66d
commit
389e0532fe
|
@ -19635,7 +19635,6 @@ for ac_func in \
|
|||
lgammaf \
|
||||
llrint \
|
||||
llrintf \
|
||||
llround \
|
||||
log1p \
|
||||
log1pf \
|
||||
log2 \
|
||||
|
|
|
@ -2678,7 +2678,6 @@ AC_CHECK_FUNCS(\
|
|||
lgammaf \
|
||||
llrint \
|
||||
llrintf \
|
||||
llround \
|
||||
log1p \
|
||||
log1pf \
|
||||
log2 \
|
||||
|
|
|
@ -4376,10 +4376,17 @@ __msvcrt_long CDECL lroundf(float x)
|
|||
|
||||
/*********************************************************************
|
||||
* llround (MSVCR120.@)
|
||||
*
|
||||
* Copied from musl: src/math/llround.c
|
||||
*/
|
||||
__int64 CDECL llround(double x)
|
||||
{
|
||||
return unix_funcs->llround( x );
|
||||
double d = round(x);
|
||||
if (d != (double)(__int64)d) {
|
||||
*_errno() = EDOM;
|
||||
return 0;
|
||||
}
|
||||
return d;
|
||||
}
|
||||
|
||||
/*********************************************************************
|
||||
|
|
|
@ -789,18 +789,6 @@ static int CDECL unix_lroundf(float x)
|
|||
#endif
|
||||
}
|
||||
|
||||
/*********************************************************************
|
||||
* llround
|
||||
*/
|
||||
static __int64 CDECL unix_llround(double x)
|
||||
{
|
||||
#ifdef HAVE_LLROUND
|
||||
return llround(x);
|
||||
#else
|
||||
return unix_round(x);
|
||||
#endif
|
||||
}
|
||||
|
||||
/*********************************************************************
|
||||
* sin
|
||||
*/
|
||||
|
@ -956,7 +944,6 @@ static const struct unix_funcs funcs =
|
|||
unix_lgammaf,
|
||||
unix_llrint,
|
||||
unix_llrintf,
|
||||
unix_llround,
|
||||
unix_log,
|
||||
unix_logf,
|
||||
unix_log10,
|
||||
|
|
|
@ -62,7 +62,6 @@ struct unix_funcs
|
|||
float (CDECL *lgammaf)(float x);
|
||||
__int64 (CDECL *llrint)(double x);
|
||||
__int64 (CDECL *llrintf)(float x);
|
||||
__int64 (CDECL *llround)(double x);
|
||||
double (CDECL *log)(double x);
|
||||
float (CDECL *logf)(float x);
|
||||
double (CDECL *log10)(double x);
|
||||
|
|
|
@ -459,9 +459,6 @@
|
|||
/* Define to 1 if you have the `llrintf' function. */
|
||||
#undef HAVE_LLRINTF
|
||||
|
||||
/* Define to 1 if you have the `llround' function. */
|
||||
#undef HAVE_LLROUND
|
||||
|
||||
/* Define to 1 if you have the `log1p' function. */
|
||||
#undef HAVE_LOG1P
|
||||
|
||||
|
|
Loading…
Reference in New Issue