From ced65570cb5b7073361dbf2c3c60631c3f54d0f9 Mon Sep 17 00:00:00 2001 From: Arnim Balzer Date: Thu, 15 Aug 2024 15:06:37 +0100 Subject: [PATCH] Switch finite to std::isfinite for ICC and GCC This supports latest compilers on Mac OS X, see https://github.com/Homebrew/homebrew-core/pull/181246 --- src/levmar/compiler.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/levmar/compiler.h b/src/levmar/compiler.h index d714e508..bff985fc 100644 --- a/src/levmar/compiler.h +++ b/src/levmar/compiler.h @@ -60,7 +60,12 @@ #ifdef _MSC_VER #define LM_FINITE _finite // MSVC #elif defined(__ICC) || defined(__INTEL_COMPILER) || defined(__GNUC__) -#define LM_FINITE finite // ICC, GCC +# ifdef __APPLE__ +# include +# define LM_FINITE isfinite // Apple +# else +# define LM_FINITE finite // ICC, GCC +# endif #else #define LM_FINITE finite // other than MSVC, ICC, GCC, let's hope this will work #endif