build fails for macOS arm64 because `finite` is missing
When building for macOS arm64, arrows.c
and arc.c
fail to compile with error: implicitly declaring library function 'finite'
.
This is not because of a missing include or define, but because the function does not exist at all. macOS's /usr/include/math.h
only defines it on the older architectures:
#if defined __i386__ || defined __x86_64__
[..]
/* Legacy BSD API; use the C99 `isfinite( )` macro instead. */
extern int finite(double)
__API_DEPRECATED("Use `isfinite((double)x)` instead.", macos(10.0, 10.9)) __API_UNAVAILABLE(ios, watchos, tvos);
[..]
#endif
Given that the standard replacement isfinite
dates back to C99, perhaps by now the uses of finite
can simply be replaced with isfinite
and the platform-specific checks removed?