diff mbox series

[9/9] Post-cleanup: don't include math.h/math_private.h in math_ldbl_opt.h.

Message ID 20180307193205.4751-10-zackw@panix.com
State New
Headers show
Series Use more flags parameters instead of global bits in stdio | expand

Commit Message

Zack Weinberg March 7, 2018, 7:32 p.m. UTC
One version of math_ldbl_opt.h includes math.h and math_private.h, the
other doesn't.  The _contents_ of math_ldbl_opt.h do not depend in any
way on the declarations in those headers, so this is just asking for
trouble down the road.  Indeed, about 15 files that don't necessarily
have to be used on an ldbl-opt platform are relying on that
math_ldbl_opt.h to include math.h and/or math_private.h.  And those
are just the ones I found by compiling on PPC64.  I plan to run
build-many-glibcs and add more fixes to this patch as necessary.


	* sysdeps/ieee754/ldbl-opt/math_ldbl_opt.h: Don't include
	math.h or math_private.h.

	* sysdeps/ieee754/ldbl-128ibm/s_ceill.c
	* sysdeps/ieee754/ldbl-128ibm/s_floorl.c
	* sysdeps/ieee754/ldbl-128ibm/s_llrintl.c
	* sysdeps/ieee754/ldbl-128ibm/s_llroundl.c
	* sysdeps/ieee754/ldbl-128ibm/s_lrintl.c
	* sysdeps/ieee754/ldbl-128ibm/s_lroundl.c
	* sysdeps/ieee754/ldbl-128ibm/s_rintl.c
	* sysdeps/ieee754/ldbl-128ibm/s_roundl.c
	* sysdeps/ieee754/ldbl-128ibm/s_truncl.c
	* sysdeps/powerpc/powerpc64/fpu/multiarch/e_expf.c
	* sysdeps/powerpc/powerpc64/fpu/multiarch/e_hypot.c
	* sysdeps/powerpc/powerpc64/fpu/multiarch/e_hypotf.c:
	Include math_private.h.

	* sysdeps/powerpc/power7/fpu/s_logb.c:
	Include math.h and math_private.h.
---
 sysdeps/ieee754/ldbl-128ibm/s_ceill.c              | 1 +
 sysdeps/ieee754/ldbl-128ibm/s_floorl.c             | 1 +
 sysdeps/ieee754/ldbl-128ibm/s_llrintl.c            | 1 +
 sysdeps/ieee754/ldbl-128ibm/s_llroundl.c           | 1 +
 sysdeps/ieee754/ldbl-128ibm/s_lrintl.c             | 1 +
 sysdeps/ieee754/ldbl-128ibm/s_lroundl.c            | 1 +
 sysdeps/ieee754/ldbl-128ibm/s_rintl.c              | 1 +
 sysdeps/ieee754/ldbl-128ibm/s_roundl.c             | 1 +
 sysdeps/ieee754/ldbl-128ibm/s_truncl.c             | 1 +
 sysdeps/ieee754/ldbl-opt/math_ldbl_opt.h           | 5 -----
 sysdeps/powerpc/power7/fpu/s_logb.c                | 2 ++
 sysdeps/powerpc/powerpc64/fpu/multiarch/e_expf.c   | 1 +
 sysdeps/powerpc/powerpc64/fpu/multiarch/e_hypot.c  | 1 +
 sysdeps/powerpc/powerpc64/fpu/multiarch/e_hypotf.c | 1 +
 14 files changed, 14 insertions(+), 5 deletions(-)
diff mbox series

Patch

diff --git a/sysdeps/ieee754/ldbl-128ibm/s_ceill.c b/sysdeps/ieee754/ldbl-128ibm/s_ceill.c
index 22eddcfcd3..7dcff021c4 100644
--- a/sysdeps/ieee754/ldbl-128ibm/s_ceill.c
+++ b/sysdeps/ieee754/ldbl-128ibm/s_ceill.c
@@ -18,6 +18,7 @@ 
    <http://www.gnu.org/licenses/>.  */
 
 #include <math.h>
+#include <math_private.h>
 #include <math_ldbl_opt.h>
 #include <float.h>
 #include <ieee754.h>
diff --git a/sysdeps/ieee754/ldbl-128ibm/s_floorl.c b/sysdeps/ieee754/ldbl-128ibm/s_floorl.c
index 2131934cc1..4aae5ae608 100644
--- a/sysdeps/ieee754/ldbl-128ibm/s_floorl.c
+++ b/sysdeps/ieee754/ldbl-128ibm/s_floorl.c
@@ -18,6 +18,7 @@ 
    <http://www.gnu.org/licenses/>.  */
 
 #include <math.h>
+#include <math_private.h>
 #include <math_ldbl_opt.h>
 #include <float.h>
 #include <ieee754.h>
diff --git a/sysdeps/ieee754/ldbl-128ibm/s_llrintl.c b/sysdeps/ieee754/ldbl-128ibm/s_llrintl.c
index f2f4c19b0e..9d4535103e 100644
--- a/sysdeps/ieee754/ldbl-128ibm/s_llrintl.c
+++ b/sysdeps/ieee754/ldbl-128ibm/s_llrintl.c
@@ -19,6 +19,7 @@ 
 
 #include <math.h>
 #include <fenv.h>
+#include <math_private.h>
 #include <math_ldbl_opt.h>
 #include <float.h>
 #include <ieee754.h>
diff --git a/sysdeps/ieee754/ldbl-128ibm/s_llroundl.c b/sysdeps/ieee754/ldbl-128ibm/s_llroundl.c
index 5bfa83cee3..de6a7b5be2 100644
--- a/sysdeps/ieee754/ldbl-128ibm/s_llroundl.c
+++ b/sysdeps/ieee754/ldbl-128ibm/s_llroundl.c
@@ -19,6 +19,7 @@ 
 
 #include <math.h>
 #include <fenv.h>
+#include <math_private.h>
 #include <math_ldbl_opt.h>
 #include <float.h>
 #include <ieee754.h>
diff --git a/sysdeps/ieee754/ldbl-128ibm/s_lrintl.c b/sysdeps/ieee754/ldbl-128ibm/s_lrintl.c
index c2e2f68984..05fe7fefdf 100644
--- a/sysdeps/ieee754/ldbl-128ibm/s_lrintl.c
+++ b/sysdeps/ieee754/ldbl-128ibm/s_lrintl.c
@@ -19,6 +19,7 @@ 
 
 #include <math.h>
 #include <fenv.h>
+#include <math_private.h>
 #include <math_ldbl_opt.h>
 #include <float.h>
 #include <ieee754.h>
diff --git a/sysdeps/ieee754/ldbl-128ibm/s_lroundl.c b/sysdeps/ieee754/ldbl-128ibm/s_lroundl.c
index 010e8e28a1..bc8dda4c1d 100644
--- a/sysdeps/ieee754/ldbl-128ibm/s_lroundl.c
+++ b/sysdeps/ieee754/ldbl-128ibm/s_lroundl.c
@@ -19,6 +19,7 @@ 
 
 #include <math.h>
 #include <fenv.h>
+#include <math_private.h>
 #include <math_ldbl_opt.h>
 #include <float.h>
 #include <ieee754.h>
diff --git a/sysdeps/ieee754/ldbl-128ibm/s_rintl.c b/sysdeps/ieee754/ldbl-128ibm/s_rintl.c
index 9c4514eec3..73d2b4edfe 100644
--- a/sysdeps/ieee754/ldbl-128ibm/s_rintl.c
+++ b/sysdeps/ieee754/ldbl-128ibm/s_rintl.c
@@ -22,6 +22,7 @@ 
 
 #include <math.h>
 #include <fenv.h>
+#include <math_private.h>
 #include <math_ldbl_opt.h>
 #include <float.h>
 #include <ieee754.h>
diff --git a/sysdeps/ieee754/ldbl-128ibm/s_roundl.c b/sysdeps/ieee754/ldbl-128ibm/s_roundl.c
index 5915d53a18..94a62dcd6c 100644
--- a/sysdeps/ieee754/ldbl-128ibm/s_roundl.c
+++ b/sysdeps/ieee754/ldbl-128ibm/s_roundl.c
@@ -21,6 +21,7 @@ 
    when it's coded in C.  */
 
 #include <math.h>
+#include <math_private.h>
 #include <math_ldbl_opt.h>
 #include <float.h>
 #include <ieee754.h>
diff --git a/sysdeps/ieee754/ldbl-128ibm/s_truncl.c b/sysdeps/ieee754/ldbl-128ibm/s_truncl.c
index a4638b5da9..a915a01ac6 100644
--- a/sysdeps/ieee754/ldbl-128ibm/s_truncl.c
+++ b/sysdeps/ieee754/ldbl-128ibm/s_truncl.c
@@ -18,6 +18,7 @@ 
    <http://www.gnu.org/licenses/>.  */
 
 #include <math.h>
+#include <math_private.h>
 #include <math_ldbl_opt.h>
 #include <float.h>
 #include <ieee754.h>
diff --git a/sysdeps/ieee754/ldbl-opt/math_ldbl_opt.h b/sysdeps/ieee754/ldbl-opt/math_ldbl_opt.h
index 2b8f3e3c10..53e40af3e7 100644
--- a/sysdeps/ieee754/ldbl-opt/math_ldbl_opt.h
+++ b/sysdeps/ieee754/ldbl-opt/math_ldbl_opt.h
@@ -38,8 +38,3 @@ 
   weak_alias (local, symbol)
 # endif
 #endif
-
-#ifndef __ASSEMBLER__
-# include <math.h>
-# include <math_private.h>
-#endif
diff --git a/sysdeps/powerpc/power7/fpu/s_logb.c b/sysdeps/powerpc/power7/fpu/s_logb.c
index 160b9334de..f7eec8ff06 100644
--- a/sysdeps/powerpc/power7/fpu/s_logb.c
+++ b/sysdeps/powerpc/power7/fpu/s_logb.c
@@ -16,6 +16,8 @@ 
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
+#include <math.h>
+#include <math_private.h>
 #include <math_ldbl_opt.h>
 #include <libm-alias-double.h>
 
diff --git a/sysdeps/powerpc/powerpc64/fpu/multiarch/e_expf.c b/sysdeps/powerpc/powerpc64/fpu/multiarch/e_expf.c
index af103e47b5..f752514efa 100644
--- a/sysdeps/powerpc/powerpc64/fpu/multiarch/e_expf.c
+++ b/sysdeps/powerpc/powerpc64/fpu/multiarch/e_expf.c
@@ -17,6 +17,7 @@ 
    <http://www.gnu.org/licenses/>.  */
 
 #include <math.h>
+#include <math_private.h>
 #include <math_ldbl_opt.h>
 #include "init-arch.h"
 
diff --git a/sysdeps/powerpc/powerpc64/fpu/multiarch/e_hypot.c b/sysdeps/powerpc/powerpc64/fpu/multiarch/e_hypot.c
index cb771a3fe4..8d05c430cc 100644
--- a/sysdeps/powerpc/powerpc64/fpu/multiarch/e_hypot.c
+++ b/sysdeps/powerpc/powerpc64/fpu/multiarch/e_hypot.c
@@ -17,6 +17,7 @@ 
    <http://www.gnu.org/licenses/>.  */
 
 #include <math.h>
+#include <math_private.h>
 #include <math_ldbl_opt.h>
 #include <shlib-compat.h>
 #include "init-arch.h"
diff --git a/sysdeps/powerpc/powerpc64/fpu/multiarch/e_hypotf.c b/sysdeps/powerpc/powerpc64/fpu/multiarch/e_hypotf.c
index e46ef68bfe..9bef1fea3f 100644
--- a/sysdeps/powerpc/powerpc64/fpu/multiarch/e_hypotf.c
+++ b/sysdeps/powerpc/powerpc64/fpu/multiarch/e_hypotf.c
@@ -17,6 +17,7 @@ 
    <http://www.gnu.org/licenses/>.  */
 
 #include <math.h>
+#include <math_private.h>
 #include <math_ldbl_opt.h>
 #include <shlib-compat.h>
 #include "init-arch.h"