Daniel Lehman : msvcr120: Add lgamma.

Alexandre Julliard julliard at winehq.org
Mon Aug 15 10:37:30 CDT 2016


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

Author: Daniel Lehman <dlehman at esri.com>
Date:   Fri Jun 17 14:49:32 2016 -0700

msvcr120: Add lgamma.

Signed-off-by: Daniel Lehman <dlehman at esri.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                                 | 34 ++++++++++++++++++++++
 dlls/ucrtbase/ucrtbase.spec                        |  6 ++--
 include/config.h.in                                |  6 ++++
 8 files changed, 56 insertions(+), 12 deletions(-)

diff --git a/configure b/configure
index bf4d1a7..dccacb4 100755
--- a/configure
+++ b/configure
@@ -16935,6 +16935,8 @@ for ac_func in \
 	erff \
 	exp2 \
 	exp2f \
+	lgamma \
+	lgammaf \
 	llrint \
 	llrintf \
 	llround \
diff --git a/configure.ac b/configure.ac
index 0fad32f..3a24aab 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2527,6 +2527,8 @@ AC_CHECK_FUNCS(\
 	erff \
 	exp2 \
 	exp2f \
+	lgamma \
+	lgammaf \
 	llrint \
 	llrintf \
 	llround \
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 05a0ac0..f886b97 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
@@ -258,9 +258,9 @@
 @ stub ilogbf
 @ stub ilogbl
 @ cdecl ldexp(double long) ucrtbase.ldexp
-@ stub lgamma
-@ stub lgammaf
-@ stub lgammal
+@ cdecl lgamma(double) ucrtbase.lgamma
+@ cdecl lgammaf(float) ucrtbase.lgammaf
+@ cdecl lgammal(double) ucrtbase.lgammal
 @ cdecl -ret64 llrint(double) ucrtbase.llrint
 @ cdecl -ret64 llrintf(float) ucrtbase.llrintf
 @ cdecl -ret64 llrintl(double) ucrtbase.llrintl
diff --git a/dlls/msvcr120/msvcr120.spec b/dlls/msvcr120/msvcr120.spec
index f65d150..953cdba 100644
--- a/dlls/msvcr120/msvcr120.spec
+++ b/dlls/msvcr120/msvcr120.spec
@@ -2243,9 +2243,9 @@
 @ cdecl labs(long) MSVCRT_labs
 @ cdecl ldexp(double long) MSVCRT_ldexp
 @ cdecl ldiv(long long) MSVCRT_ldiv
-@ stub lgamma
-@ stub lgammaf
-@ stub lgammal
+@ cdecl lgamma(double) MSVCR120_lgamma
+@ cdecl lgammaf(float) MSVCR120_lgammaf
+@ cdecl lgammal(double) MSVCR120_lgammal
 @ cdecl -ret64 llabs(int64) MSVCRT_llabs
 @ stub lldiv
 @ cdecl -ret64 llrint(double) MSVCR120_llrint
diff --git a/dlls/msvcr120_app/msvcr120_app.spec b/dlls/msvcr120_app/msvcr120_app.spec
index de68b87..c88cde0 100644
--- a/dlls/msvcr120_app/msvcr120_app.spec
+++ b/dlls/msvcr120_app/msvcr120_app.spec
@@ -1906,9 +1906,9 @@
 @ cdecl labs(long) msvcr120.labs
 @ cdecl ldexp(double long) msvcr120.ldexp
 @ cdecl ldiv(long long) msvcr120.ldiv
-@ stub lgamma
-@ stub lgammaf
-@ stub lgammal
+@ cdecl lgamma(double) msvcr120.lgamma
+@ cdecl lgammaf(float) msvcr120.lgammaf
+@ cdecl lgammal(double) msvcr120.lgammal
 @ cdecl -ret64 llabs(int64) msvcr120.llabs
 @ stub lldiv
 @ cdecl -ret64 llrint(double) msvcr120.llrint
diff --git a/dlls/msvcrt/math.c b/dlls/msvcrt/math.c
index cf33f01..e87151a 100644
--- a/dlls/msvcrt/math.c
+++ b/dlls/msvcrt/math.c
@@ -2843,3 +2843,37 @@ LDOUBLE CDECL MSVCR120_remainderl(LDOUBLE x, LDOUBLE y)
 {
     return MSVCR120_remainder(x, y);
 }
+
+/*********************************************************************
+ *      lgamma (MSVCR120.@)
+ */
+double CDECL MSVCR120_lgamma(double x)
+{
+#ifdef HAVE_LGAMMA
+    return lgamma(x);
+#else
+    FIXME( "not implemented\n" );
+    return 0.0;
+#endif
+}
+
+/*********************************************************************
+ *      lgammaf (MSVCR120.@)
+ */
+float CDECL MSVCR120_lgammaf(float x)
+{
+#ifdef HAVE_LGAMMAF
+    return lgammaf(x);
+#else
+    FIXME( "not implemented\n" );
+    return 0.0f;
+#endif
+}
+
+/*********************************************************************
+ *      lgammal (MSVCR120.@)
+ */
+LDOUBLE CDECL MSVCR120_lgammal(LDOUBLE x)
+{
+    return MSVCR120_lgamma(x);
+}
diff --git a/dlls/ucrtbase/ucrtbase.spec b/dlls/ucrtbase/ucrtbase.spec
index bb18d4f..ed985d2 100644
--- a/dlls/ucrtbase/ucrtbase.spec
+++ b/dlls/ucrtbase/ucrtbase.spec
@@ -2377,9 +2377,9 @@
 @ cdecl labs(long) MSVCRT_labs
 @ cdecl ldexp(double long) MSVCRT_ldexp
 @ cdecl ldiv(long long) MSVCRT_ldiv
-@ stub lgamma
-@ stub lgammaf
-@ stub lgammal
+@ cdecl lgamma(double) MSVCR120_lgamma
+@ cdecl lgammaf(float) MSVCR120_lgammaf
+@ cdecl lgammal(double) MSVCR120_lgammal
 @ cdecl -ret64 llabs(int64) MSVCRT_llabs
 @ stub lldiv
 @ cdecl -ret64 llrint(double) MSVCR120_llrint
diff --git a/include/config.h.in b/include/config.h.in
index 6acafca..382beb6 100644
--- a/include/config.h.in
+++ b/include/config.h.in
@@ -351,6 +351,12 @@
 /* Define to 1 if you have the `ldap_parse_vlv_control' function. */
 #undef HAVE_LDAP_PARSE_VLV_CONTROL
 
+/* Define to 1 if you have the `lgamma' function. */
+#undef HAVE_LGAMMA
+
+/* Define to 1 if you have the `lgammaf' function. */
+#undef HAVE_LGAMMAF
+
 /* Define to 1 if you have the `gettextpo' library (-lgettextpo). */
 #undef HAVE_LIBGETTEXTPO
 




More information about the wine-cvs mailing list