mirror of
https://github.com/python/cpython.git
synced 2025-09-10 10:47:34 +00:00
Put conditional S_ISDIR definition(s) into pyport.h.
This commit is contained in:
parent
e00dde2087
commit
f9836ba4fe
4 changed files with 14 additions and 14 deletions
|
@ -592,7 +592,7 @@ builtin_execfile(PyObject *self, PyObject *args)
|
|||
exists = 0;
|
||||
/* Test for existence or directory. */
|
||||
if (!stat(filename, &s)) {
|
||||
if ((s.st_mode & S_IFMT) == S_IFDIR)
|
||||
if (S_ISDIR(s.st_mode))
|
||||
errno = EISDIR;
|
||||
else
|
||||
exists = 1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue