[PATCH v2 6/9] msvcr120: Add atanh.

Alex Henrie alexhenrie24 at gmail.com
Tue Jul 11 22:58:24 CDT 2017


Fixes https://bugs.winehq.org/show_bug.cgi?id=43304

Signed-off-by: Alex Henrie <alexhenrie24 at gmail.com>
---
 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 ++--
 6 files changed, 48 insertions(+), 12 deletions(-)

diff --git a/configure.ac b/configure.ac
index 3974dd5818..77b04b9c16 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2598,6 +2598,8 @@ AC_CHECK_FUNCS(\
 	acoshf \
 	asinh \
 	asinhf \
+	atanh \
+	atanhf \
 	cbrt \
 	cbrtf \
 	erf \
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 5c644326ce..fb5c35059f 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
@@ -136,9 +136,9 @@
 @ cdecl atan2(double double) ucrtbase.atan2
 @ cdecl -arch=arm,x86_64 atan2f(float float) ucrtbase.atan2f
 @ cdecl -arch=arm,x86_64 atanf(float) ucrtbase.atanf
-@ stub atanh
-@ stub atanhf
-@ stub atanhl
+@ cdecl atanh(double) ucrtbase.atanh
+@ cdecl atanhf(float) ucrtbase.atanhf
+@ cdecl atanhl(double) ucrtbase.atanhl
 @ stub cabs
 @ stub cabsf
 @ stub cabsl
diff --git a/dlls/msvcr120/msvcr120.spec b/dlls/msvcr120/msvcr120.spec
index 7899622f69..323d5f43c0 100644
--- a/dlls/msvcr120/msvcr120.spec
+++ b/dlls/msvcr120/msvcr120.spec
@@ -2025,9 +2025,9 @@
 @ cdecl -arch=arm,x86_64 atanf(float) MSVCRT_atanf
 @ cdecl atan2(double double) MSVCRT_atan2
 @ cdecl -arch=arm,x86_64 atan2f(float float) MSVCRT_atan2f
-@ stub atanh
-@ stub atanhf
-@ stub atanhl
+@ cdecl atanh(double) MSVCR120_atanh
+@ cdecl atanhf(float) MSVCR120_atanhf
+@ cdecl atanhl(double) MSVCR120_atanhl
 @ cdecl -private atexit(ptr) MSVCRT_atexit  # not imported to avoid conflicts with Mingw
 @ cdecl atof(str) MSVCRT_atof
 @ cdecl atoi(str) MSVCRT_atoi
diff --git a/dlls/msvcr120_app/msvcr120_app.spec b/dlls/msvcr120_app/msvcr120_app.spec
index 9a5da20ca8..73101c7437 100644
--- a/dlls/msvcr120_app/msvcr120_app.spec
+++ b/dlls/msvcr120_app/msvcr120_app.spec
@@ -1691,9 +1691,9 @@
 @ cdecl -arch=arm,x86_64 atanf(float) msvcr120.atanf
 @ cdecl atan2(double double) msvcr120.atan2
 @ cdecl -arch=arm,x86_64 atan2f(float float) msvcr120.atan2f
-@ stub atanh
-@ stub atanhf
-@ stub atanhl
+@ cdecl atanh(double) msvcr120.atanh
+@ cdecl atanhf(float) msvcr120.atanhf
+@ cdecl atanhl(double) msvcr120.atanhl
 @ cdecl -private atexit(ptr) msvcr120.atexit
 @ cdecl atof(str) msvcr120.atof
 @ cdecl atoi(str) msvcr120.atoi
diff --git a/dlls/msvcrt/math.c b/dlls/msvcrt/math.c
index d50593539e..e5e35da45d 100644
--- a/dlls/msvcrt/math.c
+++ b/dlls/msvcrt/math.c
@@ -2927,6 +2927,40 @@ LDOUBLE CDECL MSVCR120_acoshl(LDOUBLE x)
 }
 
 /*********************************************************************
+ *      atanh (MSVCR120.@)
+ */
+double CDECL MSVCR120_atanh(double x)
+{
+#ifdef HAVE_ATANH
+    return atanh(x);
+#else
+    FIXME( "not implemented\n" );
+    return 0.0;
+#endif
+}
+
+/*********************************************************************
+ *      atanhf (MSVCR120.@)
+ */
+float CDECL MSVCR120_atanhf(float x)
+{
+#ifdef HAVE_ATANHF
+    return atanhf(x);
+#else
+    FIXME( "not implemented\n" );
+    return 0.0f;
+#endif
+}
+
+/*********************************************************************
+ *      atanhl (MSVCR120.@)
+ */
+LDOUBLE CDECL MSVCR120_atanhl(LDOUBLE x)
+{
+    return MSVCR120_atanh(x);
+}
+
+/*********************************************************************
  *      _scalb  (MSVCRT.@)
  *      scalbn  (MSVCR120.@)
  *      scalbln (MSVCR120.@)
diff --git a/dlls/ucrtbase/ucrtbase.spec b/dlls/ucrtbase/ucrtbase.spec
index 1eae07222d..aacf3614da 100644
--- a/dlls/ucrtbase/ucrtbase.spec
+++ b/dlls/ucrtbase/ucrtbase.spec
@@ -2167,9 +2167,9 @@
 @ cdecl atan2(double double) MSVCRT_atan2
 @ cdecl -arch=arm,x86_64 atan2f(float float) MSVCRT_atan2f
 @ cdecl -arch=arm,x86_64 atanf(float) MSVCRT_atanf
-@ stub atanh
-@ stub atanhf
-@ stub atanhl
+@ cdecl atanh(double) MSVCR120_atanh
+@ cdecl atanhf(float) MSVCR120_atanhf
+@ cdecl atanhl(double) MSVCR120_atanhl
 @ cdecl atof(str) MSVCRT_atof
 @ cdecl atoi(str) MSVCRT_atoi
 @ cdecl atol(str) ntdll.atol
-- 
2.13.2




More information about the wine-patches mailing list