Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix grep #2

Merged
merged 2 commits into from
Feb 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CONFIG/ARCHS/CreateTar.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh
# Creates the appropriate .tgz from all subdirs
for arch in `ls -F | fgrep "/" | sed -e 's/\///'`
for arch in `ls -F | grep -F "/" | sed -e 's/\///'`
do
tar cvf $arch.tar $arch/*
bzip2 --best $arch.tar
Expand Down
2 changes: 1 addition & 1 deletion CONFIG/src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ IRunC2C :
IRunFlib :
@ - rm config0.out
@ $(F77) $(F77FLAGS) -v -o xtst $(SRCdir)/backend/comptestF.f 2>&1 | \
fgrep -e '-L' > config0.out
grep -F -e '-L' > config0.out
@ rm -f xtst
@ - cat config0.out
IRunTestCFLink :
Expand Down
10 changes: 5 additions & 5 deletions CONFIG/src/atlconf_misc.c
Original file line number Diff line number Diff line change
Expand Up @@ -700,7 +700,7 @@ char *NameWithoutPath(char *file)

int GetIntVers(char *str, int *nskip)
{
char ln[64];
char ln[128];
int i, j;

*nskip = 0;
Expand Down Expand Up @@ -870,10 +870,10 @@ int CompIsMinGW(char *comp)
{
char *cmnd, *res;
int i;
i = strlen(comp) + 24;
i = strlen(comp) + 26;
cmnd = malloc(sizeof(char)*i);
assert(cmnd);
sprintf(cmnd, "%s -v 2>&1 | fgrep mingw", comp);
sprintf(cmnd, "%s -v 2>&1 | grep -F mingw", comp);
res = atlsys_1L(NULL, cmnd, 0, 0);
free(cmnd);
if (res)
Expand All @@ -899,10 +899,10 @@ int CompIsAppleGcc(char *comp)
if (CompIsGcc(comp))
{
int i;
i = strlen(comp) + 24;
i = strlen(comp) + 26;
cmnd = malloc(sizeof(char)*i);
assert(cmnd);
sprintf(cmnd, "%s -v 2>&1 | fgrep Apple", comp);
sprintf(cmnd, "%s -v 2>&1 | grep -F Apple", comp);
res = atlsys_1L(NULL, cmnd, 0, 0);
free(cmnd);
if (res)
Expand Down
18 changes: 9 additions & 9 deletions CONFIG/src/backend/archinfo_aix.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ uint getArmInfo(uint *IMPL, uint *ARCH, uint *VAR, uint *REV)
uint part;
char *res;
*IMPL = *ARCH = *VAR = *REV = part = -1;
res = atlsys_1L(NULL, "fgrep 'CPU part' /proc/cpuinfo", 0, 0);
res = atlsys_1L(NULL, "grep -F 'CPU part' /proc/cpuinfo", 0, 0);
if (res)
{
char *sp;
Expand All @@ -74,7 +74,7 @@ uint getArmInfo(uint *IMPL, uint *ARCH, uint *VAR, uint *REV)
part = i;
free(res);
}
res = atlsys_1L(NULL, "fgrep 'CPU variant' /proc/cpuinfo", 0, 0);
res = atlsys_1L(NULL, "grep -F 'CPU variant' /proc/cpuinfo", 0, 0);
if (res)
{
char *sp;
Expand All @@ -85,7 +85,7 @@ uint getArmInfo(uint *IMPL, uint *ARCH, uint *VAR, uint *REV)
*VAR = i;
free(res);
}
res = atlsys_1L(NULL, "fgrep 'CPU implement' /proc/cpuinfo", 0, 0);
res = atlsys_1L(NULL, "grep -F 'CPU implement' /proc/cpuinfo", 0, 0);
if (res)
{
char *sp;
Expand All @@ -97,7 +97,7 @@ uint getArmInfo(uint *IMPL, uint *ARCH, uint *VAR, uint *REV)
free(res);
}

res = atlsys_1L(NULL, "fgrep 'CPU architect' /proc/cpuinfo", 0, 0);
res = atlsys_1L(NULL, "grep -F 'CPU architect' /proc/cpuinfo", 0, 0);
if (res)
{
char *sp;
Expand All @@ -108,7 +108,7 @@ uint getArmInfo(uint *IMPL, uint *ARCH, uint *VAR, uint *REV)
*ARCH = i;
free(res);
}
res = atlsys_1L(NULL, "fgrep 'CPU revision' /proc/cpuinfo", 0, 0);
res = atlsys_1L(NULL, "grep -F 'CPU revision' /proc/cpuinfo", 0, 0);
if (res)
{
char *sp;
Expand All @@ -132,7 +132,7 @@ enum MACHTYPE ProbeArch()
switch(fam)
{
case AFPPC: /* don't know */
res = atlsys_1L(NULL, "/usr/sbin/prtconf | fgrep 'Processor Type'", 0, 0);
res = atlsys_1L(NULL, "/usr/sbin/prtconf | grep -F 'Processor Type'", 0, 0);
if (res)
{
if (strstr(res, "PowerPC_POWER5"))
Expand All @@ -158,7 +158,7 @@ int ProbeNCPU()
int ncpu = 0;
char *res;

res = atlsys_1L(NULL, "/usr/sbin/prtconf | fgrep 'Number Of Processors'",
res = atlsys_1L(NULL, "/usr/sbin/prtconf | grep -F 'Number Of Processors'",
0, 0);
if (res)
{
Expand Down Expand Up @@ -187,7 +187,7 @@ int ProbePointerBits(int *sure)
return(64);
}

res = atlsys_1L(NULL, "/usr/sbin/prtconf | fgrep 'Kernel Type'", 0, 0);
res = atlsys_1L(NULL, "/usr/sbin/prtconf | grep -F 'Kernel Type'", 0, 0);
if (res)
{
if (GetLastInt(res) == 64)
Expand Down Expand Up @@ -230,7 +230,7 @@ int ProbeMhz()
{
int mhz=0;
char *res;
res = atlsys_1L(NULL, "/usr/sbin/prtconf | fgrep 'Processor Clock Speed'",
res = atlsys_1L(NULL, "/usr/sbin/prtconf | grep -F 'Processor Clock Speed'",
0, 0);
if (res)
{
Expand Down
10 changes: 5 additions & 5 deletions CONFIG/src/backend/archinfo_freebsd.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ uint getArmInfo(uint *IMPL, uint *ARCH, uint *VAR, uint *REV)
uint part;
char *res;
*IMPL = *ARCH = *VAR = *REV = part = -1;
res = atlsys_1L(NULL, "fgrep 'CPU part' /proc/cpuinfo", 0, 0);
res = atlsys_1L(NULL, "grep -F 'CPU part' /proc/cpuinfo", 0, 0);
if (res)
{
char *sp;
Expand All @@ -74,7 +74,7 @@ uint getArmInfo(uint *IMPL, uint *ARCH, uint *VAR, uint *REV)
part = i;
free(res);
}
res = atlsys_1L(NULL, "fgrep 'CPU variant' /proc/cpuinfo", 0, 0);
res = atlsys_1L(NULL, "grep -F 'CPU variant' /proc/cpuinfo", 0, 0);
if (res)
{
char *sp;
Expand All @@ -85,7 +85,7 @@ uint getArmInfo(uint *IMPL, uint *ARCH, uint *VAR, uint *REV)
*VAR = i;
free(res);
}
res = atlsys_1L(NULL, "fgrep 'CPU implement' /proc/cpuinfo", 0, 0);
res = atlsys_1L(NULL, "grep -F 'CPU implement' /proc/cpuinfo", 0, 0);
if (res)
{
char *sp;
Expand All @@ -97,7 +97,7 @@ uint getArmInfo(uint *IMPL, uint *ARCH, uint *VAR, uint *REV)
free(res);
}

res = atlsys_1L(NULL, "fgrep 'CPU architect' /proc/cpuinfo", 0, 0);
res = atlsys_1L(NULL, "grep -F 'CPU architect' /proc/cpuinfo", 0, 0);
if (res)
{
char *sp;
Expand All @@ -108,7 +108,7 @@ uint getArmInfo(uint *IMPL, uint *ARCH, uint *VAR, uint *REV)
*ARCH = i;
free(res);
}
res = atlsys_1L(NULL, "fgrep 'CPU revision' /proc/cpuinfo", 0, 0);
res = atlsys_1L(NULL, "grep -F 'CPU revision' /proc/cpuinfo", 0, 0);
if (res)
{
char *sp;
Expand Down
22 changes: 11 additions & 11 deletions CONFIG/src/backend/archinfo_irix.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ uint getArmInfo(uint *IMPL, uint *ARCH, uint *VAR, uint *REV)
uint part;
char *res;
*IMPL = *ARCH = *VAR = *REV = part = -1;
res = atlsys_1L(NULL, "fgrep 'CPU part' /proc/cpuinfo", 0, 0);
res = atlsys_1L(NULL, "grep -F 'CPU part' /proc/cpuinfo", 0, 0);
if (res)
{
char *sp;
Expand All @@ -74,7 +74,7 @@ uint getArmInfo(uint *IMPL, uint *ARCH, uint *VAR, uint *REV)
part = i;
free(res);
}
res = atlsys_1L(NULL, "fgrep 'CPU variant' /proc/cpuinfo", 0, 0);
res = atlsys_1L(NULL, "grep -F 'CPU variant' /proc/cpuinfo", 0, 0);
if (res)
{
char *sp;
Expand All @@ -85,7 +85,7 @@ uint getArmInfo(uint *IMPL, uint *ARCH, uint *VAR, uint *REV)
*VAR = i;
free(res);
}
res = atlsys_1L(NULL, "fgrep 'CPU implement' /proc/cpuinfo", 0, 0);
res = atlsys_1L(NULL, "grep -F 'CPU implement' /proc/cpuinfo", 0, 0);
if (res)
{
char *sp;
Expand All @@ -97,7 +97,7 @@ uint getArmInfo(uint *IMPL, uint *ARCH, uint *VAR, uint *REV)
free(res);
}

res = atlsys_1L(NULL, "fgrep 'CPU architect' /proc/cpuinfo", 0, 0);
res = atlsys_1L(NULL, "grep -F 'CPU architect' /proc/cpuinfo", 0, 0);
if (res)
{
char *sp;
Expand All @@ -108,7 +108,7 @@ uint getArmInfo(uint *IMPL, uint *ARCH, uint *VAR, uint *REV)
*ARCH = i;
free(res);
}
res = atlsys_1L(NULL, "fgrep 'CPU revision' /proc/cpuinfo", 0, 0);
res = atlsys_1L(NULL, "grep -F 'CPU revision' /proc/cpuinfo", 0, 0);
if (res)
{
char *sp;
Expand All @@ -132,7 +132,7 @@ enum MACHTYPE ProbeArch()
switch(fam)
{
case AFIA64:
res = atlsys_1L(NULL, "hinv -c processor | fgrep 'Itanium'", 0, 0);
res = atlsys_1L(NULL, "hinv -c processor | grep -F 'Itanium'", 0, 0);
if (res)
{
if (res[0] != '\0')
Expand All @@ -144,7 +144,7 @@ enum MACHTYPE ProbeArch()
}
break;
case AFMIPS:
res = atlsys_1L(NULL, "hinv -c processor | fgrep 'CPU'", 0, 0);
res = atlsys_1L(NULL, "hinv -c processor | grep -F 'CPU'", 0, 0);
if (!ierr && res[0] != '\0')
{
if (res[0] != '\0')
Expand All @@ -165,7 +165,7 @@ int ProbeNCPU()
char *res;

res = atlsys_1L(NULL,
"hinv -c processor | fgrep Processor | fgrep -v 'CPU:'",
"hinv -c processor | grep -F Processor | grep -F -v 'CPU:'",
0, 0);
if (res)
{
Expand Down Expand Up @@ -226,7 +226,7 @@ int ProbeMhz()
{
int mhz=0;
char *res;
res = atlsys_1L(NULL, "hinv -c processor | fgrep MHz", 0, 0);
res = atlsys_1L(NULL, "hinv -c processor | grep -F MHz", 0, 0);
if (res)
{ /* Itanium's use MHz */
mhz = GetIntBeforeWord("MHz", res);
Expand All @@ -235,7 +235,7 @@ int ProbeMhz()
}
if (!mhz)
{
res = atlsys_1L(NULL, "hinv -c processor | fgrep MHZ", 0, 0);
res = atlsys_1L(NULL, "hinv -c processor | grep -F MHZ", 0, 0);
if (res)
{ /* MIPS uses MHZ */
mhz = GetIntBeforeWord("MHZ", res);
Expand All @@ -245,7 +245,7 @@ int ProbeMhz()
}
if (!mhz)
{
res = atlsys_1L(NULL, "hinv -c processor | fgrep GHz", 0, 0);
res = atlsys_1L(NULL, "hinv -c processor | grep -F GHz", 0, 0);
if (res)
{ /* Don't think MIPS will ever get here, nobody pres uses GHz */
mhz = GetIntBeforeWord("GHz", res);
Expand Down
Loading
Loading