]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
* scripts/cpp: Test the exit status from 'type', not 'awk'.
authorGeoff Keating <geoffk@cygnus.com>
Thu, 6 Dec 2001 01:21:03 +0000 (01:21 +0000)
committerGeoff Keating <geoffk@cygnus.com>
Thu, 6 Dec 2001 01:21:03 +0000 (01:21 +0000)
* scripts/cpp: Test the exit status from 'type', not 'awk'.

ChangeLog
scripts/cpp

index 8ca95e79c170142b93cb02fdd6f719d9b08c7637..37cd60950b430e1c9b3b0c5a74b485958a0bef0b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
 2001-12-05  Geoff Keating  <geoffk@redhat.com>
 
+       * scripts/cpp: Test the exit status from 'type', not 'awk'.
+
        * sysdeps/powerpc/__longjmp.S: Don't restore FP registers.
        * sysdeps/powerpc/fpu/__longjmp.S: Do restore FP registers.
        * sysdeps/powerpc/setjmp.S: Don't save FP registers.
index 4a62f1e5ae1a5aaa6be5ed0f261949023aebb574..24112c663c01d909486d837b5c605be4ddf7d6bf 100755 (executable)
@@ -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