diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2020-12-14 15:22:52 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2020-12-14 17:29:20 +0100 |
commit | eed2f0fd3fb70bcf26539683c4347e418da66ff1 (patch) | |
tree | 7b2a388caa464ad06b64a7a2e4c5d4bd4e4e0a18 /include/sal | |
parent | aca847cf1283e242c2d1106309ad4bb73d8f37a6 (diff) |
macOS __arm64__ math.h does not define legacy finite
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/
SDKs/MacOSX.sdk/usr/include/math.h only declares it in an
> #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);
block, so CppunitTest_odk_checkapi (which deliberately builds in pre-C++11 mode)
failed with
> In file included from ~/lo/core/odk/qa/checkapi/checkapi.cxx:29:
> In file included from ~/lo/core/workdir/CustomTarget/odk/allheaders/allheaders.hxx:351:
> ~/lo/core/include/rtl/math.hxx:352:12: error: use of undeclared identifier 'finite'; did you mean 'isfinite'?
> return SAL_MATH_FINITE(d);
> ^
So extend 19bce817279c7fd150af0422c224975e57ff9f41 "Try to use isfinite() for
iOS" to all Apple non-Intel platforms. (We no longer support macOS __i386__
builds, but it probably does not hurt to nevertheless mention it here in the
URE interface sal/mathconf.h include file.)
Change-Id: I9b3a2ec1e48762dd178704185c64d1d3fe358001
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107714
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'include/sal')
-rw-r--r-- | include/sal/mathconf.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/sal/mathconf.h b/include/sal/mathconf.h index 687f6e3da133..8e5831cde3b5 100644 --- a/include/sal/mathconf.h +++ b/include/sal/mathconf.h @@ -66,7 +66,7 @@ extern "C" { || __cplusplus >= 201103L \ || defined(IOS) ) #define SAL_MATH_FINITE(d) std::isfinite(d) -#elif defined( IOS ) +#elif defined __APPLE__ && !(defined __i386__ || defined __x86_64__) #define SAL_MATH_FINITE(d) isfinite(d) #elif defined( WNT) #define SAL_MATH_FINITE(d) _finite(d) |