summaryrefslogtreecommitdiff
path: root/sal/inc
diff options
context:
space:
mode:
authorsb <sb@openoffice.org>2009-09-16 17:08:52 +0200
committersb <sb@openoffice.org>2009-09-16 17:08:52 +0200
commita3317af7e13b45f8a2f9f42e23b9a4e6c850584f (patch)
tree73aac61918e001088fe49d660b9e05184932c8c4 /sal/inc
parente115f1693026a78363884c95db3673894a4b937d (diff)
parent8798a1ca9f9d3d95e2f52024db82c8573b9535bc (diff)
merged in DEV300_m59
Diffstat (limited to 'sal/inc')
-rw-r--r--sal/inc/rtl/math.h36
-rw-r--r--sal/inc/rtl/math.hxx29
-rw-r--r--sal/inc/sal/types.h9
3 files changed, 73 insertions, 1 deletions
diff --git a/sal/inc/rtl/math.h b/sal/inc/rtl/math.h
index 704992109..6f24b5735 100644
--- a/sal/inc/rtl/math.h
+++ b/sal/inc/rtl/math.h
@@ -434,6 +434,42 @@ double SAL_CALL rtl_math_log1p(double fValue) SAL_THROW_EXTERN_C();
*/
double SAL_CALL rtl_math_atanh(double fValue) SAL_THROW_EXTERN_C();
+/** Returns values of the Errorfunction erf.
+
+ erf is part of the C99 standard, but not provided by some compilers.
+
+ @param fValue
+ The value x in the term erf(x).
+ */
+double SAL_CALL rtl_math_erf(double fValue) SAL_THROW_EXTERN_C();
+
+/** Returns values of the complement Errorfunction erfc.
+
+ erfc is part of the C99 standard, but not provided by some compilers.
+
+ @param fValue
+ The value x in the term erfc(x).
+ */
+double SAL_CALL rtl_math_erfc(double fValue) SAL_THROW_EXTERN_C();
+
+/** Returns values of the inverse hyperbolic sine.
+
+ asinh is part of the C99 standard, but not provided by some compilers.
+
+ @param fValue
+ The value x in the term asinh(x).
+ */
+double SAL_CALL rtl_math_asinh(double fValue) SAL_THROW_EXTERN_C();
+
+/** Returns values of the inverse hyperbolic cosine.
+
+ acosh is part of the C99 standard, but not provided by some compilers.
+
+ @param fValue
+ The value x in the term acosh(x).
+ */
+double SAL_CALL rtl_math_acosh(double fValue) SAL_THROW_EXTERN_C();
+
#if defined __cplusplus
}
#endif /* __cplusplus */
diff --git a/sal/inc/rtl/math.hxx b/sal/inc/rtl/math.hxx
index 4223415cd..2c180170d 100644
--- a/sal/inc/rtl/math.hxx
+++ b/sal/inc/rtl/math.hxx
@@ -221,6 +221,35 @@ inline double atanh(double fValue)
return rtl_math_atanh(fValue);
}
+/** A wrapper around rtl_math_erf.
+ */
+inline double erf(double fValue)
+{
+ return rtl_math_erf(fValue);
+}
+
+/** A wrapper around rtl_math_erfc.
+ */
+inline double erfc(double fValue)
+{
+ return rtl_math_erfc(fValue);
+}
+
+/** A wrapper around rtl_math_asinh.
+ */
+inline double asinh(double fValue)
+{
+ return rtl_math_asinh(fValue);
+}
+
+/** A wrapper around rtl_math_acosh.
+ */
+inline double acosh(double fValue)
+{
+ return rtl_math_acosh(fValue);
+}
+
+
/** Test equality of two values with an accuracy of the magnitude of the
given values scaled by 2^-48 (4 bits roundoff stripped).
diff --git a/sal/inc/sal/types.h b/sal/inc/sal/types.h
index 89a079409..db53e7e08 100644
--- a/sal/inc/sal/types.h
+++ b/sal/inc/sal/types.h
@@ -124,10 +124,17 @@ typedef unsigned char sal_uInt8;
#define SAL_CONST_INT64(x) x##ll
#define SAL_CONST_UINT64(x) x##ull
+ #ifdef __MINGW32__
+ #define SAL_PRIdINT64 "I64d"
+ #define SAL_PRIuUINT64 "I64u"
+ #define SAL_PRIxUINT64 "I64x"
+ #define SAL_PRIXUINT64 "I64X"
+ #else
#define SAL_PRIdINT64 "lld"
#define SAL_PRIuUINT64 "llu"
#define SAL_PRIxUINT64 "llx"
#define SAL_PRIXUINT64 "llX"
+ #endif
#else
#error "Could not find 64-bit type, add support for your architecture"
#endif
@@ -170,7 +177,7 @@ typedef void * sal_Handle;
/* printf-style conversion specification length modifiers for size_t and
ptrdiff_t (most platforms support C99, MSC has its own extension) */
-#if defined _MSC_VER
+#if defined(_MSC_VER) || defined(__MINGW32__)
#define SAL_PRI_SIZET "I"
#define SAL_PRI_PTRDIFFT "I"
#else