diff options
author | Jim Wilson <wilson@gcc.gnu.org> | 1993-03-02 13:19:37 -0800 |
---|---|---|
committer | Jim Wilson <wilson@gcc.gnu.org> | 1993-03-02 13:19:37 -0800 |
commit | afcd8a020f2737574abea7d3971656621bde559c (patch) | |
tree | 1bd8e10dd8aea123b6819f3c84d257179b1fd629 /gcc/gcc.c | |
parent | 6d34466a6ad3c6ef932e6ea6bddbb7057003810a (diff) | |
download | gcc-afcd8a020f2737574abea7d3971656621bde559c.zip gcc-afcd8a020f2737574abea7d3971656621bde559c.tar.gz gcc-afcd8a020f2737574abea7d3971656621bde559c.tar.bz2 |
(main): Truncate programname to what is after last slash.
From-SVN: r3612
Diffstat (limited to 'gcc/gcc.c')
-rw-r--r-- | gcc/gcc.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -3373,8 +3373,11 @@ main (argc, argv) int linker_was_run = 0; char *explicit_link_files; char *specs_file; + char *p; - programname = argv[0]; + p = argv[0] + strlen (argv[0]); + while (p != argv[0] && p[-1] != '/') --p; + programname = p; if (signal (SIGINT, SIG_IGN) != SIG_IGN) signal (SIGINT, fatal_error); |