fix namespace issues for lgamma, etc.
standard functions cannot depend on nonstandard symbols
This commit is contained in:
parent
93a50a26cd
commit
de7db6e927
7 changed files with 25 additions and 14 deletions
|
|
@ -20,6 +20,8 @@
|
||||||
|
|
||||||
#include "longdbl.h"
|
#include "longdbl.h"
|
||||||
|
|
||||||
|
#include "libc.h"
|
||||||
|
|
||||||
union fshape {
|
union fshape {
|
||||||
float value;
|
float value;
|
||||||
uint32_t bits;
|
uint32_t bits;
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,7 @@
|
||||||
* ====================================================
|
* ====================================================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#define _GNU_SOURCE
|
||||||
#include "libm.h"
|
#include "libm.h"
|
||||||
|
|
||||||
static const float
|
static const float
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,10 @@
|
||||||
#define _GNU_SOURCE
|
|
||||||
#include "libm.h"
|
#include "libm.h"
|
||||||
|
|
||||||
|
double __lgamma_r(double, int *);
|
||||||
|
|
||||||
double lgamma(double x)
|
double lgamma(double x)
|
||||||
{
|
{
|
||||||
return lgamma_r(x, &signgam);
|
return __lgamma_r(x, &signgam);
|
||||||
}
|
}
|
||||||
|
|
||||||
// FIXME
|
// FIXME
|
||||||
|
|
|
||||||
|
|
@ -199,7 +199,7 @@ static double sin_pi(double x)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
double lgamma_r(double x, int *signgamp)
|
double __lgamma_r(double x, int *signgamp)
|
||||||
{
|
{
|
||||||
double t,y,z,nadj,p,p1,p2,p3,q,r,w;
|
double t,y,z,nadj,p,p1,p2,p3,q,r,w;
|
||||||
int32_t hx;
|
int32_t hx;
|
||||||
|
|
@ -313,3 +313,5 @@ double lgamma_r(double x, int *signgamp)
|
||||||
r = nadj - r;
|
r = nadj - r;
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
weak_alias(__lgamma_r, lgamma_r);
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,10 @@
|
||||||
#define _GNU_SOURCE
|
|
||||||
#include "libm.h"
|
#include "libm.h"
|
||||||
|
|
||||||
|
float __lgammaf_r(float, int *);
|
||||||
|
|
||||||
float lgammaf(float x)
|
float lgammaf(float x)
|
||||||
{
|
{
|
||||||
return lgamma_r(x, &signgam);
|
return __lgammaf_r(x, &signgam);
|
||||||
}
|
}
|
||||||
|
|
||||||
// FIXME
|
// FIXME
|
||||||
|
|
|
||||||
|
|
@ -134,7 +134,7 @@ static float sin_pif(float x)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
float lgammaf_r(float x, int *signgamp)
|
float __lgammaf_r(float x, int *signgamp)
|
||||||
{
|
{
|
||||||
float t,y,z,nadj,p,p1,p2,p3,q,r,w;
|
float t,y,z,nadj,p,p1,p2,p3,q,r,w;
|
||||||
int32_t hx;
|
int32_t hx;
|
||||||
|
|
@ -248,3 +248,5 @@ float lgammaf_r(float x, int *signgamp)
|
||||||
r = nadj - r;
|
r = nadj - r;
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
weak_alias(__lgammaf_r, lgammaf_r);
|
||||||
|
|
|
||||||
|
|
@ -88,15 +88,10 @@
|
||||||
#define _GNU_SOURCE
|
#define _GNU_SOURCE
|
||||||
#include "libm.h"
|
#include "libm.h"
|
||||||
|
|
||||||
long double lgammal(long double x)
|
|
||||||
{
|
|
||||||
return lgammal_r(x, &signgam);
|
|
||||||
}
|
|
||||||
|
|
||||||
#if LDBL_MANT_DIG == 53 && LDBL_MAX_EXP == 1024
|
#if LDBL_MANT_DIG == 53 && LDBL_MAX_EXP == 1024
|
||||||
long double lgammal_r(long double x, int *sg)
|
long double __lgammal_r(long double x, int *sg)
|
||||||
{
|
{
|
||||||
return lgamma_r(x, sg);
|
return __lgamma_r(x, sg);
|
||||||
}
|
}
|
||||||
#elif LDBL_MANT_DIG == 64 && LDBL_MAX_EXP == 16384
|
#elif LDBL_MANT_DIG == 64 && LDBL_MAX_EXP == 16384
|
||||||
static const long double
|
static const long double
|
||||||
|
|
@ -266,7 +261,7 @@ static long double sin_pi(long double x)
|
||||||
return -y;
|
return -y;
|
||||||
}
|
}
|
||||||
|
|
||||||
long double lgammal_r(long double x, int *sg) {
|
long double __lgammal_r(long double x, int *sg) {
|
||||||
long double t, y, z, nadj, p, p1, p2, q, r, w;
|
long double t, y, z, nadj, p, p1, p2, q, r, w;
|
||||||
int i, ix;
|
int i, ix;
|
||||||
uint32_t se, i0, i1;
|
uint32_t se, i0, i1;
|
||||||
|
|
@ -392,3 +387,10 @@ long double lgammal_r(long double x, int *sg) {
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
long double lgammal(long double x)
|
||||||
|
{
|
||||||
|
return __lgammal_r(x, &signgam);
|
||||||
|
}
|
||||||
|
|
||||||
|
weak_alias(__lgammal_r, lgammal_r);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue