This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
fix for scripts/cpp
- From: Geoff Keating <geoffk at geoffk dot org>
- To: libc-alpha at sources dot redhat dot com
- Date: Wed, 5 Dec 2001 16:05:28 -0800
- Subject: fix for scripts/cpp
- Reply-to: Geoff Keating <geoffk at redhat dot com>
This little patch corrects a problem that shows up when building with
gcc 2.95.2.
OK to commit?
--
- Geoffrey Keating <geoffk@geoffk.org> <geoffk@redhat.com>
===File ~/patches/cygnus/glibc-cppscript.patch==============
2001-11-26 Geoff Keating <geoffk@redhat.com>
* scripts/cpp: Test the exit status from 'type', not 'awk'.
Index: scripts/cpp
===================================================================
RCS file: /cvs/glibc/libc/scripts/cpp,v
retrieving revision 1.1
diff -p -u -u -p -r1.1 cpp
--- cpp 2001/11/02 02:07:18 1.1
+++ cpp 2001/12/06 00:02:24
@@ -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
============================================================