From 9879553eef6575536e60dc4879f625083ff99a5f Mon Sep 17 00:00:00 2001 From: Daniel Lehman Date: Mon, 28 Mar 2016 13:44:31 -0700 Subject: [PATCH 1/2] msvcr120: Add scalbn Signed-off-by: Daniel Lehman --- .../api-ms-win-crt-math-l1-1-0.spec | 12 +++--- dlls/msvcr120/msvcr120.spec | 12 +++--- dlls/msvcr120_app/msvcr120_app.spec | 12 +++--- dlls/msvcrt/math.c | 49 ++++++++++++++-------- dlls/ucrtbase/ucrtbase.spec | 12 +++--- 5 files changed, 55 insertions(+), 42 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 fcfc8b4..bb4c3e7 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 @@ -316,12 +316,12 @@ @ cdecl round(double) ucrtbase.round @ cdecl roundf(float) ucrtbase.roundf @ cdecl roundl(double) ucrtbase.roundl -@ stub scalbln -@ stub scalblnf -@ stub scalblnl -@ stub scalbn -@ stub scalbnf -@ stub scalbnl +@ cdecl scalbln(double long) ucrtbase.scalbn +@ cdecl scalblnf(float long) ucrtbase.scalbnf +@ cdecl scalblnl(double long) ucrtbase.scalbnl +@ cdecl scalbn(double long) ucrtbase.scalbn +@ cdecl scalbnf(float long) ucrtbase.scalbnf +@ cdecl scalbnl(double long) ucrtbase.scalbnl @ cdecl sin(double) ucrtbase.sin @ cdecl -arch=arm,x86_64 sinf(float) ucrtbase.sinf @ cdecl sinh(double) ucrtbase.sinh diff --git a/dlls/msvcr120/msvcr120.spec b/dlls/msvcr120/msvcr120.spec index dc0c266..58d04e1 100644 --- a/dlls/msvcr120/msvcr120.spec +++ b/dlls/msvcr120/msvcr120.spec @@ -2339,12 +2339,12 @@ @ cdecl round(double) MSVCR120_round @ cdecl roundf(float) MSVCR120_roundf @ cdecl roundl(double) MSVCR120_roundl -@ stub scalbln -@ stub scalblnf -@ stub scalblnl -@ stub scalbn -@ stub scalbnf -@ stub scalbnl +@ cdecl scalbln(double long) MSVCRT__scalb +@ cdecl scalblnf(float long) MSVCRT__scalbf +@ cdecl scalblnl(double long) MSVCR120_scalbnl +@ cdecl scalbn(double long) MSVCRT__scalb +@ cdecl scalbnf(float long) MSVCRT__scalbf +@ cdecl scalbnl(double long) MSVCR120_scalbnl @ varargs scanf(str) MSVCRT_scanf @ varargs scanf_s(str) MSVCRT_scanf_s @ cdecl setbuf(ptr ptr) MSVCRT_setbuf diff --git a/dlls/msvcr120_app/msvcr120_app.spec b/dlls/msvcr120_app/msvcr120_app.spec index c7810cd..6cb84df 100644 --- a/dlls/msvcr120_app/msvcr120_app.spec +++ b/dlls/msvcr120_app/msvcr120_app.spec @@ -2002,12 +2002,12 @@ @ cdecl round(double) msvcr120.round @ cdecl roundf(float) msvcr120.roundf @ cdecl roundl(double) msvcr120.roundl -@ stub scalbln -@ stub scalblnf -@ stub scalblnl -@ stub scalbn -@ stub scalbnf -@ stub scalbnl +@ cdecl scalbln(double long) msvcr120.scalbn +@ cdecl scalblnf(float long) msvcr120.scalbnf +@ cdecl scalblnl(double long) msvcr120.scalbnl +@ cdecl scalbn(double long) msvcr120.scalbn +@ cdecl scalbnf(float long) msvcr120.scalbnf +@ cdecl scalbnl(double long) msvcr120.scalbnl @ varargs scanf(str) msvcr120.scanf @ varargs scanf_s(str) msvcr120.scanf_s @ cdecl setbuf(ptr ptr) msvcr120.setbuf diff --git a/dlls/msvcrt/math.c b/dlls/msvcrt/math.c index 4150cfc..bd0b92b 100644 --- a/dlls/msvcrt/math.c +++ b/dlls/msvcrt/math.c @@ -331,15 +331,6 @@ float CDECL MSVCRT_frexpf( float x, int *exp ) } /********************************************************************* - * _scalbf (MSVCRT.@) - */ -float CDECL MSVCRT__scalbf(float num, MSVCRT_long power) -{ - if (!finitef(num)) *MSVCRT__errno() = MSVCRT_EDOM; - return ldexpf(num, power); -} - -/********************************************************************* * modff (MSVCRT.@) */ float CDECL MSVCRT_modff( float x, float *iptr ) @@ -818,15 +809,6 @@ double CDECL MSVCRT__logb(double num) } /********************************************************************* - * _scalb (MSVCRT.@) - */ -double CDECL MSVCRT__scalb(double num, MSVCRT_long power) -{ - if (!isfinite(num)) *MSVCRT__errno() = MSVCRT_EDOM; - return ldexp(num, power); -} - -/********************************************************************* * _hypot (MSVCRT.@) */ double CDECL _hypot(double x, double y) @@ -2777,3 +2759,34 @@ LDOUBLE CDECL MSVCR120_asinhl(LDOUBLE x) { return MSVCR120_asinh(x); } + +/********************************************************************* + * _scalb (MSVCRT.@) + * scalbn (MSVCR120.@) + * scalbln (MSVCR120.@) + */ +double CDECL MSVCRT__scalb(double num, MSVCRT_long power) +{ + if (!isfinite(num)) *MSVCRT__errno() = MSVCRT_EDOM; + return ldexp(num, power); +} + +/********************************************************************* + * _scalbf (MSVCRT.@) + * scalbnf (MSVCR120.@) + * scalblnf (MSVCR120.@) + */ +float CDECL MSVCRT__scalbf(float num, MSVCRT_long power) +{ + if (!finitef(num)) *MSVCRT__errno() = MSVCRT_EDOM; + return ldexpf(num, power); +} + +/********************************************************************* + * scalbnl (MSVCR120.@) + * scalblnl (MSVCR120.@) + */ +LDOUBLE CDECL MSVCR120_scalbnl(LDOUBLE num, MSVCRT_long power) +{ + return MSVCRT__scalb(num, power); +} diff --git a/dlls/ucrtbase/ucrtbase.spec b/dlls/ucrtbase/ucrtbase.spec index 16bc133..5c86de8 100644 --- a/dlls/ucrtbase/ucrtbase.spec +++ b/dlls/ucrtbase/ucrtbase.spec @@ -2473,12 +2473,12 @@ @ cdecl round(double) MSVCR120_round @ cdecl roundf(float) MSVCR120_roundf @ cdecl roundl(double) MSVCR120_roundl -@ stub scalbln -@ stub scalblnf -@ stub scalblnl -@ stub scalbn -@ stub scalbnf -@ stub scalbnl +@ cdecl scalbln(double long) MSVCRT__scalb +@ cdecl scalblnf(float long) MSVCRT__scalbf +@ cdecl scalblnl(double long) MSVCR120_scalbnl +@ cdecl scalbn(double long) MSVCRT__scalb +@ cdecl scalbnf(float long) MSVCRT__scalbf +@ cdecl scalbnl(double long) MSVCR120_scalbnl @ stub set_terminate @ stub set_unexpected @ cdecl setbuf(ptr ptr) MSVCRT_setbuf -- 1.9.5