Piotr Caban : msvcrt: Import tgammaf implementation from musl.
Alexandre Julliard
julliard at winehq.org
Tue Jun 8 16:34:27 CDT 2021
Module: wine
Branch: master
Commit: f4c88b3e9c56f9960a0d3568d10b5c26ad79346f
URL: https://source.winehq.org/git/wine.git/?a=commit;h=f4c88b3e9c56f9960a0d3568d10b5c26ad79346f
Author: Piotr Caban <piotr at codeweavers.com>
Date: Tue Jun 8 21:19:34 2021 +0200
msvcrt: Import tgammaf implementation from musl.
Signed-off-by: Piotr Caban <piotr at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
configure | 3 +--
configure.ac | 3 +--
dlls/msvcrt/math.c | 4 +++-
dlls/msvcrt/unixlib.c | 14 --------------
dlls/msvcrt/unixlib.h | 1 -
include/config.h.in | 3 ---
6 files changed, 5 insertions(+), 23 deletions(-)
diff --git a/configure b/configure
index c0d24695456..6a250f3728e 100755
--- a/configure
+++ b/configure
@@ -19622,8 +19622,7 @@ fi
for ac_func in \
exp2 \
exp2f \
- fmaf \
- tgammaf
+ fmaf
do :
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
diff --git a/configure.ac b/configure.ac
index 748913f7216..d4c1896fa96 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2661,8 +2661,7 @@ fi
AC_CHECK_FUNCS(\
exp2 \
exp2f \
- fmaf \
- tgammaf
+ fmaf
)
LIBS="$ac_save_LIBS"
diff --git a/dlls/msvcrt/math.c b/dlls/msvcrt/math.c
index d419c34a947..a054f561a63 100644
--- a/dlls/msvcrt/math.c
+++ b/dlls/msvcrt/math.c
@@ -9171,10 +9171,12 @@ double CDECL tgamma(double x)
/*********************************************************************
* tgammaf (MSVCR120.@)
+ *
+ * Copied from musl: src/math/tgammaf.c
*/
float CDECL tgammaf(float x)
{
- return unix_funcs->tgammaf( x );
+ return tgamma(x);
}
/*********************************************************************
diff --git a/dlls/msvcrt/unixlib.c b/dlls/msvcrt/unixlib.c
index 26af9812f88..a01b227e428 100644
--- a/dlls/msvcrt/unixlib.c
+++ b/dlls/msvcrt/unixlib.c
@@ -110,19 +110,6 @@ static float CDECL unix_powf( float x, float y )
return powf( x, y );
}
-/*********************************************************************
- * tgammaf
- */
-static float CDECL unix_tgammaf(float x)
-{
-#ifdef HAVE_TGAMMAF
- return tgammaf(x);
-#else
- FIXME( "not implemented\n" );
- return 0;
-#endif
-}
-
static const struct unix_funcs funcs =
{
unix_exp,
@@ -132,7 +119,6 @@ static const struct unix_funcs funcs =
unix_fmaf,
unix_pow,
unix_powf,
- unix_tgammaf,
};
NTSTATUS CDECL __wine_init_unix_lib( HMODULE module, DWORD reason, const void *ptr_in, void *ptr_out )
diff --git a/dlls/msvcrt/unixlib.h b/dlls/msvcrt/unixlib.h
index f119a0a35d0..b39f56c31cc 100644
--- a/dlls/msvcrt/unixlib.h
+++ b/dlls/msvcrt/unixlib.h
@@ -30,7 +30,6 @@ struct unix_funcs
float (CDECL *fmaf)(float x, float y, float z);
double (CDECL *pow)(double x, double y);
float (CDECL *powf)(float x, float y);
- float (CDECL *tgammaf)(float x);
};
#endif /* __UNIXLIB_H */
diff --git a/include/config.h.in b/include/config.h.in
index aa74e710e06..be6dfb35ab3 100644
--- a/include/config.h.in
+++ b/include/config.h.in
@@ -929,9 +929,6 @@
/* Define to 1 if you have the <termios.h> header file. */
#undef HAVE_TERMIOS_H
-/* Define to 1 if you have the `tgammaf' function. */
-#undef HAVE_TGAMMAF
-
/* Define to 1 if you have the `thr_kill2' function. */
#undef HAVE_THR_KILL2
More information about the wine-cvs
mailing list