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
This commit is contained in:
parent
6b889d891d
commit
71995ede98
@ -1,3 +1,8 @@
|
||||
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)
|
||||
|
Loading…
Reference in New Issue
Block a user