aboutsummaryrefslogtreecommitdiff
path: root/system/lib
diff options
context:
space:
mode:
authorBruce Mitchener <bruce.mitchener@gmail.com>2013-10-24 10:12:22 +0700
committerBruce Mitchener <bruce.mitchener@gmail.com>2014-01-14 02:21:11 +0700
commitcd21e58d9e4bda0365696ed7873f7520f8ebf20b (patch)
treef9ccee7d4808062f68a9ec2e2ec18c3cfdeae7e5 /system/lib
parentb167b3c7519c903db2bc9fae51f1a2a2ae1c90e8 (diff)
Make lgamma and friends work, add test.
We can't use weak aliases on variables in emscripten, so get rid of __signgam and just use signgam.
Diffstat (limited to 'system/lib')
-rw-r--r--system/lib/libc/musl/src/math/lgamma.c4
-rw-r--r--system/lib/libc/musl/src/math/lgammaf.c4
-rw-r--r--system/lib/libc/musl/src/math/lgammal.c4
-rw-r--r--system/lib/libc/musl/src/math/signgam.c4
-rw-r--r--system/lib/libcextra.symbols3
5 files changed, 8 insertions, 11 deletions
diff --git a/system/lib/libc/musl/src/math/lgamma.c b/system/lib/libc/musl/src/math/lgamma.c
index e25ec8e6..36006682 100644
--- a/system/lib/libc/musl/src/math/lgamma.c
+++ b/system/lib/libc/musl/src/math/lgamma.c
@@ -1,9 +1,9 @@
#include <math.h>
-extern int __signgam;
+extern int signgam;
double __lgamma_r(double, int *);
double lgamma(double x)
{
- return __lgamma_r(x, &__signgam);
+ return __lgamma_r(x, &signgam);
}
diff --git a/system/lib/libc/musl/src/math/lgammaf.c b/system/lib/libc/musl/src/math/lgammaf.c
index badb6dfe..628e6ade 100644
--- a/system/lib/libc/musl/src/math/lgammaf.c
+++ b/system/lib/libc/musl/src/math/lgammaf.c
@@ -1,9 +1,9 @@
#include <math.h>
-extern int __signgam;
+extern int signgam;
float __lgammaf_r(float, int *);
float lgammaf(float x)
{
- return __lgammaf_r(x, &__signgam);
+ return __lgammaf_r(x, &signgam);
}
diff --git a/system/lib/libc/musl/src/math/lgammal.c b/system/lib/libc/musl/src/math/lgammal.c
index cc4895eb..9686d9ee 100644
--- a/system/lib/libc/musl/src/math/lgammal.c
+++ b/system/lib/libc/musl/src/math/lgammal.c
@@ -376,11 +376,11 @@ long double __lgammal_r(long double x, int *sg) {
}
#endif
-extern int __signgam;
+extern int signgam;
long double lgammal(long double x)
{
- return __lgammal_r(x, &__signgam);
+ return __lgammal_r(x, &signgam);
}
weak_alias(__lgammal_r, lgammal_r);
diff --git a/system/lib/libc/musl/src/math/signgam.c b/system/lib/libc/musl/src/math/signgam.c
index cd728001..ee5d70f1 100644
--- a/system/lib/libc/musl/src/math/signgam.c
+++ b/system/lib/libc/musl/src/math/signgam.c
@@ -1,6 +1,4 @@
#include <math.h>
#include "libc.h"
-int __signgam = 0;
-
-weak_alias(__signgam, signgam);
+int signgam = 0;
diff --git a/system/lib/libcextra.symbols b/system/lib/libcextra.symbols
index 0780847c..8d22ec4f 100644
--- a/system/lib/libcextra.symbols
+++ b/system/lib/libcextra.symbols
@@ -5,7 +5,6 @@
T __lgammaf_r
T __lgammal_r
T __memrchr
- D __signgam
T __sindf
T __strchrnul
T __strxfrm_l
@@ -73,7 +72,7 @@
T regerror
T regexec
T regfree
- W signgam
+ D signgam
T strcasecmp_l
T strcasestr
W strchrnul