cppfiles.c (open_file): Correct typo.

* cppfiles.c (open_file): Correct typo.

From-SVN: r125778
This commit is contained in:
Danny Smith 2007-06-17 23:15:58 +00:00 committed by Danny Smith
parent a0c6429598
commit 66938a1d5d
2 changed files with 6 additions and 2 deletions

View File

@ -1,3 +1,7 @@
2007-06-17 Danny Smith <dannysmith@users.sourceforge.net
* cppfiles.c (open_file): Correct typo.
2007-06-16 Vladimir Prus <vladimir@codesourcery.com>
* cppfiles.c (open_file): Prevent the call

View File

@ -234,14 +234,14 @@ open_file (_cpp_file *file)
/* On most UNIX systems, open succeeds on a directory. Above,
we check if we have opened a directory and if so, set errno
to ENOENT. However, on Windows, opening a directory
fails with EACCESS. We want to return ENOENT in that
fails with EACCES. We want to return ENOENT in that
case too. */
if (stat (file->path, &file->st) == 0
&& S_ISDIR (file->st.st_mode))
errno = ENOENT;
else
/* The call to stat may have reset errno. */
errno = EACCESS;
errno = EACCES;
}
#endif
else if (errno == ENOTDIR)