diff options
author | Neil Booth <neilb@earthling.net> | 2000-12-04 07:32:04 +0000 |
---|---|---|
committer | Neil Booth <neil@gcc.gnu.org> | 2000-12-04 07:32:04 +0000 |
commit | 614c7d3716281075f8ef704f37895a121a14d9bd (patch) | |
tree | 2ee77fc01b58627c217cdfa65bb2e8134086c70b /gcc/cppfiles.c | |
parent | 2936419d1cbff6e526a77bbba46b06c5552a60e1 (diff) | |
download | gcc-614c7d3716281075f8ef704f37895a121a14d9bd.tar.gz |
cppfiles.c (cpp_make_system_header): Take 2 booleans, and operate on current buffer.
* cppfiles.c (cpp_make_system_header): Take 2 booleans,
and operate on current buffer.
(cpp_read_file): Rename _cpp_read_file.
* cpplib.c (do_line, do_pragma_system_header): Update calls to
cpp_make_system_header.
* fix-header.c: Similarly.
* cpphash.h (_cpp_read_file): Move from...
* cpplib.h: ... here.
* cppinit.c (do_includes, cpp_start_read): Update appropriately.
From-SVN: r37989
Diffstat (limited to 'gcc/cppfiles.c')
-rw-r--r-- | gcc/cppfiles.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/gcc/cppfiles.c b/gcc/cppfiles.c index 9af0c396cd7..4043a57c2b9 100644 --- a/gcc/cppfiles.c +++ b/gcc/cppfiles.c @@ -526,17 +526,16 @@ _cpp_fake_include (pfile, fname) see the details of struct include_file. This is an exported interface because fix-header needs it. */ void -cpp_make_system_header (pfile, pbuf, flag) +cpp_make_system_header (pfile, syshdr, externc) cpp_reader *pfile; - cpp_buffer *pbuf; - int flag; + int syshdr, externc; { - if (flag < 0 || flag > 2) - cpp_ice (pfile, "cpp_make_system_header: bad flag %d\n", flag); - else if (!pbuf->inc) - cpp_ice (pfile, "cpp_make_system_header called on non-file buffer"); - else - pbuf->inc->sysp = flag; + int flags = 0; + + /* 1 = system header, 2 = system header to be treated as C. */ + if (syshdr) + flags = 1 + (externc != 0); + pfile->buffer->inc->sysp = flags; } /* Report on all files that might benefit from a multiple include guard. @@ -714,7 +713,7 @@ _cpp_compare_file_date (pfile, f) /* Push an input buffer and load it up with the contents of FNAME. If FNAME is "" or NULL, read standard input. */ int -cpp_read_file (pfile, fname) +_cpp_read_file (pfile, fname) cpp_reader *pfile; const char *fname; { |