]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
* files.c (search_path_head): Fix check for absolute paths.
authorMichael Matz <matz@suse.de>
Fri, 16 Nov 2007 13:46:57 +0000 (13:46 +0000)
committerMichael Matz <matz@gcc.gnu.org>
Fri, 16 Nov 2007 13:46:57 +0000 (13:46 +0000)
From-SVN: r130229

libcpp/ChangeLog
libcpp/files.c

index 475d4f6f184822d196301165c71944567902448f..9333b8c6f38be9e16f618a42d657670937ca97a7 100644 (file)
@@ -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
index ae2f2945d9e58b5da32255bab26690e53a2d269a..ad7dad03afa245fa895f4f20df3feab54708aaeb 100644 (file)
@@ -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;