diff options
author | Geoff Keating <geoffk@cygnus.com> | 2001-12-06 01:21:03 +0000 |
---|---|---|
committer | Geoff Keating <geoffk@cygnus.com> | 2001-12-06 01:21:03 +0000 |
commit | 71ede9a8f8d6c891d706e52dc8b85c7a1623601a (patch) | |
tree | 973b38881cfe26360ce8bfa1165516ffdb388e43 /scripts/cpp | |
parent | 578618390583aa9c1e3dc70b87c1f7d19478e996 (diff) | |
download | glibc-71ede9a8f8d6c891d706e52dc8b85c7a1623601a.tar glibc-71ede9a8f8d6c891d706e52dc8b85c7a1623601a.tar.gz glibc-71ede9a8f8d6c891d706e52dc8b85c7a1623601a.tar.bz2 glibc-71ede9a8f8d6c891d706e52dc8b85c7a1623601a.zip |
* scripts/cpp: Test the exit status from 'type', not 'awk'.
* scripts/cpp: Test the exit status from 'type', not 'awk'.
Diffstat (limited to 'scripts/cpp')
-rwxr-xr-x | scripts/cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/scripts/cpp b/scripts/cpp index 4a62f1e5ae..24112c663c 100755 --- a/scripts/cpp +++ b/scripts/cpp @@ -1,8 +1,9 @@ #! /bin/sh cpp=`which cpp 2>/dev/null` if test $? -ne 0; then - cpp=`type cpp 2>/dev/null | awk '{ print $NF }'` - if test $? -ne 0; then + if type cpp 2>/dev/null >/dev/null; then + cpp=`type cpp 2>/dev/null | awk '{ print $NF }'` + else cpp=`gcc -print-file-name=cpp 2>/dev/null` if test $? -ne 0; then if test -x /lib/cpp; then |