aboutsummaryrefslogtreecommitdiff
path: root/gcc/cpppch.c
diff options
context:
space:
mode:
authorGeoffrey Keating <geoffk@apple.com>2004-01-17 00:37:47 +0000
committerGeoffrey Keating <geoffk@gcc.gnu.org>2004-01-17 00:37:47 +0000
commit73e61092e104b922e0f83f63fe988795cebe46bf (patch)
treeda307f1c660e3c776f8f7737d4a9ccdfec5ed91e /gcc/cpppch.c
parent790b6144d14ef4c6cc8559e0399e724e6f855092 (diff)
downloadgcc-73e61092e104b922e0f83f63fe988795cebe46bf.zip
gcc-73e61092e104b922e0f83f63fe988795cebe46bf.tar.gz
gcc-73e61092e104b922e0f83f63fe988795cebe46bf.tar.bz2
[multiple changes]
2004-01-15 Geoffrey Keating <geoffk@apple.com> * Makefile.in (MD5_H): New. (fold-const.o): Depend on md5.h. (dwarf2out.o): Likewise. (cppfiles.o): Likewise. * cppfiles.c: Include md5.h. (should_stack_file): Check against list read from PCH file. (struct pchf_data): New. (pchf): New variable. (struct pchf_adder_info): New. (pchf_adder): New. (pchf_save_compare): New. (_cpp_save_file_entries): New. (_cpp_read_file_entries): New. (struct pchf_compare_data): New. (pchf_compare): New. (check_file_against_entries): New. * cpphash.h (_cpp_save_file_entries): Prototype. (_cpp_read_file_entries): Prototype. * cpppch.c (cpp_write_pch_state): Write the list of headers. (cpp_read_state): Read the list of headers. Index: testsuite/ChangeLog 2004-01-16 Geoffrey Keating <geoffk@apple.com> * gcc.dg/pch/import-1.c: New. * gcc.dg/pch/import-1.hs: New. * gcc.dg/pch/import-1a.h: New. * gcc.dg/pch/import-1b.h: New. * gcc.dg/pch/import-1c.h: New. From-SVN: r76016
Diffstat (limited to 'gcc/cpppch.c')
-rw-r--r--gcc/cpppch.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/gcc/cpppch.c b/gcc/cpppch.c
index 872908d..8cb5bcf 100644
--- a/gcc/cpppch.c
+++ b/gcc/cpppch.c
@@ -1,5 +1,5 @@
/* Part of CPP library. (Precompiled header reading/writing.)
- Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc.
+ Copyright (C) 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
@@ -366,6 +366,12 @@ cpp_write_pch_state (cpp_reader *r, FILE *f)
return -1;
}
+ if (! _cpp_save_file_entries (r, f))
+ {
+ cpp_errno (r, CPP_DL_ERROR, "while writing precompiled header");
+ return -1;
+ }
+
return 0;
}
@@ -709,6 +715,9 @@ cpp_read_state (cpp_reader *r, const char *name, FILE *f,
!= 0)
goto error;
+ if (! _cpp_read_file_entries (r, f))
+ goto error;
+
return 0;
error: