[gccsdk] Executable name for UnixEnv$<name>$sfix

Martin Wuerthner martin at mw-software.com
Thu Jan 11 01:59:38 PST 2007


I just noticed a minor problem with UnixEnv$<name>$sfix handling: The 
name of the executable is deduced incorrectly if the executable is run 
via a path, e.g.:
  run MyLibrary:myprog

In this case, UnixEnv$myprog$sfix does not have any effect. It works 
if the same executable is run via
  run <MyLibrary$Dir>.myprog

The problem is that the executable leaf name deduction in UnixLib does 
not take colons into account. In __riscosify_scl() in riscosify.c it 
should read:

Index: riscosify.c
===================================================================
--- riscosify.c (revision 2495)
+++ riscosify.c (working copy)
@@ -1537,7 +1537,7 @@
       start = cmd;
       while (*cmd && *cmd != ' ')
         {
-          if (*cmd == '.')
+          if (*cmd == '.' || *cmd == ':')
             start = cmd + 1;
           cmd++;
         }

(that diff is for the version in branch/release_3_4_6 by the way)

Martin
-- 
---------------------------------------------------------------------
Martin Wuerthner          MW Software          martin at mw-software.com
---------------------------------------------------------------------




More information about the gcc mailing list