aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/gen-protos.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/gen-protos.c b/gcc/gen-protos.c
index 44c900ae0a6..ede40e3d6c9 100644
--- a/gcc/gen-protos.c
+++ b/gcc/gen-protos.c
@@ -40,6 +40,7 @@ hashf (name, len, hashsize)
int hash_tab[HASH_SIZE];
int verbose = 0;
+char *progname;
sstring linebuf;
@@ -63,6 +64,10 @@ main (argc, argv)
int next_index = 0;
int i, i0;
+ i = strlen (argv[0]);
+ while (i > 0 && argv[i-1] != '/') --i;
+ progname = &argv[i];
+
fprintf (outf, "struct fn_decl std_protos[] = {\n");
for (;;)