Commit 71995ede by Vladimir Prus Committed by Vladimir Prus

cppfiles.c (open_file): Prevent the call for stat from overwriting errno.

        * cppfiles.c (open_file): Prevent the call
        for stat from overwriting errno.

From-SVN: r125757
parent 6b889d89
2007-06-16 Vladimir Prus <vladimir@codesourcery.com>
* cppfiles.c (open_file): Prevent the call
for stat from overwriting errno.
2007-06-09 Vladimir Prus <vladimir@codesourcery.com>
* cppfiles.c (open_file): Account for the
......
......@@ -239,6 +239,9 @@ open_file (_cpp_file *file)
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;
}
#endif
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