Signed-off-by: Martin Storsjo martin@martin.st --- .../api-ms-win-crt-math-l1-1-0.spec | 6 ++--- dlls/msvcr120/msvcr120.spec | 6 ++--- dlls/msvcr120_app/msvcr120_app.spec | 6 ++--- dlls/msvcrt/math.c | 24 +++++++++++++++++++ dlls/ucrtbase/ucrtbase.spec | 6 ++--- 5 files changed, 36 insertions(+), 12 deletions(-)
diff --git a/dlls/api-ms-win-crt-math-l1-1-0/api-ms-win-crt-math-l1-1-0.spec b/dlls/api-ms-win-crt-math-l1-1-0/api-ms-win-crt-math-l1-1-0.spec index 736ffc6cc2..eb7017f2f5 100644 --- a/dlls/api-ms-win-crt-math-l1-1-0/api-ms-win-crt-math-l1-1-0.spec +++ b/dlls/api-ms-win-crt-math-l1-1-0/api-ms-win-crt-math-l1-1-0.spec @@ -236,9 +236,9 @@ @ cdecl expm1l(double) ucrtbase.expm1l @ cdecl fabs(double) ucrtbase.fabs @ cdecl -arch=arm,arm64 fabsf(float) ucrtbase.fabsf -@ stub fdim -@ stub fdimf -@ stub fdiml +@ cdecl fdim(double double) ucrtbase.fdim +@ cdecl fdimf(float float) ucrtbase.fdimf +@ cdecl fdiml(double double) ucrtbase.fdiml @ cdecl floor(double) ucrtbase.floor @ cdecl -arch=arm,x86_64,arm64 floorf(float) ucrtbase.floorf @ cdecl fma(double double double) ucrtbase.fma diff --git a/dlls/msvcr120/msvcr120.spec b/dlls/msvcr120/msvcr120.spec index 0204982533..469bc0100e 100644 --- a/dlls/msvcr120/msvcr120.spec +++ b/dlls/msvcr120/msvcr120.spec @@ -2140,9 +2140,9 @@ @ cdecl fabs(double) MSVCRT_fabs @ cdecl -arch=arm,x86_64,arm64 fabsf(float) MSVCRT_fabsf @ cdecl fclose(ptr) MSVCRT_fclose -@ stub fdim -@ stub fdimf -@ stub fdiml +@ cdecl fdim(double double) MSVCR120_fdim +@ cdecl fdimf(float float) MSVCR120_fdimf +@ cdecl fdiml(double double) MSVCR120_fdim @ stub feclearexcept @ cdecl fegetenv(ptr) MSVCRT_fegetenv @ stub fegetexceptflag diff --git a/dlls/msvcr120_app/msvcr120_app.spec b/dlls/msvcr120_app/msvcr120_app.spec index 499beeae5f..f9e3a0087f 100644 --- a/dlls/msvcr120_app/msvcr120_app.spec +++ b/dlls/msvcr120_app/msvcr120_app.spec @@ -1806,9 +1806,9 @@ @ cdecl fabs(double) msvcr120.fabs @ cdecl -arch=arm,x86_64,arm64 fabsf(float) msvcr120.fabsf @ cdecl fclose(ptr) msvcr120.fclose -@ stub fdim -@ stub fdimf -@ stub fdiml +@ cdecl fdim(double double) msvcr120.fdim +@ cdecl fdimf(float float) msvcr120.fdimf +@ cdecl fdiml(double double) msvcr120.fdiml @ stub feclearexcept @ cdecl fegetenv(ptr) msvcr120.fegetenv @ stub fegetexceptflag diff --git a/dlls/msvcrt/math.c b/dlls/msvcrt/math.c index 3295c87c45..ef7b1bb3fa 100644 --- a/dlls/msvcrt/math.c +++ b/dlls/msvcrt/math.c @@ -3023,6 +3023,30 @@ double CDECL MSVCR120_fmax(double x, double y) return x<y ? y : x; }
+/********************************************************************* + * fdimf (MSVCR120.@) + */ +float CDECL MSVCR120_fdimf(float x, float y) +{ + if(isnan(x)) + return x; + if(isnan(y)) + return y; + return x>y ? x-y : 0; +} + +/********************************************************************* + * fdim (MSVCR120.@) + */ +double CDECL MSVCR120_fdim(double x, double y) +{ + if(isnan(x)) + return x; + if(isnan(y)) + return y; + return x>y ? x-y : 0; +} + /********************************************************************* * _fdsign (MSVCR120.@) */ diff --git a/dlls/ucrtbase/ucrtbase.spec b/dlls/ucrtbase/ucrtbase.spec index f1865c85ad..2a5fdf2893 100644 --- a/dlls/ucrtbase/ucrtbase.spec +++ b/dlls/ucrtbase/ucrtbase.spec @@ -2283,9 +2283,9 @@ @ cdecl fabs(double) MSVCRT_fabs @ cdecl -arch=arm,arm64 fabsf(float) MSVCRT_fabsf @ cdecl fclose(ptr) MSVCRT_fclose -@ stub fdim -@ stub fdimf -@ stub fdiml +@ cdecl fdim(double double) MSVCR120_fdim +@ cdecl fdimf(float float) MSVCR120_fdimf +@ cdecl fdiml(double double) MSVCR120_fdim @ stub feclearexcept @ cdecl fegetenv(ptr) MSVCRT_fegetenv @ stub fegetexceptflag