Commit 3ff4c5d9 by Rainer Orth Committed by Rainer Orth

run_acats (which): Assign output to temporary variable, only use if successful.

	* ada/acats/run_acats (which): Assign output to temporary
	variable, only use if successful.
	Use last field of type output.

From-SVN: r167499
parent 258e15e0
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> 2010-12-06 Richard Guenther <rguenther@suse.de>
PR tree-optimization/46806 PR tree-optimization/46806
......
...@@ -14,9 +14,9 @@ fi ...@@ -14,9 +14,9 @@ fi
# Fall back to whence which ksh88 and ksh93 provide, but bash does not. # Fall back to whence which ksh88 and ksh93 provide, but bash does not.
which () { which () {
type -p $* 2>/dev/null && return 0 path=`type -p $* 2>/dev/null` && { echo $path; return 0; }
type $* 2>/dev/null | awk '{print $3}' && return 0 path=`type $* 2>/dev/null | awk '{print $NF}'` && { echo $path; return 0; }
whence $* 2>/dev/null && return 0 path=`whence $* 2>/dev/null` && { echo $path; return 0; }
return 1 return 1
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment