]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR ada/49511 (acats test setup fails on HP-UX using posix shell)
authorRainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
Thu, 30 Jun 2011 10:06:44 +0000 (10:06 +0000)
committerRainer Orth <ro@gcc.gnu.org>
Thu, 30 Jun 2011 10:06:44 +0000 (10:06 +0000)
PR ada/49511
* ada/acats/run_acats (which): Use last field of type -p output.

From-SVN: r175692

gcc/testsuite/ChangeLog
gcc/testsuite/ada/acats/run_acats

index c1279d3ca463f607ecdf678dbdd79166008976fc..31c6639fe58063cacff50d5f5dc068ed206e606d 100644 (file)
@@ -1,3 +1,8 @@
+2011-06-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
+
+       PR ada/49511
+       * ada/acats/run_acats (which): Use last field of type -p output.
+
 2011-06-30  Richard Guenther  <rguenther@suse.de>
 
        PR tree-optimization/38752
index bb68e62bf8a6338efc2e0b805f6112af11c38391..5d68e6c223ac9867ceb496925b292336e9a562a3 100755 (executable)
@@ -10,11 +10,11 @@ fi
 # type -p is missing from Solaris 2 /bin/sh and /bin/ksh (ksh88), but both
 # ksh93 and bash have it.
 # type output format differs between ksh88 and ksh93, so avoid it if
-# type -p is present.
+# type -p is present.  Unfortunately, HP-UX /bin/sh ignores -p with type.
 # Fall back to whence which ksh88 and ksh93 provide, but bash does not.
 
 which () {
-    path=`type -p $* 2>/dev/null` && { echo $path; return 0; }
+    path=`type -p $* 2>/dev/null | awk '{print $NF}'` && { echo $path; return 0; }
     path=`type $* 2>/dev/null | awk '{print $NF}'` && { echo $path; return 0; }
     path=`whence $* 2>/dev/null` && { echo $path; return 0; }
     return 1