From patchwork Fri Jun 24 07:00:22 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xi Ruoyao X-Patchwork-Id: 55362 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 3AFA93851A87 for ; Fri, 24 Jun 2022 07:02:13 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3AFA93851A87 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1656054133; bh=neVPoDtT0loK/xQJvdQLWRJWFe4zCNyc5JQH9Epye6A=; h=Subject:To:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=CpGl2n3G3A+Sev35P0fdwODgnMbC7vT2jbKzHlEqpem2kU47vd9UWUepdUtJ5PT+8 5W+3XDJCuipE3ePNGHcRI+LWjhwaDZRWbHv0A3EMhSsSaDFWnNSGqd+7A3antMxXbu lSrf75M0FIqod6vAcPsCqwnz5a7z2sJgTI7MypM4= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from xry111.site (xry111.site [89.208.246.23]) by sourceware.org (Postfix) with ESMTPS id 9E3F2384D1A5 for ; Fri, 24 Jun 2022 07:00:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 9E3F2384D1A5 Received: from localhost.localdomain (xry111.site [IPv6:2001:470:683e::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-384) server-digest SHA384) (Client did not present a certificate) (Authenticated sender: xry111@xry111.site) by xry111.site (Postfix) with ESMTPSA id 8F60966924 for ; Fri, 24 Jun 2022 03:00:24 -0400 (EDT) Message-ID: <7b017f3321a705497a3168bf9185f24be70fc619.camel@xry111.site> Subject: [PATCH 2/8] fixincludes: use grep -E/-F instead of egrep/fgrep To: gcc-patches@gcc.gnu.org Date: Fri, 24 Jun 2022 15:00:22 +0800 In-Reply-To: <74ea0c62ebe19db186263053e4051f81d46e9da4.camel@xry111.site> References: <74ea0c62ebe19db186263053e4051f81d46e9da4.camel@xry111.site> User-Agent: Evolution 3.44.2 MIME-Version: 1.0 X-Spam-Status: No, score=-6.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FROM_SUSPICIOUS_NTLD, GIT_PATCH_0, LIKELY_SPAM_FROM, PDS_OTHER_BAD_TLD, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Xi Ruoyao via Gcc-patches From: Xi Ruoyao Reply-To: Xi Ruoyao Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" egrep/fgrep has been deprecated in favor of grep -E/-F for a long time, and the next grep release (3.8 or 4.0) will print a warning if egrep or fgrep is used. Stop using egrep and fgrep so we won't see the warning. fixincludes/ChangeLog: * fixinc.in: Use grep -E instead of egrep. * inclhack.def: Likewise. * fixincl.x: Regenerate. * genfixes: Use grep -F instead of fgrep. --- fixincludes/fixinc.in | 2 +- fixincludes/fixincl.x | 10 +++++----- fixincludes/genfixes | 2 +- fixincludes/inclhack.def | 6 +++--- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/fixincludes/fixinc.in b/fixincludes/fixinc.in index 0bd8027a554..b5395805cce 100755 --- a/fixincludes/fixinc.in +++ b/fixincludes/fixinc.in @@ -448,7 +448,7 @@ while [ $# != 0 ]; do chmod a+r $3 2>/dev/null if test $VERBOSE -gt 2 then echo Copied $2 ; fi - for include in `egrep '^[ ]*#[ ]*include[ ]*"[^/]' $3 | + for include in `grep -E '^[ ]*#[ ]*include[ ]*"[^/]' $3 | sed -e 's/^[ ]*#[ ]*include[ ]*"\([^"]*\)".*$/\1/'` do dir=`echo $2 | sed -e s'|/[^/]*$||'` diff --git a/fixincludes/fixincl.x b/fixincludes/fixincl.x index bad490453b7..babd83ebd08 100644 --- a/fixincludes/fixincl.x +++ b/fixincludes/fixincl.x @@ -2,11 +2,11 @@ * * DO NOT EDIT THIS FILE (fixincl.x) * - * It has been AutoGen-ed February 27, 2022 at 07:47:03 PM by AutoGen 5.18.16 + * It has been AutoGen-ed June 24, 2022 at 01:40:08 PM by AutoGen 5.18.16 * From the definitions inclhack.def * and the template file fixincl */ -/* DO NOT SVN-MERGE THIS FILE, EITHER Sun Feb 27 19:47:03 UTC 2022 +/* DO NOT SVN-MERGE THIS FILE, EITHER Fri Jun 24 13:40:08 CST 2022 * * You must regenerate it. Use the ./genfixes script. * @@ -6547,7 +6547,7 @@ static tTestDesc aMath_Huge_Val_From_Dbl_MaxTests[] = { * Fix Command Arguments for Math_Huge_Val_From_Dbl_Max */ static const char* apzMath_Huge_Val_From_Dbl_MaxPatch[] = { "sh", "-c", - "\tdbl_max_def=`egrep 'define[ \t]+DBL_MAX[ \t]+.*' float.h | sed 's/.*DBL_MAX[ \t]*//' 2>/dev/null`\n\n\ + "\tdbl_max_def=`grep -E 'define[ \t]+DBL_MAX[ \t]+.*' float.h | sed 's/.*DBL_MAX[ \t]*//' 2>/dev/null`\n\n\ \tif ( test -n \"${dbl_max_def}\" ) > /dev/null 2>&1\n\ \tthen sed -e '/define[ \t]*HUGE_VAL[ \t]*DBL_MAX/s@DBL_MAX@'\"$dbl_max_def@\"\n\ \telse cat\n\ @@ -10402,9 +10402,9 @@ tSCC zVxworks_Needs_VxworksSelect0[] = tSCC zVxworks_Needs_VxworksTest0[] = " -r types/vxTypesOld.h"; tSCC zVxworks_Needs_VxworksTest1[] = - " -n \"`egrep '#include' $file`\""; + " -n \"`grep -E '#include' $file`\""; tSCC zVxworks_Needs_VxworksTest2[] = - " -n \"`egrep ULONG $file`\""; + " -n \"`grep -E ULONG $file`\""; #define VXWORKS_NEEDS_VXWORKS_TEST_CT 4 static tTestDesc aVxworks_Needs_VxworksTests[] = { diff --git a/fixincludes/genfixes b/fixincludes/genfixes index 47aad01289d..d2cbb50c39b 100755 --- a/fixincludes/genfixes +++ b/fixincludes/genfixes @@ -58,7 +58,7 @@ done AG="autogen $AG" set -e -if [ -z "`${AG} -v | fgrep ' 5.'`" ] +if [ -z "`${AG} -v | grep -F ' 5.'`" ] then echo "AutoGen appears to be out of date or not correctly installed." echo "Please download and install from:" diff --git a/fixincludes/inclhack.def b/fixincludes/inclhack.def index 7605ac89aa2..7b0f7cae0b1 100644 --- a/fixincludes/inclhack.def +++ b/fixincludes/inclhack.def @@ -3274,7 +3274,7 @@ fix = { * If we do, we will replace the one in math.h with that one. */ - "\tdbl_max_def=`egrep 'define[ \t]+DBL_MAX[ \t]+.*' float.h " + "\tdbl_max_def=`grep -E 'define[ \t]+DBL_MAX[ \t]+.*' float.h " "| sed 's/.*DBL_MAX[ \t]*//' 2>/dev/null`\n\n" "\tif ( test -n \"${dbl_max_def}\" ) > /dev/null 2>&1\n" @@ -5266,8 +5266,8 @@ fix = { hackname = vxworks_needs_vxworks; files = sys/stat.h; test = " -r types/vxTypesOld.h"; - test = " -n \"`egrep '#include' $file`\""; - test = " -n \"`egrep ULONG $file`\""; + test = " -n \"`grep -E '#include' $file`\""; + test = " -n \"`grep -E ULONG $file`\""; select = "#[ \t]define[ \t]+__INCstath"; sed = "/#[ \t]define[ \t][ \t]*__INCstath/a\\\n"