Signed-off-by: Martin Storsjo martin@martin.st --- 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 | 38 +++++++++++++++++++ dlls/ucrtbase/ucrtbase.spec | 6 +-- 6 files changed, 52 insertions(+), 12 deletions(-)
diff --git a/configure.ac b/configure.ac index 67b360d9a9..a38a9873df 100644 --- a/configure.ac +++ b/configure.ac @@ -2728,6 +2728,8 @@ AC_CHECK_FUNCS(\ powl \ remainder \ remainderf \ + remquo \ + remquof \ 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 dea5094a91..b9fb2dcda5 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 @@ -308,9 +308,9 @@ @ cdecl remainder(double double) ucrtbase.remainder @ cdecl remainderf(float float) ucrtbase.remainderf @ cdecl remainderl(double double) ucrtbase.remainderl -@ stub remquo -@ stub remquof -@ stub remquol +@ cdecl remquo(double double ptr) ucrtbase.remquo +@ cdecl remquof(float float ptr) ucrtbase.remquof +@ cdecl remquol(double double) ucrtbase.remquol @ cdecl rint(double) ucrtbase.rint @ cdecl rintf(float) ucrtbase.rintf @ cdecl rintl(double) ucrtbase.rintl diff --git a/dlls/msvcr120/msvcr120.spec b/dlls/msvcr120/msvcr120.spec index 8cd39ea19e..dc146fdd7c 100644 --- a/dlls/msvcr120/msvcr120.spec +++ b/dlls/msvcr120/msvcr120.spec @@ -2328,9 +2328,9 @@ @ cdecl remainderf(float float) MSVCR120_remainderf @ cdecl remainderl(double double) MSVCR120_remainderl @ cdecl remove(str) MSVCRT_remove -@ stub remquo -@ stub remquof -@ stub remquol +@ cdecl remquo(double double ptr) MSVCR120_remquo +@ cdecl remquof(float float ptr) MSVCR120_remquof +@ cdecl remquol(double double) MSVCR120_remquol @ cdecl rename(str str) MSVCRT_rename @ cdecl rewind(ptr) MSVCRT_rewind @ cdecl rint(double) MSVCR120_rint diff --git a/dlls/msvcr120_app/msvcr120_app.spec b/dlls/msvcr120_app/msvcr120_app.spec index dc3f3bd807..d290ff8213 100644 --- a/dlls/msvcr120_app/msvcr120_app.spec +++ b/dlls/msvcr120_app/msvcr120_app.spec @@ -1991,9 +1991,9 @@ @ cdecl remainderf(float float) msvcr120.remainderf @ cdecl remainderl(double double) msvcr120.remainderl @ cdecl remove(str) msvcr120.remove -@ stub remquo -@ stub remquof -@ stub remquol +@ cdecl remquo(double double ptr) msvcr120.remquo +@ cdecl remquof(float float ptr) msvcr120.remquof +@ cdecl remquol(double double) msvcr120.remquol @ cdecl rename(str str) msvcr120.rename @ cdecl rewind(ptr) msvcr120.rewind @ cdecl rint(double) msvcr120.rint diff --git a/dlls/msvcrt/math.c b/dlls/msvcrt/math.c index 754e46ce66..c893c83a69 100644 --- a/dlls/msvcrt/math.c +++ b/dlls/msvcrt/math.c @@ -3272,6 +3272,44 @@ LDOUBLE CDECL MSVCR120_remainderl(LDOUBLE x, LDOUBLE y) return MSVCR120_remainder(x, y); }
+/********************************************************************* + * remquo (MSVCR120.@) + */ +double CDECL MSVCR120_remquo(double x, double y, int *quo) +{ +#ifdef HAVE_REMQUO + if(!finite(x)) *MSVCRT__errno() = MSVCRT_EDOM; + if(isnan(y) || y==0.0) *MSVCRT__errno() = MSVCRT_EDOM; + return remquo(x, y, quo); +#else + FIXME( "not implemented\n" ); + return 0.0; +#endif +} + +/********************************************************************* + * remquof (MSVCR120.@) + */ +float CDECL MSVCR120_remquof(float x, float y, int *quo) +{ +#ifdef HAVE_REMQUOF + if(!finitef(x)) *MSVCRT__errno() = MSVCRT_EDOM; + if(isnan(y) || y==0.0f) *MSVCRT__errno() = MSVCRT_EDOM; + return remquof(x, y, quo); +#else + FIXME( "not implemented\n" ); + return 0.0f; +#endif +} + +/********************************************************************* + * remquol (MSVCR120.@) + */ +LDOUBLE CDECL MSVCR120_remquol(LDOUBLE x, LDOUBLE y, int *quo) +{ + return MSVCR120_remquo(x, y, quo); +} + /********************************************************************* * lgamma (MSVCR120.@) */ diff --git a/dlls/ucrtbase/ucrtbase.spec b/dlls/ucrtbase/ucrtbase.spec index d218aa3a7b..30718dcc9c 100644 --- a/dlls/ucrtbase/ucrtbase.spec +++ b/dlls/ucrtbase/ucrtbase.spec @@ -2463,9 +2463,9 @@ @ cdecl remainderf(float float) MSVCR120_remainderf @ cdecl remainderl(double double) MSVCR120_remainderl @ cdecl remove(str) MSVCRT_remove -@ stub remquo -@ stub remquof -@ stub remquol +@ cdecl remquo(double double ptr) MSVCR120_remquo +@ cdecl remquof(float float ptr) MSVCR120_remquof +@ cdecl remquol(double double) MSVCR120_remquol @ cdecl rename(str str) MSVCRT_rename @ cdecl rewind(ptr) MSVCRT_rewind @ cdecl rint(double) MSVCR120_rint
April 10, 2019 7:51 AM, "Martin Storsjo" martin@martin.st wrote:
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 dea5094a91..b9fb2dcda5 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 @@ -308,9 +308,9 @@ @ cdecl remainder(double double) ucrtbase.remainder @ cdecl remainderf(float float) ucrtbase.remainderf @ cdecl remainderl(double double) ucrtbase.remainderl -@ stub remquo -@ stub remquof -@ stub remquol +@ cdecl remquo(double double ptr) ucrtbase.remquo +@ cdecl remquof(float float ptr) ucrtbase.remquof +@ cdecl remquol(double double) ucrtbase.remquol
Missing the last pointer parameter here. Ditto all the other spec files.
Chip
On Wed, 10 Apr 2019, Chip Davis wrote:
April 10, 2019 7:51 AM, "Martin Storsjo" martin@martin.st wrote:
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 dea5094a91..b9fb2dcda5 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 @@ -308,9 +308,9 @@ @ cdecl remainder(double double) ucrtbase.remainder @ cdecl remainderf(float float) ucrtbase.remainderf @ cdecl remainderl(double double) ucrtbase.remainderl -@ stub remquo -@ stub remquof -@ stub remquol +@ cdecl remquo(double double ptr) ucrtbase.remquo +@ cdecl remquof(float float ptr) ucrtbase.remquof +@ cdecl remquol(double double) ucrtbase.remquol
Missing the last pointer parameter here. Ditto all the other spec files.
Thanks for catching it! I sent a fixed version.
// Martin