This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Fix preprocessor/11839


My cppfiles.c rewrite fixed the case where a file was unreadable
(we wouldn't complain, and continue searching) but missed the
case where a path component is a file.  I tried to create a
testcase for this, and failed.

Neil.

	PR preprocessor/11839
	* cppfiles.c (open_file): Handle ENOTDIR.
	
Index: cppfiles.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cppfiles.c,v
retrieving revision 1.184
diff -u -p -r1.184 cppfiles.c
--- cppfiles.c	3 Aug 2003 09:28:23 -0000	1.184
+++ cppfiles.c	8 Aug 2003 22:14:19 -0000
@@ -230,6 +230,8 @@ open_file (_cpp_file *file)
       close (file->fd);
       file->fd = -1;
     }
+  else if (errno == ENOTDIR)
+    errno = ENOENT;
 
   file->err_no = errno;
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]