aboutsummaryrefslogtreecommitdiff
path: root/gcc/cpphash.h
diff options
context:
space:
mode:
authorNeil Booth <neil@daikokuya.co.uk>2003-03-01 14:31:21 +0000
committerNeil Booth <neil@gcc.gnu.org>2003-03-01 14:31:21 +0000
commit5793b27668ae1b63e6518f84eab151ad66890eec (patch)
treea780e502dea6f5dd1bc734c51de06a64223427b4 /gcc/cpphash.h
parent6620997bdc9419cd243613ecb7b958788ab082cc (diff)
downloadgcc-5793b27668ae1b63e6518f84eab151ad66890eec.zip
gcc-5793b27668ae1b63e6518f84eab151ad66890eec.tar.gz
gcc-5793b27668ae1b63e6518f84eab151ad66890eec.tar.bz2
Makefile.in (C_AND_OBJC_OBJS, [...]): Update.
* Makefile.in (C_AND_OBJC_OBJS, c-incpath.o, c-lex.o, LIBCPP_OBJS, cppinit.o, cppdefault.o, fix-header): Update. * c-incpath.c: New file. * c-incpath.h: New file. * c-lex.c: Include c-incpath.h. (init_c_lex): Register path simplifier. * c-opts.c: Include cppdefault.h and c-incpath.h. (TARGET_SYSTEM_ROOT, verbose, iprefix, sysroot, std_inc, std_cxx_inc, quote_chain_split, add_prefixed_path): New. (COMMAND_LINE_OPTIONS): Add more options from cpplib. (missing_arg, c_common_decode_option): Handle them. (c_common_post_options): Register include chains. (print_help): Update. * cppdefault.h (struct default include): Update. Move some macros to ... * cppdefault.c: ... here. (cpp_include_defaults): Add extra field add_sysroot. * cppfiles.c (include_file, search_from, find_or_create_entry, cpp_included, find_include_file, remap_filename): Update for renaming of search_path to cpp_path, and of the chain headers. (remove_component_p, _cpp_simplify_pathname): Move to c-incpath.c. * cpphash.h (struct search_path): Move to cpplib.h. (struct cpp_buffer, struct cpp_reader): Update. (_cpp_simplify_pathname): Remove. * cppinit.c: Don't include prefix.h and cppdefault.h. (INO_T_EQ, INO_T_COPY, path_include, append_include_chain, remove_dup_dir, remove_dup_nonsys_dirs, remove_dup_dirs, init_standard_includes, BRACKET, SYSTEM, AFTER, no_dir, no_pth, cpp_handle_options): Remove. (struct pending_option): Remove chain members. (cpp_destroy, cpp_read_main_file, COMMAND_LINE_OPTIONS, cpp_handle_option): Update. * cpplib.h (struct cpp_path, cpp_set_include_chains): New. (struct cpp_options): Remove quote_include, bracket_include, include_prefix, include_prefix_len, verbose, ignore_srcdir, no_standard_includes, no_standard_cplusplus_includes. (struct cpp_callbacks): Add simplify_path. (cpp_handle_options): Remove. * fix-header.c: Include c-incpath.h. (read_scan_file): Update to use c-incpath functionality. * doc/passes.texi: Update. cp: * Make-lang.in (CXX_C_OBJS): Update. From-SVN: r63612
Diffstat (limited to 'gcc/cpphash.h')
-rw-r--r--gcc/cpphash.h33
1 files changed, 10 insertions, 23 deletions
diff --git a/gcc/cpphash.h b/gcc/cpphash.h
index 9aff511..16aba08 100644
--- a/gcc/cpphash.h
+++ b/gcc/cpphash.h
@@ -1,5 +1,5 @@
/* Part of CPP library.
- Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002
+ Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify it
@@ -130,26 +130,6 @@ extern unsigned char *_cpp_unaligned_alloc PARAMS ((cpp_reader *, size_t));
#define BUFF_FRONT(BUFF) ((BUFF)->cur)
#define BUFF_LIMIT(BUFF) ((BUFF)->limit)
-/* List of directories to look for include files in. */
-struct search_path
-{
- 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. */
- ino_t ino;
- dev_t dev;
- /* Nonzero if it is a system include directory. */
- int sysp;
- /* Mapping of file names for this directory. Only used on MS-DOS
- and related platforms. */
- struct file_name_map *name_map;
-};
-
/* #include types. */
enum include_type {IT_INCLUDE, IT_INCLUDE_NEXT, IT_IMPORT, IT_CMDLINE};
@@ -324,7 +304,7 @@ struct cpp_buffer
/* 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;
+ struct cpp_path dir;
/* Used for buffer overlays by cpptrad.c. */
const uchar *saved_cur, *saved_rlimit;
@@ -369,6 +349,10 @@ struct cpp_reader
_cpp_maybe_push_include_file has yet to restore the line map. */
struct pending_option **next_include_file;
+ /* Search paths for include files. */
+ struct cpp_path *quote_include; /* "" */
+ struct cpp_path *bracket_include; /* <> */
+
/* Multiple include optimisation. */
const cpp_hashnode *mi_cmacro;
const cpp_hashnode *mi_ind_cmacro;
@@ -441,6 +425,10 @@ struct cpp_reader
/* Used when doing preprocessed output. */
struct printer print;
+ /* Nonzero means don't look for #include "foo" the source-file
+ directory. */
+ unsigned char quote_ignores_source_dir;
+
/* Whether cpplib owns the hashtable. */
unsigned char our_hashtable;
@@ -521,7 +509,6 @@ extern void _cpp_destroy_hashtable PARAMS ((cpp_reader *));
/* In cppfiles.c */
extern void _cpp_fake_include PARAMS ((cpp_reader *, const char *));
extern void _cpp_never_reread PARAMS ((struct include_file *));
-extern char *_cpp_simplify_pathname PARAMS ((char *));
extern bool _cpp_read_file PARAMS ((cpp_reader *, const char *));
extern bool _cpp_execute_include PARAMS ((cpp_reader *,
const cpp_token *,