]> granicus.if.org Git - python/commitdiff
Repair the Windows build (S_ISDIR() macro doesn't exist).
authorTim Peters <tim.peters@gmail.com>
Wed, 8 Aug 2001 06:24:48 +0000 (06:24 +0000)
committerTim Peters <tim.peters@gmail.com>
Wed, 8 Aug 2001 06:24:48 +0000 (06:24 +0000)
Somebody else should feel free to repair this a different way; see Python-
Dev for discussion.

Python/bltinmodule.c

index fa6816279dfd5d3052bf4a5d5dd629eddadbc7d1..8f5a9325a53ede0bf952d7fb2ccca3d3e6b03cb2 100644 (file)
@@ -592,7 +592,7 @@ builtin_execfile(PyObject *self, PyObject *args)
        exists = 0;
        /* Test for existence or directory. */
        if (!stat(filename, &s)) {
-               if (S_ISDIR(s.st_mode))
+               if ((s.st_mode & S_IFMT) == S_IFDIR)
                        errno = EISDIR;
                else
                        exists = 1;