msvcrt: Import llroundf 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
833e8cdd42
commit
668cf2e66d
|
@ -19636,7 +19636,6 @@ for ac_func in \
|
|||
llrint \
|
||||
llrintf \
|
||||
llround \
|
||||
llroundf \
|
||||
log1p \
|
||||
log1pf \
|
||||
log2 \
|
||||
|
|
|
@ -2679,7 +2679,6 @@ AC_CHECK_FUNCS(\
|
|||
llrint \
|
||||
llrintf \
|
||||
llround \
|
||||
llroundf \
|
||||
log1p \
|
||||
log1pf \
|
||||
log2 \
|
||||
|
|
|
@ -4384,10 +4384,17 @@ __int64 CDECL llround(double x)
|
|||
|
||||
/*********************************************************************
|
||||
* llroundf (MSVCR120.@)
|
||||
*
|
||||
* Copied from musl: src/math/llroundf.c
|
||||
*/
|
||||
__int64 CDECL llroundf(float x)
|
||||
{
|
||||
return unix_funcs->llroundf( x );
|
||||
float f = roundf(x);
|
||||
if (f != (float)(__int64)f) {
|
||||
*_errno() = EDOM;
|
||||
return 0;
|
||||
}
|
||||
return f;
|
||||
}
|
||||
|
||||
/*********************************************************************
|
||||
|
|
|
@ -801,18 +801,6 @@ static __int64 CDECL unix_llround(double x)
|
|||
#endif
|
||||
}
|
||||
|
||||
/*********************************************************************
|
||||
* llroundf
|
||||
*/
|
||||
static __int64 CDECL unix_llroundf(float x)
|
||||
{
|
||||
#ifdef HAVE_LLROUNDF
|
||||
return llroundf(x);
|
||||
#else
|
||||
return unix_llround(x);
|
||||
#endif
|
||||
}
|
||||
|
||||
/*********************************************************************
|
||||
* sin
|
||||
*/
|
||||
|
@ -969,7 +957,6 @@ static const struct unix_funcs funcs =
|
|||
unix_llrint,
|
||||
unix_llrintf,
|
||||
unix_llround,
|
||||
unix_llroundf,
|
||||
unix_log,
|
||||
unix_logf,
|
||||
unix_log10,
|
||||
|
|
|
@ -63,7 +63,6 @@ struct unix_funcs
|
|||
__int64 (CDECL *llrint)(double x);
|
||||
__int64 (CDECL *llrintf)(float x);
|
||||
__int64 (CDECL *llround)(double x);
|
||||
__int64 (CDECL *llroundf)(float x);
|
||||
double (CDECL *log)(double x);
|
||||
float (CDECL *logf)(float x);
|
||||
double (CDECL *log10)(double x);
|
||||
|
|
|
@ -462,9 +462,6 @@
|
|||
/* Define to 1 if you have the `llround' function. */
|
||||
#undef HAVE_LLROUND
|
||||
|
||||
/* Define to 1 if you have the `llroundf' function. */
|
||||
#undef HAVE_LLROUNDF
|
||||
|
||||
/* Define to 1 if you have the `log1p' function. */
|
||||
#undef HAVE_LOG1P
|
||||
|
||||
|
|
Loading…
Reference in New Issue