summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/common
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/sysdeps/linux/common
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/sysdeps/linux/common')
-rw-r--r--libc/sysdeps/linux/common/bits/mathcalls.h7
1 files changed, 5 insertions, 2 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