diff options
author | ro <ro@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-12-06 16:09:19 +0000 |
---|---|---|
committer | ro <ro@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-12-06 16:09:19 +0000 |
commit | 1c7571edc89aa187ef7bd1299a4512b908dcd131 (patch) | |
tree | 11f367ba04380cfe5f753df862fb65ed4824e41d | |
parent | 255e00822f97ec022c001b48d60c211bde06c3b9 (diff) | |
download | gcc-1c7571edc89aa187ef7bd1299a4512b908dcd131.tar.gz |
* ada/acats/run_acats (which): Assign output to temporary
variable, only use if successful.
Use last field of type output.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@167499 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/testsuite/ChangeLog | 6 | ||||
-rwxr-xr-x | gcc/testsuite/ada/acats/run_acats | 6 |
2 files changed, 9 insertions, 3 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 5c3b6971e34..5244634ca93 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2010-12-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> + + * ada/acats/run_acats (which): Assign output to temporary + variable, only use if successful. + Use last field of type output. + 2010-12-06 Richard Guenther <rguenther@suse.de> PR tree-optimization/46806 diff --git a/gcc/testsuite/ada/acats/run_acats b/gcc/testsuite/ada/acats/run_acats index cf6b4283783..bb68e62bf8a 100755 --- a/gcc/testsuite/ada/acats/run_acats +++ b/gcc/testsuite/ada/acats/run_acats @@ -14,9 +14,9 @@ fi # Fall back to whence which ksh88 and ksh93 provide, but bash does not. which () { - type -p $* 2>/dev/null && return 0 - type $* 2>/dev/null | awk '{print $3}' && return 0 - whence $* 2>/dev/null && return 0 + path=`type -p $* 2>/dev/null` && { 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 } |