diff options
author | geoffk <geoffk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-01-17 00:37:47 +0000 |
---|---|---|
committer | geoffk <geoffk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-01-17 00:37:47 +0000 |
commit | 9f787687c58a216c1b1364e706a9beb6f0049d4a (patch) | |
tree | da307f1c660e3c776f8f7737d4a9ccdfec5ed91e /gcc/cpppch.c | |
parent | ae39a6f8e64cc00a0a8214cb583d0ce33a1fe32a (diff) | |
download | gcc-9f787687c58a216c1b1364e706a9beb6f0049d4a.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@76016 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cpppch.c')
-rw-r--r-- | gcc/cpppch.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/gcc/cpppch.c b/gcc/cpppch.c index 872908de0bd..8cb5bcff87a 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: |