OSDN Git Service

* Makefile.in ($(PACKAGE).pot): New rule. Depend on
[pf3gnuchains/gcc-fork.git] / libcpp / pch.c
index a9d139a..2921321 100644 (file)
@@ -345,8 +345,6 @@ cpp_write_pch_deps (cpp_reader *r, FILE *f)
 int
 cpp_write_pch_state (cpp_reader *r, FILE *f)
 {
-  struct macrodef_struct z;
-
   if (!r->deps)
     r->deps = deps_init ();
 
@@ -438,13 +436,22 @@ cpp_valid_state (cpp_reader *r, const char *name, int fd)
       if (m.name_length == 0)
        break;
 
+      /* If this file is already preprocessed, there won't be any
+        macros defined, and that's OK.  */
+      if (CPP_OPTION (r, preprocessed))
+       {
+         if (lseek (fd, m.definition_length, SEEK_CUR) == -1)
+           goto error;
+         continue;
+       }
+
       if (m.definition_length > namebufsz)
        {
          free (namebuf);
          namebufsz = m.definition_length + 256;
          namebuf = xmalloc (namebufsz);
        }
-      
+
       if ((size_t)read (fd, namebuf, m.definition_length) 
          != m.definition_length)
        goto error;
@@ -621,9 +628,7 @@ int
 cpp_read_state (cpp_reader *r, const char *name, FILE *f,
                struct save_macro_data *data)
 {
-  struct macrodef_struct m;
-  struct save_macro_item *d;
-  size_t i, mac_count;
+  size_t i;
   struct lexer_state old_state;
 
   /* Restore spec_nodes, which will be full of references to the old