Commit 66938a1d by Danny Smith Committed by Danny Smith

cppfiles.c (open_file): Correct typo.

	* cppfiles.c (open_file): Correct typo.

From-SVN: r125778
parent a0c64295
2007-06-17 Danny Smith <dannysmith@users.sourceforge.net
* cppfiles.c (open_file): Correct typo.
2007-06-16 Vladimir Prus <vladimir@codesourcery.com> 2007-06-16 Vladimir Prus <vladimir@codesourcery.com>
* cppfiles.c (open_file): Prevent the call * cppfiles.c (open_file): Prevent the call
......
...@@ -234,14 +234,14 @@ open_file (_cpp_file *file) ...@@ -234,14 +234,14 @@ open_file (_cpp_file *file)
/* On most UNIX systems, open succeeds on a directory. Above, /* On most UNIX systems, open succeeds on a directory. Above,
we check if we have opened a directory and if so, set errno we check if we have opened a directory and if so, set errno
to ENOENT. However, on Windows, opening a directory 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. */ case too. */
if (stat (file->path, &file->st) == 0 if (stat (file->path, &file->st) == 0
&& S_ISDIR (file->st.st_mode)) && S_ISDIR (file->st.st_mode))
errno = ENOENT; errno = ENOENT;
else else
/* The call to stat may have reset errno. */ /* The call to stat may have reset errno. */
errno = EACCESS; errno = EACCES;
} }
#endif #endif
else if (errno == ENOTDIR) else if (errno == ENOTDIR)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment