OSDN Git Service

* gen-protos.c (progname): New variable (needed by cppalloc.c).
[pf3gnuchains/gcc-fork.git] / gcc / gen-protos.c
index 44c900a..ede40e3 100644 (file)
@@ -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 (;;)