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]

[Urs Thuermann <urs@isnogud.escape.de>] 2.2.5 compile problem. fixincluded



I've found this patch on another list.  Uli, what do you think?

Andreas

--- Begin Message ---
Topics:
   2.2.5 compile problem.  fix included

--- End Message ---
--- Begin Message ---
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


--- End Message ---

-- 
 Andreas Jaeger
  SuSE Labs aj@suse.de
   private aj@arthur.inka.de
    http://www.suse.de/~aj

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