about summary refs log tree commit diff
path: root/src/math
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2018-09-12 00:08:09 -0400
committerRich Felker <dalias@aerifal.cx>2018-09-12 14:34:37 -0400
commit5ce3737931bb411a8d167356d4d0287b53b0cbdc (patch)
tree726fc5dde9cc462316faa715158c38f0da72292d /src/math
parent0676c3a34c7bf12b33f8f5efb92476f4ffc7f20e (diff)
downloadmusl-5ce3737931bb411a8d167356d4d0287b53b0cbdc.tar.gz
musl-5ce3737931bb411a8d167356d4d0287b53b0cbdc.tar.xz
musl-5ce3737931bb411a8d167356d4d0287b53b0cbdc.zip
reduce spurious inclusion of libc.h
libc.h was intended to be a header for access to global libc state and
related interfaces, but ended up included all over the place because
it was the way to get the weak_alias macro. most of the inclusions
removed here are places where weak_alias was needed. a few were
recently introduced for hidden. some go all the way back to when
libc.h defined CANCELPT_BEGIN and _END, and all (wrongly implemented)
cancellation points had to include it.

remaining spurious users are mostly callers of the LOCK/UNLOCK macros
and files that use the LFS64 macro to define the awful *64 aliases.

in a few places, new inclusion of libc.h is added because several
internal headers no longer implicitly include libc.h.

declarations for __lockfile and __unlockfile are moved from libc.h to
stdio_impl.h so that the latter does not need libc.h. putting them in
libc.h made no sense at all, since the macros in stdio_impl.h are
needed to use them correctly anyway.
Diffstat (limited to 'src/math')
-rw-r--r--src/math/exp10.c1
-rw-r--r--src/math/exp10f.c1
-rw-r--r--src/math/exp10l.c1
-rw-r--r--src/math/lgamma_r.c1
-rw-r--r--src/math/lgammaf_r.c1
-rw-r--r--src/math/lgammal.c1
-rw-r--r--src/math/remainder.c1
-rw-r--r--src/math/remainderf.c1
-rw-r--r--src/math/signgam.c1
9 files changed, 0 insertions, 9 deletions
diff --git a/src/math/exp10.c b/src/math/exp10.c
index 9f5e3c2c..26899eba 100644
--- a/src/math/exp10.c
+++ b/src/math/exp10.c
@@ -1,7 +1,6 @@
 #define _GNU_SOURCE
 #include <math.h>
 #include <stdint.h>
-#include "libc.h"
 
 double exp10(double x)
 {
diff --git a/src/math/exp10f.c b/src/math/exp10f.c
index 7a8d4470..d009f0a8 100644
--- a/src/math/exp10f.c
+++ b/src/math/exp10f.c
@@ -1,7 +1,6 @@
 #define _GNU_SOURCE
 #include <math.h>
 #include <stdint.h>
-#include "libc.h"
 
 float exp10f(float x)
 {
diff --git a/src/math/exp10l.c b/src/math/exp10l.c
index b758ebff..f3da1a08 100644
--- a/src/math/exp10l.c
+++ b/src/math/exp10l.c
@@ -1,7 +1,6 @@
 #define _GNU_SOURCE
 #include <float.h>
 #include <math.h>
-#include "libc.h"
 #include "libm.h"
 
 #if LDBL_MANT_DIG == 53 && LDBL_MAX_EXP == 1024
diff --git a/src/math/lgamma_r.c b/src/math/lgamma_r.c
index fff565d2..f9984cd0 100644
--- a/src/math/lgamma_r.c
+++ b/src/math/lgamma_r.c
@@ -79,7 +79,6 @@
  */
 
 #include "libm.h"
-#include "libc.h"
 
 static const double
 pi  =  3.14159265358979311600e+00, /* 0x400921FB, 0x54442D18 */
diff --git a/src/math/lgammaf_r.c b/src/math/lgammaf_r.c
index c5b43db5..3f353f19 100644
--- a/src/math/lgammaf_r.c
+++ b/src/math/lgammaf_r.c
@@ -14,7 +14,6 @@
  */
 
 #include "libm.h"
-#include "libc.h"
 
 static const float
 pi  =  3.1415927410e+00, /* 0x40490fdb */
diff --git a/src/math/lgammal.c b/src/math/lgammal.c
index 8c798123..abbd4fc6 100644
--- a/src/math/lgammal.c
+++ b/src/math/lgammal.c
@@ -87,7 +87,6 @@
 
 #define _GNU_SOURCE
 #include "libm.h"
-#include "libc.h"
 
 #if LDBL_MANT_DIG == 53 && LDBL_MAX_EXP == 1024
 long double __lgammal_r(long double x, int *sg)
diff --git a/src/math/remainder.c b/src/math/remainder.c
index 6cd089c4..612155fe 100644
--- a/src/math/remainder.c
+++ b/src/math/remainder.c
@@ -1,5 +1,4 @@
 #include <math.h>
-#include "libc.h"
 
 double remainder(double x, double y)
 {
diff --git a/src/math/remainderf.c b/src/math/remainderf.c
index 420d3bfc..bf1d7b28 100644
--- a/src/math/remainderf.c
+++ b/src/math/remainderf.c
@@ -1,5 +1,4 @@
 #include <math.h>
-#include "libc.h"
 
 float remainderf(float x, float y)
 {
diff --git a/src/math/signgam.c b/src/math/signgam.c
index b4903a58..ee331b27 100644
--- a/src/math/signgam.c
+++ b/src/math/signgam.c
@@ -1,6 +1,5 @@
 #include <math.h>
 #include "libm.h"
-#include "libc.h"
 
 int __signgam = 0;