Signed-off-by: Martin Storsjo martin@martin.st --- Moved the reused MSVCRT__logbf function into an ifdef block that always is built for msvcr >= 120, even for i386. --- .../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 | 37 +++++++++++++------ dlls/ucrtbase/ucrtbase.spec | 6 +-- 5 files changed, 38 insertions(+), 23 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 a9deec8e48..75ecaf1eff 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 @@ -276,9 +276,9 @@ @ cdecl log2(double) ucrtbase.log2 @ cdecl log2f(float) ucrtbase.log2f @ cdecl log2l(double) ucrtbase.log2l -@ stub logb -@ stub logbf -@ stub logbl +@ cdecl logb(double) ucrtbase.logb +@ cdecl logbf(float) ucrtbase.logbf +@ cdecl logbl(double) ucrtbase.logbl @ cdecl -arch=arm,x86_64,arm64 logf(float) ucrtbase.logf @ cdecl lrint(double) ucrtbase.lrint @ cdecl lrintf(float) ucrtbase.lrintf diff --git a/dlls/msvcr120/msvcr120.spec b/dlls/msvcr120/msvcr120.spec index 618b9bccbc..a573c91fdc 100644 --- a/dlls/msvcr120/msvcr120.spec +++ b/dlls/msvcr120/msvcr120.spec @@ -2265,9 +2265,9 @@ @ cdecl log2(double) MSVCR120_log2 @ cdecl log2f(float) MSVCR120_log2f @ cdecl log2l(double) MSVCR120_log2l -@ stub logb -@ stub logbf -@ stub logbl +@ cdecl logb(double) MSVCR120_logb +@ cdecl logbf(float) MSVCR120_logbf +@ cdecl logbl(double) MSVCR120_logbl @ cdecl -arch=i386,x86_64,arm,arm64 longjmp(ptr long) MSVCRT_longjmp @ cdecl lrint(double) MSVCR120_lrint @ cdecl lrintf(float) MSVCR120_lrintf diff --git a/dlls/msvcr120_app/msvcr120_app.spec b/dlls/msvcr120_app/msvcr120_app.spec index 26ffaf7743..a9c21cb978 100644 --- a/dlls/msvcr120_app/msvcr120_app.spec +++ b/dlls/msvcr120_app/msvcr120_app.spec @@ -1928,9 +1928,9 @@ @ cdecl log2(double) msvcr120.log2 @ cdecl log2f(float) msvcr120.log2f @ cdecl log2l(double) msvcr120.log2l -@ stub logb -@ stub logbf -@ stub logbl +@ cdecl logb(double) msvcr120.logb +@ cdecl logbf(float) msvcr120.logbf +@ cdecl logbl(double) msvcr120.logbl @ cdecl -arch=i386,x86_64,arm,arm64 longjmp(ptr long) msvcr120.longjmp @ cdecl lrint(double) msvcr120.lrint @ cdecl lrintf(float) msvcr120.lrintf diff --git a/dlls/msvcrt/math.c b/dlls/msvcrt/math.c index 21f1f9b9b2..f5ff8ef204 100644 --- a/dlls/msvcrt/math.c +++ b/dlls/msvcrt/math.c @@ -157,6 +157,17 @@ float CDECL MSVCRT__nextafterf( float num, float next ) return nextafterf( num, next ); }
+/********************************************************************* + * _logbf (MSVCRT.@) + */ +float CDECL MSVCRT__logbf( float num ) +{ + float ret = logbf(num); + if (isnan(num)) math_error(_DOMAIN, "_logbf", num, 0, ret); + else if (!num) math_error(_SING, "_logbf", num, 0, ret); + return ret; +} + #endif #if defined(__x86_64__) || defined(__arm__) || defined(__aarch64__)
@@ -179,17 +190,6 @@ INT CDECL MSVCRT__isnanf( float num ) return isnan(num) != 0; }
-/********************************************************************* - * _logbf (MSVCRT.@) - */ -float CDECL MSVCRT__logbf( float num ) -{ - float ret = logbf(num); - if (isnan(num)) math_error(_DOMAIN, "_logbf", num, 0, ret); - else if (!num) math_error(_SING, "_logbf", num, 0, ret); - return ret; -} - /********************************************************************* * MSVCRT_acosf (MSVCRT.@) */ @@ -3499,4 +3499,19 @@ int CDECL MSVCR120_ilogbl(LDOUBLE x) return MSVCR120_ilogb(x); }
+double CDECL MSVCR120_logb(double x) +{ + return MSVCRT__logb(x); +} + +float CDECL MSVCR120_logbf(float x) +{ + return MSVCRT__logbf(x); +} + +LDOUBLE CDECL MSVCR120_logbl(LDOUBLE x) +{ + return MSVCR120_logb(x); +} + #endif /* _MSVCR_VER>=120 */ diff --git a/dlls/ucrtbase/ucrtbase.spec b/dlls/ucrtbase/ucrtbase.spec index 1866f1b8b0..99dd8fd08f 100644 --- a/dlls/ucrtbase/ucrtbase.spec +++ b/dlls/ucrtbase/ucrtbase.spec @@ -2398,9 +2398,9 @@ @ cdecl log2(double) MSVCR120_log2 @ cdecl log2f(float) MSVCR120_log2f @ cdecl log2l(double) MSVCR120_log2l -@ stub logb -@ stub logbf -@ stub logbl +@ cdecl logb(double) MSVCR120_logb +@ cdecl logbf(float) MSVCR120_logbf +@ cdecl logbl(double) MSVCR120_logbl @ cdecl -arch=arm,x86_64,arm64 logf(float) MSVCRT_logf @ cdecl -arch=i386,x86_64,arm,arm64 longjmp(ptr long) MSVCRT_longjmp @ cdecl lrint(double) MSVCR120_lrint