summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
Diffstat (limited to 'Python')
-rw-r--r--Python/bltinmodule.c2
-rw-r--r--Python/import.c4
2 files changed, 1 insertions, 5 deletions
diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c
index 8f5a932..fa68162 100644
--- a/Python/bltinmodule.c
+++ b/Python/bltinmodule.c
@@ -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;
diff --git a/Python/import.c b/Python/import.c
index 8e08164..c5234ac 100644
--- a/Python/import.c
+++ b/Python/import.c
@@ -28,10 +28,6 @@
#define S_IFMT (S_IFDIR|S_IFCHR|S_IFREG)
#endif
-#ifndef S_ISDIR
-#define S_ISDIR(mode) (((mode) & S_IFMT) == S_IFDIR)
-#endif
-
extern time_t PyOS_GetLastModificationTime(char *, FILE *);
/* In getmtime.c */