Commit 002ee64f by Nathan Sidwell Committed by Nathan Sidwell

cppinit.c (remove_dup_dir): Make static.

	* cppinit.c (remove_dup_dir): Make static.
	(remove_dup_dirs): Make static. Only warn about preempting a
	system directory with a non-system directory.

From-SVN: r44188
parent ef1846a7
2001-07-20 Nathan Sidwell <nathan@codesourcery.com>
* cppinit.c (remove_dup_dir): Make static.
(remove_dup_dirs): Make static. Only warn about preempting a
system directory with a non-system directory.
2001-07-19 Geoffrey Keating <geoffk@redhat.com> 2001-07-19 Geoffrey Keating <geoffk@redhat.com>
* ifcvt.c (noce_try_store_flag_constants): Correct order * ifcvt.c (noce_try_store_flag_constants): Correct order
......
...@@ -100,9 +100,9 @@ static void init_library PARAMS ((void)); ...@@ -100,9 +100,9 @@ static void init_library PARAMS ((void));
static void init_builtins PARAMS ((cpp_reader *)); static void init_builtins PARAMS ((cpp_reader *));
static void append_include_chain PARAMS ((cpp_reader *, static void append_include_chain PARAMS ((cpp_reader *,
char *, int, int)); char *, int, int));
struct search_path * remove_dup_dir PARAMS ((cpp_reader *, static struct search_path * remove_dup_dir PARAMS ((cpp_reader *,
struct search_path *)); struct search_path *));
struct search_path * remove_dup_dirs PARAMS ((cpp_reader *, static struct search_path * remove_dup_dirs PARAMS ((cpp_reader *,
struct search_path *)); struct search_path *));
static void merge_include_chains PARAMS ((cpp_reader *)); static void merge_include_chains PARAMS ((cpp_reader *));
static void do_includes PARAMS ((cpp_reader *, static void do_includes PARAMS ((cpp_reader *,
...@@ -264,7 +264,7 @@ append_include_chain (pfile, dir, path, cxx_aware) ...@@ -264,7 +264,7 @@ append_include_chain (pfile, dir, path, cxx_aware)
/* Handle a duplicated include path. PREV is the link in the chain /* Handle a duplicated include path. PREV is the link in the chain
before the duplicate. The duplicate is removed from the chain and before the duplicate. The duplicate is removed from the chain and
freed. Returns PREV. */ freed. Returns PREV. */
struct search_path * static struct search_path *
remove_dup_dir (pfile, prev) remove_dup_dir (pfile, prev)
cpp_reader *pfile; cpp_reader *pfile;
struct search_path *prev; struct search_path *prev;
...@@ -285,7 +285,7 @@ remove_dup_dir (pfile, prev) ...@@ -285,7 +285,7 @@ remove_dup_dir (pfile, prev)
chain, or NULL if the chain is empty. This algorithm is quadratic chain, or NULL if the chain is empty. This algorithm is quadratic
in the number of -I switches, which is acceptable since there in the number of -I switches, which is acceptable since there
aren't usually that many of them. */ aren't usually that many of them. */
struct search_path * static struct search_path *
remove_dup_dirs (pfile, head) remove_dup_dirs (pfile, head)
cpp_reader *pfile; cpp_reader *pfile;
struct search_path *head; struct search_path *head;
...@@ -297,20 +297,18 @@ remove_dup_dirs (pfile, head) ...@@ -297,20 +297,18 @@ remove_dup_dirs (pfile, head)
for (other = head; other != cur; other = other->next) for (other = head; other != cur; other = other->next)
if (INO_T_EQ (cur->ino, other->ino) && cur->dev == other->dev) if (INO_T_EQ (cur->ino, other->ino) && cur->dev == other->dev)
{ {
if (cur->sysp) if (cur->sysp && !other->sysp)
{ {
cpp_warning (pfile, cpp_warning (pfile,
"changing search order for system directory \"%s\"", "changing search order for system directory \"%s\"",
cur->name); cur->name);
if (strcmp (cur->name, other->name)) if (strcmp (cur->name, other->name))
cpp_warning (pfile, other->sysp cpp_warning (pfile,
? " as it is the same as system directory \"%s\"" " as it is the same as non-system directory \"%s\"",
: " as it is the same as non-system directory \"%s\"",
other->name); other->name);
else else
cpp_warning (pfile, other->sysp cpp_warning (pfile,
? " as it has already been specified as a system directory" " as it has already been specified as a non-system directory");
: " as it has already been specified as a non-system directory");
} }
cur = remove_dup_dir (pfile, prev); cur = remove_dup_dir (pfile, prev);
break; break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment