diff options
author | Zack Weinberg <zack@wolery.cumb.org> | 2000-06-21 23:08:17 +0000 |
---|---|---|
committer | Zack Weinberg <zack@gcc.gnu.org> | 2000-06-21 23:08:17 +0000 |
commit | e605b0403e89c0286910889cfca158bfc2567cfa (patch) | |
tree | 6e4efa3389b627b15921c495d03be0193553df87 /gcc/cppfiles.c | |
parent | 229e1e4c03db3866f442610e2694dc6f97335ca7 (diff) | |
download | gcc-e605b0403e89c0286910889cfca158bfc2567cfa.zip gcc-e605b0403e89c0286910889cfca158bfc2567cfa.tar.gz gcc-e605b0403e89c0286910889cfca158bfc2567cfa.tar.bz2 |
cppfiles.c (cpp_make_system_header): New function.
* cppfiles.c (cpp_make_system_header): New function.
* cpplib.h: Prototype it.
* cpplib.c (do_line, do_pragma_system_header): Use it.
* fix-header.c (read_scan_file): Use it.
* fix-header.c (check_macro_names): Cast second arg of
cpp_defined to const unsigned char *.
(read_scan_file): Make getchar_call const unsigned char.
From-SVN: r34641
Diffstat (limited to 'gcc/cppfiles.c')
-rw-r--r-- | gcc/cppfiles.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/cppfiles.c b/gcc/cppfiles.c index 422a123..1598a3e 100644 --- a/gcc/cppfiles.c +++ b/gcc/cppfiles.c @@ -308,6 +308,23 @@ _cpp_fake_include (pfile, fname) return (const char *)name; } +/* Not everyone who wants to set system-header-ness on a buffer can + 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_reader *pfile; + cpp_buffer *pbuf; + int flag; +{ + 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; +} + #define PRINT_THIS_DEP(p, b) (CPP_PRINT_DEPS(p) > (b||p->system_include_depth)) void _cpp_execute_include (pfile, f, len, no_reinclude, search_start) |