From e89813fe3cf80e9d4aea13a5f1f651cce4b12c8a Mon Sep 17 00:00:00 2001 From: Daniel Lehman Date: Thu, 21 May 2015 09:25:48 -0700 Subject: [PATCH] msvcr120: Add erf functions. --- configure | 2 ++ configure.ac | 2 ++ dlls/msvcr120/msvcr120.spec | 6 +++--- dlls/msvcr120_app/msvcr120_app.spec | 6 +++--- dlls/msvcrt/math.c | 34 ++++++++++++++++++++++++++++++++++ include/config.h.in | 6 ++++++ 6 files changed, 50 insertions(+), 6 deletions(-) diff --git a/configure b/configure index 28e6c19149c..c571b48c592 100755 --- a/configure +++ b/configure @@ -16572,6 +16572,8 @@ fi for ac_func in \ cbrt \ cbrtf \ + erf \ + erff \ exp2 \ exp2f \ llrint \ diff --git a/configure.ac b/configure.ac index 88eb77bc7eb..c61a975d9c4 100644 --- a/configure.ac +++ b/configure.ac @@ -2590,6 +2590,8 @@ fi AC_CHECK_FUNCS(\ cbrt \ cbrtf \ + erf \ + erff \ exp2 \ exp2f \ llrint \ diff --git a/dlls/msvcr120/msvcr120.spec b/dlls/msvcr120/msvcr120.spec index 1d1196d530c..1a1470e6aef 100644 --- a/dlls/msvcr120/msvcr120.spec +++ b/dlls/msvcr120/msvcr120.spec @@ -2119,12 +2119,12 @@ @ stub ctanhl @ stub ctanl @ cdecl -ret64 div(long long) MSVCRT_div -@ stub erf +@ cdecl erf(double) MSVCR120_erf @ stub erfc @ stub erfcf @ stub erfcl -@ stub erff -@ stub erfl +@ cdecl erff(double) MSVCR120_erff +@ cdecl erfl(double) MSVCR120_erfl @ cdecl exit(long) MSVCRT_exit @ cdecl exp(double) MSVCRT_exp @ cdecl exp2(double) MSVCR120_exp2 diff --git a/dlls/msvcr120_app/msvcr120_app.spec b/dlls/msvcr120_app/msvcr120_app.spec index 7f6be1dbef4..f47f906f9dd 100644 --- a/dlls/msvcr120_app/msvcr120_app.spec +++ b/dlls/msvcr120_app/msvcr120_app.spec @@ -1788,12 +1788,12 @@ @ stub ctanhl @ stub ctanl @ cdecl -ret64 div(long long) msvcr120.div -@ stub erf +@ cdecl erf(double) msvcr120.erf @ stub erfc @ stub erfcf @ stub erfcl -@ stub erff -@ stub erfl +@ cdecl erff(double) msvcr120.erff +@ cdecl erfl(double) msvcr120.erfl @ cdecl exit(long) msvcr120.exit @ cdecl exp(double) msvcr120.exp @ cdecl exp2(double) msvcr120.exp2 diff --git a/dlls/msvcrt/math.c b/dlls/msvcrt/math.c index 6779430a87a..162dcfbeb8e 100644 --- a/dlls/msvcrt/math.c +++ b/dlls/msvcrt/math.c @@ -2607,6 +2607,40 @@ short CDECL MSVCR120__ldtest(LDOUBLE *x) } /********************************************************************* + * erff (MSVCR120.@) + */ +float CDECL MSVCR120_erff(float x) +{ +#ifdef HAVE_ERFF + return erff(x); +#else + FIXME( "not implemented\n" ); + return 0.0f; +#endif +} + +/********************************************************************* + * erf (MSVCR120.@) + */ +double CDECL MSVCR120_erf(double x) +{ +#ifdef HAVE_ERF + return erf(x); +#else + FIXME( "not implemented\n" ); + return 0.0; +#endif +} + +/********************************************************************* + * erfl (MSVCR120.@) + */ +LDOUBLE CDECL MSVCR120_erfl(LDOUBLE x) +{ + return MSVCR120_erf(x); +} + +/********************************************************************* * fmaxf (MSVCR120.@) */ float CDECL MSVCR120_fmaxf(float x, float y) diff --git a/include/config.h.in b/include/config.h.in index bcc6eb90a26..0f435d120e3 100644 --- a/include/config.h.in +++ b/include/config.h.in @@ -111,6 +111,12 @@ /* Define to 1 if you have the `epoll_create' function. */ #undef HAVE_EPOLL_CREATE +/* Define to 1 if you have the `erf' function. */ +#undef HAVE_ERF + +/* Define to 1 if you have the `erff' function. */ +#undef HAVE_ERFF + /* Define to 1 if you have the `exp2' function. */ #undef HAVE_EXP2 -- 2.11.4.GIT