Commit 668cf2e6 authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

msvcrt: Import llroundf implementation from musl.

parent 833e8cdd
...@@ -19636,7 +19636,6 @@ for ac_func in \ ...@@ -19636,7 +19636,6 @@ for ac_func in \
llrint \ llrint \
llrintf \ llrintf \
llround \ llround \
llroundf \
log1p \ log1p \
log1pf \ log1pf \
log2 \ log2 \
......
...@@ -2679,7 +2679,6 @@ AC_CHECK_FUNCS(\ ...@@ -2679,7 +2679,6 @@ AC_CHECK_FUNCS(\
llrint \ llrint \
llrintf \ llrintf \
llround \ llround \
llroundf \
log1p \ log1p \
log1pf \ log1pf \
log2 \ log2 \
......
...@@ -4384,10 +4384,17 @@ __int64 CDECL llround(double x) ...@@ -4384,10 +4384,17 @@ __int64 CDECL llround(double x)
/********************************************************************* /*********************************************************************
* llroundf (MSVCR120.@) * llroundf (MSVCR120.@)
*
* Copied from musl: src/math/llroundf.c
*/ */
__int64 CDECL llroundf(float x) __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;
} }
/********************************************************************* /*********************************************************************
......
...@@ -802,18 +802,6 @@ static __int64 CDECL unix_llround(double x) ...@@ -802,18 +802,6 @@ static __int64 CDECL unix_llround(double x)
} }
/********************************************************************* /*********************************************************************
* llroundf
*/
static __int64 CDECL unix_llroundf(float x)
{
#ifdef HAVE_LLROUNDF
return llroundf(x);
#else
return unix_llround(x);
#endif
}
/*********************************************************************
* sin * sin
*/ */
static double CDECL unix_sin( double x ) static double CDECL unix_sin( double x )
...@@ -969,7 +957,6 @@ static const struct unix_funcs funcs = ...@@ -969,7 +957,6 @@ static const struct unix_funcs funcs =
unix_llrint, unix_llrint,
unix_llrintf, unix_llrintf,
unix_llround, unix_llround,
unix_llroundf,
unix_log, unix_log,
unix_logf, unix_logf,
unix_log10, unix_log10,
......
...@@ -63,7 +63,6 @@ struct unix_funcs ...@@ -63,7 +63,6 @@ struct unix_funcs
__int64 (CDECL *llrint)(double x); __int64 (CDECL *llrint)(double x);
__int64 (CDECL *llrintf)(float x); __int64 (CDECL *llrintf)(float x);
__int64 (CDECL *llround)(double x); __int64 (CDECL *llround)(double x);
__int64 (CDECL *llroundf)(float x);
double (CDECL *log)(double x); double (CDECL *log)(double x);
float (CDECL *logf)(float x); float (CDECL *logf)(float x);
double (CDECL *log10)(double x); double (CDECL *log10)(double x);
......
...@@ -462,9 +462,6 @@ ...@@ -462,9 +462,6 @@
/* Define to 1 if you have the `llround' function. */ /* Define to 1 if you have the `llround' function. */
#undef HAVE_LLROUND #undef HAVE_LLROUND
/* Define to 1 if you have the `llroundf' function. */
#undef HAVE_LLROUNDF
/* Define to 1 if you have the `log1p' function. */ /* Define to 1 if you have the `log1p' function. */
#undef HAVE_LOG1P #undef HAVE_LOG1P
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment