[4/4] Macroize inclusion of math-finite.h (part 4)

Submitted by Gabriel Ferreira Teles Gomes on March 13, 2017, 9:01 p.m.

Details

Message ID 1489438919-4009-5-git-send-email-gftg@linux.vnet.ibm.com
State New
Headers show

Commit Message

Gabriel Ferreira Teles Gomes March 13, 2017, 9:01 p.m.
---
 math/bits/math-finite.h | 29 ++++++-----------------------
 1 file changed, 6 insertions(+), 23 deletions(-)

Patch hide | download patch | download mbox

diff --git a/math/bits/math-finite.h b/math/bits/math-finite.h
index 1b5a243..c01c5c2 100644
--- a/math/bits/math-finite.h
+++ b/math/bits/math-finite.h
@@ -203,33 +203,16 @@  __MATH_REDIRCALL (sqrt, , (_Mdouble_));
 
 #if defined __USE_ISOC99 && defined __extern_always_inline
 /* tgamma.  */
-extern double __gamma_r_finite (double, int *);
-__extern_always_inline double __NTH (tgamma (double __d))
-{
-  int __local_signgam = 0;
-  double __res = __gamma_r_finite (__d, &__local_signgam);
-  return __local_signgam < 0 ? -__res : __res;
-}
-extern float __gammaf_r_finite (float, int *);
-__extern_always_inline float __NTH (tgammaf (float __d))
-{
-  int __local_signgam = 0;
-  float __res = __gammaf_r_finite (__d, &__local_signgam);
-  return __local_signgam < 0 ? -__res : __res;
-}
-# ifdef __MATH_DECLARE_LDOUBLE
-extern long double __gammal_r_finite (long double, int *);
-__extern_always_inline long double __NTH (tgammal (long double __d))
+extern _Mdouble_
+__REDIRFROM (__gamma, _r_finite, _MSUF_) (_Mdouble_, int *);
+
+__extern_always_inline _Mdouble_
+__NTH (__REDIRFROM (tgamma, , _MSUF_) (_Mdouble_ __d))
 {
   int __local_signgam = 0;
-#  ifdef __NO_LONG_DOUBLE_MATH
-  long double __res = __gamma_r_finite (__d, &__local_signgam);
-#  else
-  long double __res = __gammal_r_finite (__d, &__local_signgam);
-#  endif
+  _Mdouble_ __res = __REDIRTO (gamma, _r, _MSUF_) (__d, &__local_signgam);
   return __local_signgam < 0 ? -__res : __res;
 }
-# endif
 #endif
 
 #undef __REDIRFROM