diff options
author | bothner <bothner@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-10-02 07:23:27 +0000 |
---|---|---|
committer | bothner <bothner@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-10-02 07:23:27 +0000 |
commit | 643868343396410b69fabc608598ef263a8f0b64 (patch) | |
tree | d42ac396e3c05ffb67c9335d47f0193aefee767b /gcc/fix-header.c | |
parent | 11b5269c49d5849aa9909a0147b38cc8d44d7d90 (diff) | |
download | gcc-643868343396410b69fabc608598ef263a8f0b64.tar.gz |
* cppinit.c (cpp_read_main_file): Split into two functions:
Distribute _cpp_stack_file call over the two functions.
(cpp_find_main_file): New function.
Don't call _cpp_do_file_change even if working_directory flag set.
(cpp_push_main_file): New function.
* cppfiles.c (_cpp_find_failed): New helper function.
(find_file): Made non-static and renamed to _cpp_find_file.
(_cpp_stack_file): No longer needed. But note the following.
(stack_file): Made non-static and renamed to _cpp_stack_file.
* fix-header.c (cpp_read_main_file): Replace cpp_read_main_file
call with calls to cpp_find_main_file and cpp_push_main_file.
(search_path_head): If there is no current buffer, use main_file.
* cpphash.h: Update function declarations.
* cpplib.h: Update function declarations.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@72014 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fix-header.c')
-rw-r--r-- | gcc/fix-header.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/fix-header.c b/gcc/fix-header.c index 8ae3025b15d..7fdecb5d150 100644 --- a/gcc/fix-header.c +++ b/gcc/fix-header.c @@ -604,8 +604,9 @@ read_scan_file (char *in_fname, int argc, char **argv) options->inhibit_errors = 1; cpp_post_options (scan_in); - if (! cpp_read_main_file (scan_in, in_fname)) + if (!cpp_find_main_file (scan_in, in_fname)) exit (FATAL_EXIT_CODE); + cpp_push_main_file (scan_in); cpp_change_file (scan_in, LC_RENAME, "<built-in>"); cpp_init_builtins (scan_in, true); @@ -669,7 +670,7 @@ read_scan_file (char *in_fname, int argc, char **argv) /* Scan the macro expansion of "getchar();". */ cpp_push_buffer (scan_in, getchar_call, sizeof(getchar_call) - 1, - /* from_stage3 */ true, 1); + /* from_stage3 */ true); for (;;) { const cpp_token *t = cpp_get_token (scan_in); |