[Libreoffice-commits] core.git: include/sal
Stephan Bergmann (via logerrit)
logerrit at kemper.freedesktop.org
Mon Dec 14 16:30:07 UTC 2020
include/sal/mathconf.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit eed2f0fd3fb70bcf26539683c4347e418da66ff1
Author: Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Mon Dec 14 15:22:52 2020 +0100
Commit: Stephan Bergmann <sbergman at redhat.com>
CommitDate: Mon Dec 14 17:29:20 2020 +0100
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 at redhat.com>
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)
More information about the Libreoffice-commits
mailing list