summaryrefslogtreecommitdiff
path: root/gcc/gen-protos.c
diff options
context:
space:
mode:
authorbothner <bothner@138bc75d-0d04-0410-961f-82ee72b054a4>1996-06-07 18:59:34 +0000
committerbothner <bothner@138bc75d-0d04-0410-961f-82ee72b054a4>1996-06-07 18:59:34 +0000
commit29bc28940e09323e71a3c7df6c2dd368fe33f79b (patch)
tree6b5bdff2b82419ce7cd33e2cde249e5ca6d9dade /gcc/gen-protos.c
parent4d3881dfa401daca98880dd2326065e9e71793d5 (diff)
downloadgcc-29bc28940e09323e71a3c7df6c2dd368fe33f79b.tar.gz
* gen-protos.c (progname): New variable (needed by cppalloc.c).
(main): Set progname. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@12212 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/gen-protos.c')
-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 (;;)