aboutsummaryrefslogtreecommitdiff
path: root/gcc/gen-protos.c
diff options
context:
space:
mode:
authorPer Bothner <bothner@cygnus.com>1996-06-07 18:59:34 +0000
committerPer Bothner <bothner@cygnus.com>1996-06-07 18:59:34 +0000
commitf06dc965b509664939de9c864f3f4e8abfcbe094 (patch)
tree6b5bdff2b82419ce7cd33e2cde249e5ca6d9dade /gcc/gen-protos.c
parent25171339c140928096be317c98e7283fcdb699d2 (diff)
* gen-protos.c (progname): New variable (needed by cppalloc.c).
(main): Set progname. git-svn-id: https://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 (;;)