From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-4.2 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 5EC65202AA for ; Wed, 27 Feb 2019 10:36:46 +0000 (UTC) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:subject:to:cc:references:from:message-id:date :mime-version:in-reply-to:content-type; q=dns; s=default; b=oI0w jbyvp8DnCaFqYy5amOKF7/m/r3XWKHShRggIN9I/6nRRi4vPkoH2pIztiT8AN5+n mH+1ORv267WhMOc/3NvjBosex+SGe62MsvG2I9RFHA5krBUWI5IXCYDa7jyarkC2 5nWClw01Ux3dJ3rikyOsTXvENbfmNFl+ymLc+UA= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:subject:to:cc:references:from:message-id:date :mime-version:in-reply-to:content-type; s=default; bh=SMYCn4/qPi +epwqQjaiVu2dinoQ=; b=CxZbNdv1WhLJS5yy5tKEDc0K3pzKbtUJRWnSHFr3UL nRGatLT6EzrM+PYFrSguGMgTyLLTOD0x+2fsUnTeRLz5vs50cyY9b7/kSJ6KgHP9 VOYMGnssuzXWle1SweQdQTeR5ReWcH/ebDpq6Hh3cybIi7NcAan58/pu5da2Ef2b A= Received: (qmail 71916 invoked by alias); 27 Feb 2019 10:36:43 -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 Received: (qmail 71890 invoked by uid 89); 27 Feb 2019 10:36:43 -0000 Authentication-Results: sourceware.org; auth=none X-HELO: mx1.suse.de Subject: Re: [PATCH] Fix location where math-vector-fortran.h is installed. To: Florian Weimer Cc: Zack Weinberg , Joseph Myers , GNU C Library References: <863ffa3b-af66-7d82-21a8-e809fd6c1b62@suse.cz> <08214004-67b7-ce24-07ec-3cd685c65038@suse.cz> <84b2b212-a70a-e18a-5929-d89d6014fb70@suse.cz> <44cd0edb-2ab3-2908-8adb-f2e06859ecfe@suse.cz> <57bb8e48-8805-91ca-9902-9c6fbc3d5360@suse.cz> <87imx62qtr.fsf@oldenburg2.str.redhat.com> <87o96xv8u2.fsf@oldenburg2.str.redhat.com> From: =?UTF-8?Q?Martin_Li=c5=a1ka?= Message-ID: <1c3a168a-b142-d6e5-55d6-f82850610cc8@suse.cz> Date: Wed, 27 Feb 2019 11:36:34 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1 MIME-Version: 1.0 In-Reply-To: <87o96xv8u2.fsf@oldenburg2.str.redhat.com> Content-Type: multipart/mixed; boundary="------------50527098856F6A7FAC8C1230" This is a multi-part message in MIME format. --------------50527098856F6A7FAC8C1230 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit On 2/27/19 11:12 AM, Florian Weimer wrote: > * Martin Liška: > >> is_nonsysdep_header = os.access(header, os.R_OK) >> if is_nonsysdep_header: >> + # Skip Fortran header files >> + if '-*- f90 -*-' in open(header).readlines()[0]: >> + continue > > Please use “with” to close the file promptly, and do not read the entire > file, like this (untested): > > # Skip Fortran header files. > with open(header) as inp: > if '-*- f90 -*-' in next(inp): > continue Good point. Is the patch ready to be installed now? Thanks, Martin > > Thanks, > Florian > --------------50527098856F6A7FAC8C1230 Content-Type: text/x-patch; name="0001-Fix-location-where-math-vector-fortran.h-is-installe.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename*0="0001-Fix-location-where-math-vector-fortran.h-is-installe.pa"; filename*1="tch" >From 5e786337c48dbf33453a634725e2e95b10c73b62 Mon Sep 17 00:00:00 2001 From: marxin Date: Tue, 26 Feb 2019 18:17:36 +0100 Subject: [PATCH] Fix location where math-vector-fortran.h is installed. ChangeLog: 2019-02-26 Martin Liska * math/Makefile: Change location where math-vector-fortran.h is installed. * finclude/math-vector-fortran.h: Move from bits/math-vector-fortran.h. * sysdeps/x86/fpu/finclude/math-vector-fortran.h: Move from sysdeps/x86/fpu/bits/math-vector-fortran.h. * scripts/check-installed-headers.sh: Skip Fortran header file. * scripts/check-wrapper-headers.py: Filter out f90 files. --- math/Makefile | 2 +- {bits => math/finclude}/math-vector-fortran.h | 0 scripts/check-installed-headers.sh | 4 ++++ scripts/check-wrapper-headers.py | 5 +++++ sysdeps/x86/fpu/{bits => finclude}/math-vector-fortran.h | 0 5 files changed, 10 insertions(+), 1 deletion(-) rename {bits => math/finclude}/math-vector-fortran.h (100%) rename sysdeps/x86/fpu/{bits => finclude}/math-vector-fortran.h (100%) diff --git a/math/Makefile b/math/Makefile index fc4191089d..cb4eaec6a9 100644 --- a/math/Makefile +++ b/math/Makefile @@ -26,7 +26,7 @@ headers := math.h bits/mathcalls.h bits/mathinline.h \ fpu_control.h complex.h bits/cmathcalls.h fenv.h \ bits/fenv.h bits/fenvinline.h bits/mathdef.h tgmath.h \ bits/math-finite.h bits/math-vector.h \ - bits/math-vector-fortran.h \ + finclude/math-vector-fortran.h \ bits/libm-simd-decl-stubs.h bits/iscanonical.h \ bits/flt-eval-method.h bits/fp-fast.h bits/fp-logb.h \ bits/long-double.h bits/mathcalls-helper-functions.h \ diff --git a/bits/math-vector-fortran.h b/math/finclude/math-vector-fortran.h similarity index 100% rename from bits/math-vector-fortran.h rename to math/finclude/math-vector-fortran.h diff --git a/scripts/check-installed-headers.sh b/scripts/check-installed-headers.sh index 8e7beffd82..937ed969ec 100644 --- a/scripts/check-installed-headers.sh +++ b/scripts/check-installed-headers.sh @@ -84,6 +84,10 @@ for header in "$@"; do (sys/elf.h) continue;; + # Skip Fortran header + (finclude/math-vector-fortran.h) + continue;; + # sys/sysctl.h is unsupported for x32. (sys/sysctl.h) case "$is_x32" in diff --git a/scripts/check-wrapper-headers.py b/scripts/check-wrapper-headers.py index 094faa3ced..6d9a89bc98 100644 --- a/scripts/check-wrapper-headers.py +++ b/scripts/check-wrapper-headers.py @@ -75,6 +75,11 @@ def check_headers(args): is_nonsysdep_header = os.access(header, os.R_OK) if is_nonsysdep_header: + # Skip Fortran header files + with open(header) as inp: + if '-*- f90 -*-' in next(inp): + continue + include_path = os.path.join(args.root, INCLUDE, header) if not os.access(include_path, os.R_OK): print('error: missing wrapper header {} for {}'.format( diff --git a/sysdeps/x86/fpu/bits/math-vector-fortran.h b/sysdeps/x86/fpu/finclude/math-vector-fortran.h similarity index 100% rename from sysdeps/x86/fpu/bits/math-vector-fortran.h rename to sysdeps/x86/fpu/finclude/math-vector-fortran.h -- 2.20.1 --------------50527098856F6A7FAC8C1230--