Alex Henrie : msvcr120: Add erfc.

Alexandre Julliard julliard at winehq.org
Fri Jul 14 16:08:08 CDT 2017


Module: wine
Branch: master
Commit: 26163f5cdfbb51795f0803ea525a7aead142232a
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=26163f5cdfbb51795f0803ea525a7aead142232a

Author: Alex Henrie <alexhenrie24 at gmail.com>
Date:   Thu Jul 13 23:14:19 2017 -0600

msvcr120: Add erfc.

Signed-off-by: Alex Henrie <alexhenrie24 at gmail.com>
Signed-off-by: Piotr Caban <piotr at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 configure                                          |  2 ++
 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                                 | 32 ++++++++++++++++++++++
 dlls/ucrtbase/ucrtbase.spec                        |  6 ++--
 include/config.h.in                                |  6 ++++
 8 files changed, 54 insertions(+), 12 deletions(-)

diff --git a/configure b/configure
index f334749..c6e24d0 100755
--- a/configure
+++ b/configure
@@ -17416,6 +17416,8 @@ for ac_func in \
 	cbrt \
 	cbrtf \
 	erf \
+	erfc \
+	erfcf \
 	erff \
 	exp2 \
 	exp2f \
diff --git a/configure.ac b/configure.ac
index bae5ba0..5bee74a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2603,6 +2603,8 @@ AC_CHECK_FUNCS(\
 	cbrt \
 	cbrtf \
 	erf \
+	erfc \
+	erfcf \
 	erff \
 	exp2 \
 	exp2f \
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 fb5c350..a1668bb 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
@@ -221,9 +221,9 @@
 @ stub ctanhl
 @ stub ctanl
 @ cdecl erf(double) ucrtbase.erf
-@ stub erfc
-@ stub erfcf
-@ stub erfcl
+@ cdecl erfc(double) ucrtbase.erfc
+@ cdecl erfcf(float) ucrtbase.erfcf
+@ cdecl erfcl(double) ucrtbase.erfcl
 @ cdecl erff(float) ucrtbase.erff
 @ cdecl erfl(double) ucrtbase.erfl
 @ cdecl exp(double) ucrtbase.exp
diff --git a/dlls/msvcr120/msvcr120.spec b/dlls/msvcr120/msvcr120.spec
index 323d5f4..d44812a 100644
--- a/dlls/msvcr120/msvcr120.spec
+++ b/dlls/msvcr120/msvcr120.spec
@@ -2123,9 +2123,9 @@
 @ stub ctanl
 @ cdecl -ret64 div(long long) MSVCRT_div
 @ cdecl erf(double) MSVCR120_erf
-@ stub erfc
-@ stub erfcf
-@ stub erfcl
+@ cdecl erfc(double) MSVCR120_erfc
+@ cdecl erfcf(float) MSVCR120_erfcf
+@ cdecl erfcl(double) MSVCR120_erfcl
 @ cdecl erff(float) MSVCR120_erff
 @ cdecl erfl(double) MSVCR120_erfl
 @ cdecl exit(long) MSVCRT_exit
diff --git a/dlls/msvcr120_app/msvcr120_app.spec b/dlls/msvcr120_app/msvcr120_app.spec
index 73101c7..8c3ecfd 100644
--- a/dlls/msvcr120_app/msvcr120_app.spec
+++ b/dlls/msvcr120_app/msvcr120_app.spec
@@ -1789,9 +1789,9 @@
 @ stub ctanl
 @ cdecl -ret64 div(long long) msvcr120.div
 @ cdecl erf(double) msvcr120.erf
-@ stub erfc
-@ stub erfcf
-@ stub erfcl
+@ cdecl erfc(double) msvcr120.erfc
+@ cdecl erfcf(float) msvcr120.erfcf
+@ cdecl erfcl(double) msvcr120.erfcl
 @ cdecl erff(float) msvcr120.erff
 @ cdecl erfl(double) msvcr120.erfl
 @ cdecl exit(long) msvcr120.exit
diff --git a/dlls/msvcrt/math.c b/dlls/msvcrt/math.c
index 9eed9b8..89c45c7 100644
--- a/dlls/msvcrt/math.c
+++ b/dlls/msvcrt/math.c
@@ -2773,6 +2773,38 @@ LDOUBLE CDECL MSVCR120_erfl(LDOUBLE x)
 }
 
 /*********************************************************************
+ *      erfc (MSVCR120.@)
+ */
+double CDECL MSVCR120_erfc(double x)
+{
+#ifdef HAVE_ERFC
+    return erfc(x);
+#else
+    return 1 - MSVCR120_erf(x);
+#endif
+}
+
+/*********************************************************************
+ *      erfcf (MSVCR120.@)
+ */
+float CDECL MSVCR120_erfcf(float x)
+{
+#ifdef HAVE_ERFCF
+    return erfcf(x);
+#else
+    return MSVCR120_erfc(x);
+#endif
+}
+
+/*********************************************************************
+ *      erfcl (MSVCR120.@)
+ */
+LDOUBLE CDECL MSVCR120_erfcl(LDOUBLE x)
+{
+    return MSVCR120_erfc(x);
+}
+
+/*********************************************************************
  *      fmaxf (MSVCR120.@)
  */
 float CDECL MSVCR120_fmaxf(float x, float y)
diff --git a/dlls/ucrtbase/ucrtbase.spec b/dlls/ucrtbase/ucrtbase.spec
index aacf361..017f086 100644
--- a/dlls/ucrtbase/ucrtbase.spec
+++ b/dlls/ucrtbase/ucrtbase.spec
@@ -2266,9 +2266,9 @@
 @ stub ctanl
 @ cdecl -ret64 div(long long) MSVCRT_div
 @ cdecl erf(double) MSVCR120_erf
-@ stub erfc
-@ stub erfcf
-@ stub erfcl
+@ cdecl erfc(double) MSVCR120_erfc
+@ cdecl erfcf(float) MSVCR120_erfcf
+@ cdecl erfcl(double) MSVCR120_erfcl
 @ cdecl erff(float) MSVCR120_erff
 @ cdecl erfl(double) MSVCR120_erfl
 @ cdecl exit(long) MSVCRT_exit
diff --git a/include/config.h.in b/include/config.h.in
index 2e909fd..e5b6465 100644
--- a/include/config.h.in
+++ b/include/config.h.in
@@ -141,6 +141,12 @@
 /* Define to 1 if you have the `erf' function. */
 #undef HAVE_ERF
 
+/* Define to 1 if you have the `erfc' function. */
+#undef HAVE_ERFC
+
+/* Define to 1 if you have the `erfcf' function. */
+#undef HAVE_ERFCF
+
 /* Define to 1 if you have the `erff' function. */
 #undef HAVE_ERFF
 




More information about the wine-cvs mailing list