From ea38f4d89c9698895b1cf53a5946429dc1d8bbaa Mon Sep 17 00:00:00 2001 From: Sergey Cherkashin <4erkashin@list.ru> Date: Tue, 3 Oct 2017 15:26:34 +0300 Subject: 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 --- libc/sysdeps/linux/common/bits/mathcalls.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'libc/sysdeps/linux/common') 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 -- cgit v1.2.3