From e037e84d9556ab34350031e1bca59d70bc2ec1a4 Mon Sep 17 00:00:00 2001 From: Daniel Lehman Date: Mon, 28 Mar 2016 11:17:22 -0700 Subject: [PATCH 2/2] msvcr120: Add remainder Signed-off-by: Daniel Lehman --- configure.ac | 2 ++ .../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 | 34 ++++++++++++++++++++++ dlls/ucrtbase/ucrtbase.spec | 6 ++-- include/config.h.in | 6 ++++ 7 files changed, 54 insertions(+), 12 deletions(-) diff --git a/configure.ac b/configure.ac index 20478df..6189aa9 100644 --- a/configure.ac +++ b/configure.ac @@ -2534,6 +2534,8 @@ AC_CHECK_FUNCS(\ lrintf \ lround \ lroundf \ + remainder \ + remainderf \ rint \ rintf \ round \ 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 bb4c3e7..12b6489 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 @@ -304,9 +304,9 @@ @ stub norml @ cdecl pow(double double) ucrtbase.pow @ cdecl -arch=arm,x86_64 powf(float float) ucrtbase.powf -@ stub remainder -@ stub remainderf -@ stub remainderl +@ cdecl remainder(double double) ucrtbase.remainder +@ cdecl remainderf(float float) ucrtbase.remainderf +@ cdecl remainderl(double double) ucrtbase.remainderl @ stub remquo @ stub remquof @ stub remquol diff --git a/dlls/msvcr120/msvcr120.spec b/dlls/msvcr120/msvcr120.spec index 58d04e1..ad9749a 100644 --- a/dlls/msvcr120/msvcr120.spec +++ b/dlls/msvcr120/msvcr120.spec @@ -2324,9 +2324,9 @@ @ cdecl rand() MSVCRT_rand @ cdecl rand_s(ptr) MSVCRT_rand_s @ cdecl realloc(ptr long) MSVCRT_realloc -@ stub remainder -@ stub remainderf -@ stub remainderl +@ cdecl remainder(double double) MSVCR120_remainder +@ cdecl remainderf(float float) MSVCR120_remainderf +@ cdecl remainderl(double double) MSVCR120_remainderl @ cdecl remove(str) MSVCRT_remove @ stub remquo @ stub remquof diff --git a/dlls/msvcr120_app/msvcr120_app.spec b/dlls/msvcr120_app/msvcr120_app.spec index 6cb84df..1b1d3de 100644 --- a/dlls/msvcr120_app/msvcr120_app.spec +++ b/dlls/msvcr120_app/msvcr120_app.spec @@ -1987,9 +1987,9 @@ @ cdecl rand() msvcr120.rand @ cdecl rand_s(ptr) msvcr120.rand_s @ cdecl realloc(ptr long) msvcr120.realloc -@ stub remainder -@ stub remainderf -@ stub remainderl +@ cdecl remainder(double double) msvcr120.remainder +@ cdecl remainderf(float float) msvcr120.remainderf +@ cdecl remainderl(double double) msvcr120.remainderl @ cdecl remove(str) msvcr120.remove @ stub remquo @ stub remquof diff --git a/dlls/msvcrt/math.c b/dlls/msvcrt/math.c index bd0b92b..9881cd4 100644 --- a/dlls/msvcrt/math.c +++ b/dlls/msvcrt/math.c @@ -2790,3 +2790,37 @@ LDOUBLE CDECL MSVCR120_scalbnl(LDOUBLE num, MSVCRT_long power) { return MSVCRT__scalb(num, power); } + +/********************************************************************* + * remainder (MSVCR120.@) + */ +double CDECL MSVCR120_remainder(double x, double y) +{ +#ifdef HAVE_REMAINDER + return remainder(x, y); +#else + FIXME( "not implemented\n" ); + return 0.0; +#endif +} + +/********************************************************************* + * remainderf (MSVCR120.@) + */ +float CDECL MSVCR120_remainderf(float x, float y) +{ +#ifdef HAVE_REMAINDERF + return remainderf(x, y); +#else + FIXME( "not implemented\n" ); + return 0.0f; +#endif +} + +/********************************************************************* + * remainderl (MSVCR120.@) + */ +LDOUBLE CDECL MSVCR120_remainderl(LDOUBLE x, LDOUBLE y) +{ + return MSVCR120_remainder(x, y); +} diff --git a/dlls/ucrtbase/ucrtbase.spec b/dlls/ucrtbase/ucrtbase.spec index 5c86de8..bba4079 100644 --- a/dlls/ucrtbase/ucrtbase.spec +++ b/dlls/ucrtbase/ucrtbase.spec @@ -2458,9 +2458,9 @@ @ cdecl rand() MSVCRT_rand @ cdecl rand_s(ptr) MSVCRT_rand_s @ cdecl realloc(ptr long) MSVCRT_realloc -@ stub remainder -@ stub remainderf -@ stub remainderl +@ cdecl remainder(double double) MSVCR120_remainder +@ cdecl remainderf(float float) MSVCR120_remainderf +@ cdecl remainderl(double double) MSVCR120_remainderl @ cdecl remove(str) MSVCRT_remove @ stub remquo @ stub remquof diff --git a/include/config.h.in b/include/config.h.in index cb0ddd6..0650f31 100644 --- a/include/config.h.in +++ b/include/config.h.in @@ -726,6 +726,12 @@ /* Define to 1 if you have the `readlink' function. */ #undef HAVE_READLINK +/* Define to 1 if you have the `remainder' function. */ +#undef HAVE_REMAINDER + +/* Define to 1 if you have the `remainderf' function. */ +#undef HAVE_REMAINDERF + /* Define to 1 if the system has the type `request_sense'. */ #undef HAVE_REQUEST_SENSE -- 1.9.5