summaryrefslogtreecommitdiff
path: root/libc
diff options
context:
space:
mode:
authorSergey Cherkashin <4erkashin@list.ru>2017-10-03 15:26:34 +0300
committerWaldemar Brodkorb <wbx@uclibc-ng.org>2017-11-03 20:23:10 +0100
commitea38f4d89c9698895b1cf53a5946429dc1d8bbaa (patch)
treee05828ca1fedf55f104b837bc9c44215c2978e99 /libc
parent68de9946e914d8c30dcc6667a059ea59e5b74cac (diff)
math: add exception handling functionality
According to standards SVID and SYSV. Modified lgamma calling in case when 'signgam' variable should not be used. Signed-off-by: Waldemar Brodkorb <wbx@uclibc-ng.org>
Diffstat (limited to 'libc')
-rw-r--r--libc/sysdeps/linux/common/bits/mathcalls.h7
-rw-r--r--libc/sysdeps/linux/powerpc/bits/mathdef.h10
-rw-r--r--libc/sysdeps/linux/powerpc/bits/wordsize.h11
3 files changed, 8 insertions, 20 deletions
diff --git a/libc/sysdeps/linux/common/bits/mathcalls.h b/libc/sysdeps/linux/common/bits/mathcalls.h
index 8ab807578..a9e8a2931 100644
--- a/libc/sysdeps/linux/common/bits/mathcalls.h
+++ b/libc/sysdeps/linux/common/bits/mathcalls.h
@@ -300,14 +300,17 @@ __END_NAMESPACE_C99
__MATHCALLI (gamma,, (_Mdouble_))
#endif
-#ifdef __USE_MISC
+//#ifdef __USE_MISC
+/* To provide compatibility with finite-math-only in C99 and C11
+ * standerts function lgamma_r should be declared, when defined __USE_MISC.
+ */
/* Reentrant version of lgamma. This function uses the global variable
`signgam'. The reentrant version instead takes a pointer and stores
the value through it. */
__MATHCALL (lgamma,_r, (_Mdouble_, int *__signgamp))
/* __MATHCALLI does not work here, probably due to ,_r, */
libm_hidden_proto(lgamma_r)
-#endif
+//#endif
#if defined __USE_MISC || defined __USE_XOPEN_EXTENDED || defined __USE_ISOC99
diff --git a/libc/sysdeps/linux/powerpc/bits/mathdef.h b/libc/sysdeps/linux/powerpc/bits/mathdef.h
index 2c0cad116..97a05b6b2 100644
--- a/libc/sysdeps/linux/powerpc/bits/mathdef.h
+++ b/libc/sysdeps/linux/powerpc/bits/mathdef.h
@@ -44,10 +44,6 @@ typedef double double_t; /* `double' expressions are evaluated as
#endif /* ISO C99 */
-#ifndef __NO_LONG_DOUBLE_MATH
-/* Signal that we do not really have a `long double'. The disables the
- declaration of all the `long double' function variants. */
-# if !defined __UCLIBC_HAS_LONG_DOUBLE_MATH__
-# define __NO_LONG_DOUBLE_MATH 1
-# endif
-#endif /* __NO_LONG_DOUBLE_MATH */
+#if !defined __NO_LONG_DOUBLE_MATH && !defined __UCLIBC_HAS_LONG_DOUBLE_MATH__
+# define __NO_LONG_DOUBLE_MATH 1
+#endif
diff --git a/libc/sysdeps/linux/powerpc/bits/wordsize.h b/libc/sysdeps/linux/powerpc/bits/wordsize.h
index 0c0d31b98..da587a2f1 100644
--- a/libc/sysdeps/linux/powerpc/bits/wordsize.h
+++ b/libc/sysdeps/linux/powerpc/bits/wordsize.h
@@ -1,14 +1,3 @@
/* Determine the wordsize from the preprocessor defines. */
#define __WORDSIZE 32
-
-#if !defined __NO_LONG_DOUBLE_MATH && !defined __LONG_DOUBLE_MATH_OPTIONAL
-
-/* Signal the glibc ABI didn't used to have a `long double'.
- The changes all the `long double' function variants to be redirects
- to the double functions. */
-# define __LONG_DOUBLE_MATH_OPTIONAL 1
-# ifndef __LONG_DOUBLE_128__
-# define __NO_LONG_DOUBLE_MATH 1
-# endif
-#endif