OSDN Git Service

Minor reformatting.
[pf3gnuchains/gcc-fork.git] / gcc / fix-header.c
index 5e2e7bb..4e4c8dc 100644 (file)
@@ -79,15 +79,22 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 #include "scan.h"
 #include "cpplib.h"
 #include "c-incpath.h"
-
-static void v_fatal (const char *, va_list)
-     ATTRIBUTE_PRINTF (1,0) ATTRIBUTE_NORETURN;
-static void fatal (const char *, ...) ATTRIBUTE_PRINTF_1 ATTRIBUTE_NORETURN;
+#include "errors.h"
 
 #ifdef TARGET_EXTRA_INCLUDES
-static void hook_void_int(int u ATTRIBUTE_UNUSED) { }
+void TARGET_EXTRA_INCLUDES (const char *sysroot ATTRIBUTE_UNUSED,
+                           const char *iprefix ATTRIBUTE_UNUSED,
+                           int stdinc ATTRIBUTE_UNUSED)
+{
+}
+#endif
 
-struct target_c_incpath_s target_c_incpath = { hook_void_int };
+#ifdef TARGET_EXTRA_PRE_INCLUDES 
+void TARGET_EXTRA_PRE_INCLUDES (const char *sysroot ATTRIBUTE_UNUSED,
+                           const char *iprefix ATTRIBUTE_UNUSED,
+                           int stdinc ATTRIBUTE_UNUSED)
+{
+}
 #endif
 
 struct line_maps line_table;
@@ -400,14 +407,12 @@ lookup_std_proto (const char *name, int name_length)
          && strncmp (fn->fname, name, name_length) == 0)
        return fn;
       i = (i+1) % HASH_SIZE;
-      if (i == i0)
-       abort ();
+      gcc_assert (i != i0);
     }
 }
 
 char *inc_filename;
 int inc_filename_length;
-const char *progname = "fix-header";
 FILE *outf;
 sstring line;
 
@@ -1076,6 +1081,7 @@ main (int argc, char **argv)
   long int inf_size;
   struct symbol_list *cur_symbols;
 
+  progname = "fix-header";
   if (argv[0] && argv[0][0])
     {
       char *p;
@@ -1301,24 +1307,3 @@ main (int argc, char **argv)
 
   return 0;
 }
-\f
-
-static void
-v_fatal (const char *str, va_list ap)
-{
-  fprintf (stderr, "%s: %s: ", progname, inc_filename);
-  vfprintf (stderr, str, ap);
-  fprintf (stderr, "\n");
-
-  exit (FATAL_EXIT_CODE);
-}
-
-static void
-fatal (const char *str, ...)
-{
-  va_list ap;
-
-  va_start (ap, str);
-  v_fatal (str, ap);
-  va_end (ap);
-}