aboutsummaryrefslogtreecommitdiff
path: root/gcc/gcc.c
diff options
context:
space:
mode:
authorJim Wilson <wilson@gcc.gnu.org>1993-03-02 13:19:37 -0800
committerJim Wilson <wilson@gcc.gnu.org>1993-03-02 13:19:37 -0800
commitafcd8a020f2737574abea7d3971656621bde559c (patch)
tree1bd8e10dd8aea123b6819f3c84d257179b1fd629 /gcc/gcc.c
parent6d34466a6ad3c6ef932e6ea6bddbb7057003810a (diff)
downloadgcc-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.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/gcc.c b/gcc/gcc.c
index 5886e48..6189521 100644
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -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);