[testsuite, ada, build] Allow for further differences in type output in run_acats

Paolo Bonzini bonzini@gnu.org
Wed Dec 1 14:47:00 GMT 2010


On 12/01/2010 03:44 PM, Rainer Orth wrote:
> diff -r 48851c3efb44 gcc/testsuite/ada/acats/run_acats
> --- a/gcc/testsuite/ada/acats/run_acats	Fri Nov 26 17:38:20 2010 +0000
> +++ b/gcc/testsuite/ada/acats/run_acats	Wed Dec 01 15:34:05 2010 +0100
> @@ -14,9 +14,9 @@
>   # 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 | awk '{print $NF}'; return 0; }
> +    path=`type $* 2>/dev/null`&&  { echo $path | awk '{print $NF}'; return 0; }
> +    path=`whence $* 2>/dev/null`&&  { echo $path; return 0; }
>       return 1
>   }
>

Not entirely my field, but okay if no one complains in 48 hours.

Paolo



More information about the Gcc-patches mailing list