From: Geoff Keating Date: Thu, 6 Dec 2001 01:21:03 +0000 (+0000) Subject: * scripts/cpp: Test the exit status from 'type', not 'awk'. X-Git-Tag: cvs/glibc-2-3~1325 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=71ede9a8f8d6c891d706e52dc8b85c7a1623601a;p=thirdparty%2Fglibc.git * scripts/cpp: Test the exit status from 'type', not 'awk'. * scripts/cpp: Test the exit status from 'type', not 'awk'. --- diff --git a/ChangeLog b/ChangeLog index 8ca95e79c17..37cd60950b4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2001-12-05 Geoff Keating + * 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. diff --git a/scripts/cpp b/scripts/cpp index 4a62f1e5ae1..24112c663c0 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