From f6f317c96c42f23f161ef1b178c25e5f7de6dd05 Mon Sep 17 00:00:00 2001
From: Chris Roberts <cpr420@gmail.com>
Date: Mon, 14 Oct 2013 19:20:45 -0600
Subject: Minor gcc2 fixes


diff --git a/src/mkid.c b/src/mkid.c
index 0c882f2..a9a95a4 100644
--- a/src/mkid.c
+++ b/src/mkid.c
@@ -212,6 +212,7 @@ main (int argc, char **argv)
   bool ok;
   int nfiles;
   char *files_from = NULL;
+  struct argv_iterator *ai;
 
   set_program_name (argv[0]);
   heap_initial = get_process_heap();
@@ -298,7 +299,6 @@ main (int argc, char **argv)
 
   nfiles = argc - optind;
 
-  struct argv_iterator *ai;
   if (files_from)
     {
       /* When using --files0-from=F, you may not specify any files
@@ -320,9 +320,10 @@ main (int argc, char **argv)
   else
     {
       static char *cwd_only[2];
+      char **files;
       cwd_only[0] = bad_cast (".");
       cwd_only[1] = NULL;
-      char **files = (optind < argc ? argv + optind : cwd_only);
+      files = (optind < argc ? argv + optind : cwd_only);
       ai = argv_iter_init_argv (files);
     }
 
@@ -686,6 +687,7 @@ write_id_file (struct idhead *idhp)
   int tok_size;
   int max_buf_size = 0;
   int max_vec_size = 0;
+  off_t off;
 
   if (verbose_flag)
     printf (_("Sorting tokens...\n"));
@@ -709,7 +711,7 @@ write_id_file (struct idhead *idhp)
   /* write out the list of pathnames */
 
   fseek (idhp->idh_FILE, sizeof_idhead (), 0);
-  off_t off = ftello (idhp->idh_FILE);
+  off = ftello (idhp->idh_FILE);
   if (UINT32_MAX < off)
     error (EXIT_FAILURE, 0, _("internal limitation: offset of 2^32 or larger"));
   idhp->idh_flinks_offset = off;
diff --git a/src/xtokid.c b/src/xtokid.c
index a8d8d5a..b3f9ea9 100644
--- a/src/xtokid.c
+++ b/src/xtokid.c
@@ -113,6 +113,7 @@ main (int argc, char **argv)
   bool ok;
   int nfiles;
   char *files_from = NULL;
+  struct argv_iterator *ai;
 
   set_program_name (argv[0]);
 
@@ -184,7 +185,6 @@ main (int argc, char **argv)
 
   nfiles = argc - optind;
 
-  struct argv_iterator *ai;
   if (files_from)
     {
       /* When using --files0-from=F, you may not specify any files
@@ -206,9 +206,10 @@ main (int argc, char **argv)
   else
      {
       static char *cwd_only[2];
+      char **files;
       cwd_only[0] = bad_cast (".");
       cwd_only[1] = NULL;
-      char **files = (optind < argc ? argv + optind : cwd_only);
+      files = (optind < argc ? argv + optind : cwd_only);
       ai = argv_iter_init_argv (files);
     }
 
-- 
1.8.3.4

