summaryrefslogtreecommitdiff
path: root/libcpp/files.c
diff options
context:
space:
mode:
authormatz <matz@138bc75d-0d04-0410-961f-82ee72b054a4>2007-11-16 13:46:57 +0000
committermatz <matz@138bc75d-0d04-0410-961f-82ee72b054a4>2007-11-16 13:46:57 +0000
commitbce619a695568efd4b98d5d9929d6b0f148365e6 (patch)
treee93b5bc6866b38236bebc566953efb5809d0d299 /libcpp/files.c
parentb01f5f9636e6937ae3d19e819c2e72ae4bf6dba7 (diff)
downloadgcc-bce619a695568efd4b98d5d9929d6b0f148365e6.tar.gz
* files.c (search_path_head): Fix check for absolute paths.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@130229 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libcpp/files.c')
-rw-r--r--libcpp/files.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libcpp/files.c b/libcpp/files.c
index ae2f2945d9e..ad7dad03afa 100644
--- a/libcpp/files.c
+++ b/libcpp/files.c
@@ -837,7 +837,8 @@ search_path_head (cpp_reader *pfile, const char *fname, int angle_brackets,
/* For #include_next, skip in the search path past the dir in which
the current file was found, but if it was found via an absolute
path use the normal search logic. */
- if (type == IT_INCLUDE_NEXT && file->dir)
+ if (type == IT_INCLUDE_NEXT && file->dir
+ && file->dir != &pfile->no_search_path)
dir = file->dir->next;
else if (angle_brackets)
dir = pfile->bracket_include;