This is the mail archive of the glibc-linux@ricardo.ecn.wfu.edu 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]

2.2.5 compile problem. fix included


When compiling glibc-2.2.5 the C preprocessor is not found when
calling glibc-2.2.5/scripts/cpp.  This is because the return code of a
shell pipe is the return code of its last command, so that the shell
script does not notice when `type cpp` fails.

The following patch fixes the problem:

diff -ru glibc-2.2.5/scripts/cpp glibc/scripts/cpp
--- glibc-2.2.5/scripts/cpp	Fri Nov  2 02:07:18 2001
+++ glibc/scripts/cpp	Fri Mar  1 06:51:44 2002
@@ -1,8 +1,10 @@
 #! /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
+  cpp=`type cpp 2>/dev/null`
+  if test $? -eq 0; then
+    cpp=`echo $cpp | awk '{ print $NF }'`
+  else
     cpp=`gcc -print-file-name=cpp 2>/dev/null`
     if test $? -ne 0; then
       if test -x /lib/cpp; then


urs


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