From 342c5da7c1332cbaa47b5eb056caa46937e9fc59 Mon Sep 17 00:00:00 2001 From: Martin Storsjo Date: Fri, 14 Aug 2020 14:33:24 +0300 Subject: [PATCH] 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 Signed-off-by: Alexandre Julliard --- 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 ffe5ecca890..88b27ce62f6 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 67729e0c0a3..13adf2da7eb 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 6898b38641b..abb9ef0a9ca 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 1748a8b8d8e..5a21875f66c 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