This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

fix for scripts/cpp



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
============================================================


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]