[2/8] fixincludes: use grep -E/-F instead of egrep/fgrep
Commit Message
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(-)
@@ -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'|/[^/]*$||'`
@@ -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[] = {
@@ -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:"
@@ -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"