Patchwork [testsuite] Minor tweak to get_ada_spec_filename

login
register
mail settings
Submitter Eric Botcazou
Date Dec. 15, 2012, 7:13 p.m.
Message ID <1464273.LzFIuxN6H4@polaris>
Download mbox | patch
Permalink /patch/206633/
State New
Headers show

Comments

Eric Botcazou - Dec. 15, 2012, 7:13 p.m.
This changes get_ada_spec_filename to use the procedural form of regsub 
instead of the functional form, which is apparently not supported on older 
versions of DejaGNU.

Tested on x86_64-suse-linux, applied on the mainline as obvious.


2012-12-15  Eric Botcazou  <ebotcazou@adacore.com>

	* lib/scanasm.exp (get_ada_spec_filename): Use procedural form.

Patch

Index: lib/scanasm.exp
===================================================================
--- lib/scanasm.exp	(revision 194517)
+++ lib/scanasm.exp	(working copy)
@@ -191,7 +191,7 @@  proc get_ada_spec_filename { testcase }
     set filename  [lindex $testcase 0]
     set tailname  [file tail $filename]
     set extension [string trimleft [file extension $tailname] {.}]
-    set rootname  [regsub -all {\-} [file rootname $tailname] {_}]
+    regsub -all {\-} [file rootname $tailname] {_} rootname
 
     return [string tolower "${rootname}_${extension}.ads"]
 }