Martin Storsjo : configure, msvcrt: Check for the finite() function just like finitef().

Alexandre Julliard julliard at winehq.org
Fri Aug 14 16:39:32 CDT 2020


Module: wine
Branch: master
Commit: 342c5da7c1332cbaa47b5eb056caa46937e9fc59
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=342c5da7c1332cbaa47b5eb056caa46937e9fc59

Author: Martin Storsjo <martin at martin.st>
Date:   Fri Aug 14 14:33:24 2020 +0300

configure, msvcrt: Check for the finite() function just like finitef().

If missing, fall back on the C99 isfinite() macro, just like
the existing finitef() fallback.

The finite() function is deprecated in macOS 10.9 and is
removed (from the SDK) since macOS 11.0.

Signed-off-by: Martin Storsjo <martin at martin.st>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 configure           | 1 +
 configure.ac        | 1 +
 dlls/msvcrt/math.c  | 3 +++
 include/config.h.in | 3 +++
 4 files changed, 8 insertions(+)

diff --git a/configure b/configure
index ffe5ecca89..88b27ce62f 100755
--- a/configure
+++ b/configure
@@ -18037,6 +18037,7 @@ for ac_func in \
 	_spawnvp \
 	epoll_create \
 	ffs \
+	finite \
 	finitef \
 	fnmatch \
 	fork \
diff --git a/configure.ac b/configure.ac
index 67729e0c0a..13adf2da7e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2189,6 +2189,7 @@ AC_CHECK_FUNCS(\
 	_spawnvp \
 	epoll_create \
 	ffs \
+	finite \
 	finitef \
 	fnmatch \
 	fork \
diff --git a/dlls/msvcrt/math.c b/dlls/msvcrt/math.c
index 6898b38641..abb9ef0a9c 100644
--- a/dlls/msvcrt/math.c
+++ b/dlls/msvcrt/math.c
@@ -47,6 +47,9 @@
 
 WINE_DEFAULT_DEBUG_CHANNEL(msvcrt);
 
+#ifndef HAVE_FINITE
+#define finite(x) isfinite(x)
+#endif
 #ifndef HAVE_FINITEF
 #define finitef(x) isfinite(x)
 #endif
diff --git a/include/config.h.in b/include/config.h.in
index 1748a8b8d8..5a21875f66 100644
--- a/include/config.h.in
+++ b/include/config.h.in
@@ -168,6 +168,9 @@
 /* Define to 1 if you have the `ffs' function. */
 #undef HAVE_FFS
 
+/* Define to 1 if you have the `finite' function. */
+#undef HAVE_FINITE
+
 /* Define to 1 if you have the `finitef' function. */
 #undef HAVE_FINITEF
 




More information about the wine-cvs mailing list