diff options
author | Michael Matz <matz@suse.de> | 2007-11-16 13:46:57 +0000 |
---|---|---|
committer | Michael Matz <matz@gcc.gnu.org> | 2007-11-16 13:46:57 +0000 |
commit | b0f4807f9eaf796932e18525178bbd630bb5c8ed (patch) | |
tree | e93b5bc6866b38236bebc566953efb5809d0d299 /libcpp | |
parent | 237b2f1b418a4394535f64c8fb600bc78fd00169 (diff) | |
download | gcc-b0f4807f9eaf796932e18525178bbd630bb5c8ed.zip gcc-b0f4807f9eaf796932e18525178bbd630bb5c8ed.tar.gz gcc-b0f4807f9eaf796932e18525178bbd630bb5c8ed.tar.bz2 |
* files.c (search_path_head): Fix check for absolute paths.
From-SVN: r130229
Diffstat (limited to 'libcpp')
-rw-r--r-- | libcpp/ChangeLog | 4 | ||||
-rw-r--r-- | libcpp/files.c | 3 |
2 files changed, 6 insertions, 1 deletions
diff --git a/libcpp/ChangeLog b/libcpp/ChangeLog index 475d4f6..9333b8c6 100644 --- a/libcpp/ChangeLog +++ b/libcpp/ChangeLog @@ -1,3 +1,7 @@ +2007-11-16 Michael Matz <matz@suse.de> + + * files.c (search_path_head): Fix check for absolute paths. + 2007-11-05 Tom Tromey <tromey@redhat.com> * include/line-map.h (LINEMAP_POSITION_FOR_COLUMN): Wrap in diff --git a/libcpp/files.c b/libcpp/files.c index ae2f294..ad7dad0 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; |