diff options
author | neil <neil@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-03-02 07:35:12 +0000 |
---|---|---|
committer | neil <neil@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-03-02 07:35:12 +0000 |
commit | 3ec84a0b0aef46187209d9d69ecb389c487cc2a3 (patch) | |
tree | ae411edfe1a33d4c87567b4c5791c4fa1ec59310 /gcc/cpphash.h | |
parent | 4baba9f150e4013de41d1f05f567ff14d9af3db4 (diff) | |
download | gcc-3ec84a0b0aef46187209d9d69ecb389c487cc2a3.tar.gz |
* cppfiles.c (struct include_file): Update.
(stack_include_file): Use search_from.
(cpp_included, find_include_file): Update.
(cpp_execute_include): Update. ptr->name may not be
null terminated. Use the new search_from member variable
of cpp_buffer.
(_cpp_compare_file_date): Similarly.
(search_from): New function, similiar to actual_directory.
(actual_directory): Delete.
(remap_filename): Update. loc->name may not be null terminated.
(struct file_name_list): Rename search_path. Update.
* cpphash.h (struct cpp_buffer): Delete actual_dir. New members
search_from and dir.
(struct cpp_reader): Remove actual_dirs.
* cppinit.c (struct cpp_pending): Update for renamed objects.
(append_include_chain, remove_dup_dir, remove_dup_dirs,
merge_include_chains, cpp_destroy, cpp_start_read): Similarly.
* cpplib.h (struct cpp_options): Similarly.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@40178 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cpphash.h')
-rw-r--r-- | gcc/cpphash.h | 40 |
1 files changed, 21 insertions, 19 deletions
diff --git a/gcc/cpphash.h b/gcc/cpphash.h index 14df2da9b20..5b2c24bd0ae 100644 --- a/gcc/cpphash.h +++ b/gcc/cpphash.h @@ -72,23 +72,23 @@ struct cpp_pool unsigned int locks; }; -/* List of directories to look for include files in. */ -struct file_name_list +/* List of directories to look for include files in. */ +struct search_path { - struct file_name_list *next; - struct file_name_list *alloc; /* for the cache of - current directory entries */ - char *name; - unsigned int nlen; + struct search_path *next; + + /* NOTE: NAME may not be null terminated for the case of the current + file's directory! */ + const char *name; + unsigned int len; /* We use these to tell if the directory mentioned here is a duplicate - of an earlier directory on the search path. */ + of an earlier directory on the search path. */ ino_t ino; dev_t dev; - /* If the following is nonzero, it is a C-language system include - directory. */ + /* Non-zero if it is a system include directory. */ int sysp; - /* Mapping of file names for this directory. - Only used on MS-DOS and related platforms. */ + /* Mapping of file names for this directory. Only used on MS-DOS + and related platforms. */ struct file_name_map *name_map; }; @@ -180,9 +180,6 @@ struct cpp_buffer /* Filename specified with #line command. */ const char *nominal_fname; - /* Actual directory of this file, used only for "" includes */ - struct file_name_list *actual_dir; - /* Pointer into the include table. Used for include_next and to record control macros. */ struct include_file *inc; @@ -227,6 +224,15 @@ struct cpp_buffer /* Buffer type. */ ENUM_BITFIELD (cpp_buffer_type) type : 8; + + /* The directory of the this buffer's file. Its NAME member is not + allocated, so we don't need to worry about freeing it. */ + struct search_path dir; + + /* The directory to start searching for "" include files. Is either + "dir" above, or options.quote_include, depending upon whether -I- + was on the command line. */ + struct search_path *search_from; }; /* A cpp_reader encapsulates the "state" of a pre-processor run. @@ -297,10 +303,6 @@ struct cpp_reader /* Tree of other included files. See cppfiles.c. */ struct splay_tree_s *all_include_files; - /* Chain of `actual directory' file_name_list entries, for "" - inclusion. */ - struct file_name_list *actual_dirs; - /* Current maximum length of directory names in the search path for include files. (Altered as we get more of them.) */ unsigned int max_include_len; |