From 3310a10a68228c4a84a2ed517af6b0b81e7f0b15 Mon Sep 17 00:00:00 2001 From: "R. David Murray" Date: Tue, 7 Jul 2009 09:54:16 +0000 Subject: [PATCH] Update issue 6070 patch to match the patch that was actually tested on Windows. --- Python/import.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Python/import.c b/Python/import.c index 46a1acc6a26..67c6cb212d6 100644 --- a/Python/import.c +++ b/Python/import.c @@ -881,7 +881,9 @@ write_compiled_module(PyCodeObject *co, char *cpathname, struct stat *srcstat) { FILE *fp; time_t mtime = srcstat->st_mtime; -#ifndef MS_WINDOWS +#ifdef MS_WINDOWS /* since Windows uses different permissions */ + mode_t mode = srcstat->st_mode & ~S_IEXEC; +#else mode_t mode = srcstat->st_mode & ~S_IXUSR & ~S_IXGRP & ~S_IXOTH; #endif