This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[patch] Use tcl8.3 friendly regsub command in gas-defs.exp
- From: "John David Anglin" <dave at hiauly1 dot hia dot nrc dot ca>
- To: binutils at sourceware dot org
- Cc: amodra at bigpond dot net dot au
- Date: Fri, 28 Dec 2007 19:49:58 -0500 (EST)
- Subject: [patch] Use tcl8.3 friendly regsub command in gas-defs.exp
The enclosed patch fixes PR binutils/5322. Tested on hppa-unknown-linux-gnu
with trunk.
Ok?
Dave
--
J. David Anglin dave.anglin@nrc-cnrc.gc.ca
National Research Council of Canada (613) 990-0752 (FAX: 952-6602)
2007-12-28 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
* lib/gas-defs.exp (gas_host_run): Add fourth argument to regsub
command.
Index: lib/gas-defs.exp
===================================================================
RCS file: /cvs/src/src/gas/testsuite/lib/gas-defs.exp,v
retrieving revision 1.28
diff -u -3 -p -r1.28 gas-defs.exp
--- lib/gas-defs.exp 28 Aug 2007 13:21:57 -0000 1.28
+++ lib/gas-defs.exp 29 Dec 2007 00:38:52 -0000
@@ -63,7 +63,7 @@ proc gas_host_run { cmd redir } {
set command "$cmd 2>gas.stderr"
set return_contents_of "gas.stderr"
} elseif [regexp ">&.*" $redir] then {
- set output_file [regsub ">&" $redir ""]
+ regsub ">&" $redir "" output_file
set command "$cmd 2>&1"
} elseif [regexp "2>.*" $redir] then {
set output_file "gas.out"