summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2016-09-23 21:16:39 +0200
committerMichael Stahl <mstahl@redhat.com>2016-09-26 11:03:09 +0000
commit9373913086dcf16421bbe6cac49bb1444155c1de (patch)
treebec7b84b0eab95eb933e3e45dace11690dd4dd8b
parent87adcc370b801572935c8c9f5dadede73a45ce1d (diff)
sal: Mac OS X 10.8 fails test_log1p
... because its libc log1p() does not return -0.0 unmodified but as +0.0 Change-Id: Ib3fcd005a9876e0e74775bf4f826a887cdd29279 Reviewed-on: https://gerrit.libreoffice.org/29237 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
-rw-r--r--sal/rtl/math.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/sal/rtl/math.cxx b/sal/rtl/math.cxx
index c694e587bb1b..b8a1cd2b2962 100644
--- a/sal/rtl/math.cxx
+++ b/sal/rtl/math.cxx
@@ -1071,6 +1071,10 @@ double SAL_CALL rtl_math_expm1( double fValue ) SAL_THROW_EXTERN_C()
double SAL_CALL rtl_math_log1p( double fValue ) SAL_THROW_EXTERN_C()
{
+#ifdef __APPLE__
+ if (fValue == -0.0)
+ return fValue; // OS X 10.8 libc returns 0.0 for -0.0
+#endif
return log1p(fValue);
}