mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
Define S_IFMT and S_IFLNK in pyport.h so posixmodule.c can use named constants instead
of arbitrary looking numbers.
This commit is contained in:
parent
9975877f46
commit
99d6135a15
2 changed files with 10 additions and 9 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue