From patchwork Wed Mar 7 19:32:05 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zack Weinberg X-Patchwork-Id: 26234 Received: (qmail 7386 invoked by alias); 7 Mar 2018 19:51:53 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 7364 invoked by uid 89); 7 Mar 2018 19:51:53 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.9 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_SHORT, SPF_HELO_PASS, SPF_PASS, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=coded X-HELO: l2mail1.panix.com From: Zack Weinberg 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, 7 Mar 2018 14:32:05 -0500 Message-Id: <20180307193205.4751-10-zackw@panix.com> In-Reply-To: <20180307193205.4751-1-zackw@panix.com> References: <20180307193205.4751-1-zackw@panix.com> MIME-Version: 1.0 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 @@ . */ #include +#include #include #include #include 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 @@ . */ #include +#include #include #include #include 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 #include +#include #include #include #include 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 #include +#include #include #include #include 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 #include +#include #include #include #include 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 #include +#include #include #include #include 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 #include +#include #include #include #include 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 +#include #include #include #include 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 @@ . */ #include +#include #include #include #include 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 -# include -#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 . */ +#include +#include #include #include 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 @@ . */ #include +#include #include #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 @@ . */ #include +#include #include #include #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 @@ . */ #include +#include #include #include #include "init-arch.h"