diff Python/bltinmodule.c @ 19058:f9494135b579 legacy-trunk

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.
author Tim Peters <tim.peters@gmail.com>
date Wed, 08 Aug 2001 06:24:48 +0000
parents 2bb242dc69d8
children f51b13bf5d54
line wrap: on
line diff
--- a/Python/bltinmodule.c	Wed Aug 08 05:41:01 2001 +0000
+++ b/Python/bltinmodule.c	Wed Aug 08 06:24:48 2001 +0000
@@ -592,7 +592,7 @@
 	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;