public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Zack Weinberg <zackw@panix.com>
To: libc-alpha@sourceware.org
Subject: [PATCH 9/9] Post-cleanup: don't include math.h/math_private.h in math_ldbl_opt.h.
Date: Wed, 07 Mar 2018 19:51:00 -0000	[thread overview]
Message-ID: <20180307193205.4751-10-zackw@panix.com> (raw)
In-Reply-To: <20180307193205.4751-1-zackw@panix.com>

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 --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"
-- 
2.16.2

  parent reply	other threads:[~2018-03-07 19:51 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-07 19:32 [PATCH 0/9] Use more flags parameters instead of global bits in stdio Zack Weinberg
2018-03-07 19:32 ` [PATCH 8/9] Use PRINTF_LDBL_IS_DBL instead of __ldbl_is_dbl Zack Weinberg
2018-03-07 19:32 ` [PATCH 3/9] Use SCANF_ISOC99_A instead of _IO_FLAGS2_SCANF_STD Zack Weinberg
2018-03-26 15:35   ` Gabriel F. T. Gomes
2018-03-07 19:32 ` [PATCH 2/9] Add __vfscanf_internal and __vfwscanf_internal with flags arguments Zack Weinberg
2018-03-13 12:35   ` Adhemerval Zanella
2018-06-29 14:04     ` Florian Weimer
2018-03-26 15:28   ` Gabriel F. T. Gomes
2018-06-29 14:12     ` Florian Weimer
2018-06-29 14:24   ` Florian Weimer
2018-06-29 14:29   ` Florian Weimer
2018-03-07 19:32 ` [PATCH 4/9] Use SCANF_LDBL_IS_DBL instead of __ldbl_is_dbl Zack Weinberg
2018-03-14 12:22   ` Florian Weimer
2018-03-26 15:36   ` Gabriel F. T. Gomes
2018-03-07 19:32 ` [PATCH 5/9] Add __v*printf_internal with flags arguments Zack Weinberg
2018-03-26 15:41   ` Gabriel F. T. Gomes
2018-03-07 19:32 ` [PATCH 1/9] Use STRFMON_LDBL_IS_DBL instead of __ldbl_is_dbl Zack Weinberg
2018-03-12 20:36   ` Adhemerval Zanella
2018-03-12 21:11     ` Zack Weinberg
2018-03-13 11:45       ` Adhemerval Zanella
2018-03-26 15:17   ` Gabriel F. T. Gomes
2018-03-26 15:40     ` Zack Weinberg
2018-03-26 15:52       ` Gabriel F. T. Gomes
2018-03-07 19:32 ` [PATCH 6/9] Add __vsyslog_internal, with same flags as __v*printf_internal Zack Weinberg
2018-03-13 11:59   ` Florian Weimer
2018-03-13 12:39     ` Zack Weinberg
2018-03-13 12:43       ` Florian Weimer
2018-03-13 13:37         ` Zack Weinberg
2018-03-13 13:50           ` Florian Weimer
2018-03-13 14:11             ` Zack Weinberg
2018-03-13 14:13               ` Florian Weimer
2018-03-07 19:51 ` Zack Weinberg [this message]
2018-03-07 19:51 ` [PATCH 7/9] Use PRINTF_FORTIFY instead of _IO_FLAGS2_FORTIFY Zack Weinberg
2018-03-12 15:29 ` [PATCH 0/9] Use more flags parameters instead of global bits in stdio Zack Weinberg
2018-03-26 15:16 ` Gabriel F. T. Gomes
2018-03-26 15:47   ` Zack Weinberg
2018-06-27 15:50 ` Florian Weimer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180307193205.4751-10-zackw@panix.com \
    --to=zackw@panix.com \
    --cc=libc-alpha@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).