move lgamma-related internal declarations to libm.h

This commit is contained in:
Rich Felker
2018-09-12 14:34:29 -04:00
parent aee11e5acc
commit 59d88940d2
5 changed files with 7 additions and 12 deletions
+4
View File
@@ -192,4 +192,8 @@ long double __tanl(long double, long double, int);
long double __polevll(long double, const long double *, int);
long double __p1evll(long double, const long double *, int);
extern int __signgam;
double __lgamma_r(double, int *);
float __lgammaf_r(float, int *);
#endif
+1 -3
View File
@@ -1,7 +1,5 @@
#include <math.h>
extern int __signgam;
double __lgamma_r(double, int *);
#include "libm.h"
double lgamma(double x)
{
+1 -3
View File
@@ -1,7 +1,5 @@
#include <math.h>
extern int __signgam;
float __lgammaf_r(float, int *);
#include "libm.h"
float lgammaf(float x)
{
-6
View File
@@ -90,8 +90,6 @@
#include "libc.h"
#if LDBL_MANT_DIG == 53 && LDBL_MAX_EXP == 1024
double __lgamma_r(double x, int *sg);
long double __lgammal_r(long double x, int *sg)
{
return __lgamma_r(x, sg);
@@ -342,16 +340,12 @@ long double __lgammal_r(long double x, int *sg) {
}
#elif LDBL_MANT_DIG == 113 && LDBL_MAX_EXP == 16384
// TODO: broken implementation to make things compile
double __lgamma_r(double x, int *sg);
long double __lgammal_r(long double x, int *sg)
{
return __lgamma_r(x, sg);
}
#endif
extern int __signgam;
long double lgammal(long double x)
{
return __lgammal_r(x, &__signgam);
+1
View File
@@ -1,4 +1,5 @@
#include <math.h>
#include "libm.h"
#include "libc.h"
int __signgam = 0;