aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-ppoutput.c
diff options
context:
space:
mode:
authorNeil Booth <neil@daikokuya.co.uk>2003-04-21 19:21:59 +0000
committerNeil Booth <neil@daikokuya.co.uk>2003-04-21 19:21:59 +0000
commit4cd13b35218e20ff9ee40fd8d15b8a6d1ce89643 (patch)
tree18ec4d7a6b4b870f1e5aa394f9a86c0a58ffc185 /gcc/c-ppoutput.c
parent1e9b4a10d1c17eebc3d04f7085d21405b61e5559 (diff)
* c-ppoutput.c (cb_include): Don't take a cpp_token.
* cppfiles.c: Don't undef strcmp. (find_include_file): Don't take a cpp_token. Check for empty file names. (_cpp_execute_include, _cpp_compare_file_date): Don't take a cpp_token. (cpp_push_include): Simplify. * cpphash.h (_cpp_execute_include, _cpp_compare_file_date): Update. * cpplib.c (glue_header_name): Return the file name, not a cpp_token. (parse_include): Similary. Don't check for zero-length filenames. (do_include_common, do_pragma_dependency): Update accordingly. * cpplib.h (struct cpp_callbacks): Change prototype of include. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@65894 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-ppoutput.c')
-rw-r--r--gcc/c-ppoutput.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/gcc/c-ppoutput.c b/gcc/c-ppoutput.c
index 69eec220a90..2c1835def71 100644
--- a/gcc/c-ppoutput.c
+++ b/gcc/c-ppoutput.c
@@ -55,7 +55,7 @@ static void cb_line_change PARAMS ((cpp_reader *, const cpp_token *, int));
static void cb_define PARAMS ((cpp_reader *, unsigned int, cpp_hashnode *));
static void cb_undef PARAMS ((cpp_reader *, unsigned int, cpp_hashnode *));
static void cb_include PARAMS ((cpp_reader *, unsigned int,
- const unsigned char *, const cpp_token *));
+ const unsigned char *, const char *, int));
static void cb_ident PARAMS ((cpp_reader *, unsigned int,
const cpp_string *));
static void cb_def_pragma PARAMS ((cpp_reader *, unsigned int));
@@ -345,15 +345,18 @@ cb_undef (pfile, line, node)
}
static void
-cb_include (pfile, line, dir, header)
- cpp_reader *pfile;
+cb_include (pfile, line, dir, header, angle_brackets)
+ cpp_reader *pfile ATTRIBUTE_UNUSED;
unsigned int line;
const unsigned char *dir;
- const cpp_token *header;
+ const char *header;
+ int angle_brackets;
{
maybe_print_line (print.map, line);
- fprintf (print.outf, "#%s %s\n", dir,
- cpp_token_as_text (pfile, header));
+ if (angle_brackets)
+ fprintf (print.outf, "#%s <%s>\n", dir, header);
+ else
+ fprintf (print.outf, "#%s \"%s\"\n", dir, header);
print.line++;
}