mirror of https://github.com/python/cpython
Repair the Windows build (S_ISDIR() macro doesn't exist).
Somebody else should feel free to repair this a different way; see Python- Dev for discussion.
This commit is contained in:
parent
e54acfd8b2
commit
257b3bfa76
|
@ -592,7 +592,7 @@ builtin_execfile(PyObject *self, PyObject *args)
|
||||||
exists = 0;
|
exists = 0;
|
||||||
/* Test for existence or directory. */
|
/* Test for existence or directory. */
|
||||||
if (!stat(filename, &s)) {
|
if (!stat(filename, &s)) {
|
||||||
if (S_ISDIR(s.st_mode))
|
if ((s.st_mode & S_IFMT) == S_IFDIR)
|
||||||
errno = EISDIR;
|
errno = EISDIR;
|
||||||
else
|
else
|
||||||
exists = 1;
|
exists = 1;
|
||||||
|
|
Loading…
Reference in New Issue