[PATCH] configure, msvcrt: Check for the finite() function just like finitef()

Martin Storsjo martin at martin.st
Fri Aug 14 06:33:24 CDT 2020


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>
---
 configure.ac       | 1 +
 dlls/msvcrt/math.c | 3 +++
 2 files changed, 4 insertions(+)

diff --git a/configure.ac b/configure.ac
index fb35349a80..d28b91b054 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2198,6 +2198,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
-- 
2.17.1




More information about the wine-devel mailing list