summaryrefslogtreecommitdiffstats
path: root/Modules/posixmodule.c
diff options
context:
space:
mode:
authorChristian Heimes <christian@cheimes.de>2013-06-23 21:56:05 (GMT)
committerChristian Heimes <christian@cheimes.de>2013-06-23 21:56:05 (GMT)
commit99d6135a157f6626fddd5d61007d363b3a14990d (patch)
treee6c96449223f2f1c4632e45393cacb5106a4b96b /Modules/posixmodule.c
parent9975877f46efeade3f4af5aa875fc1a256512f1f (diff)
downloadcpython-99d6135a157f6626fddd5d61007d363b3a14990d.zip
cpython-99d6135a157f6626fddd5d61007d363b3a14990d.tar.gz
cpython-99d6135a157f6626fddd5d61007d363b3a14990d.tar.bz2
Define S_IFMT and S_IFLNK in pyport.h so posixmodule.c can use named constants instead
of arbitrary looking numbers.
Diffstat (limited to 'Modules/posixmodule.c')
-rw-r--r--Modules/posixmodule.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
index 738bf0a..baad299 100644
--- a/Modules/posixmodule.c
+++ b/Modules/posixmodule.c
@@ -1405,9 +1405,9 @@ attribute_data_to_stat(BY_HANDLE_FILE_INFORMATION *info, ULONG reparse_tag, stru
result->st_ino = (((__int64)info->nFileIndexHigh)<<32) + info->nFileIndexLow;
if (reparse_tag == IO_REPARSE_TAG_SYMLINK) {
/* first clear the S_IFMT bits */
- result->st_mode ^= (result->st_mode & 0170000);
+ result->st_mode ^= (result->st_mode & S_IFMT);
/* now set the bits that make this a symlink */
- result->st_mode |= 0120000;
+ result->st_mode |= S_IFLNK;
}
return 0;