summaryrefslogtreecommitdiffstats
path: root/Include
diff options
context:
space:
mode:
authorMichael Droettboom <mdboom@gmail.com>2023-02-08 14:34:24 (GMT)
committerGitHub <noreply@github.com>2023-02-08 14:34:24 (GMT)
commit86ebd5c3fa9ac0fba3b651f1d4abfca79614af5f (patch)
tree4e1cce7fb2ddc9e9a0cc248a789ff3c1b8080ca0 /Include
parent3a88de7a0af00872d9d57e1d98bc2f035cb15a1c (diff)
downloadcpython-86ebd5c3fa9ac0fba3b651f1d4abfca79614af5f.zip
cpython-86ebd5c3fa9ac0fba3b651f1d4abfca79614af5f.tar.gz
cpython-86ebd5c3fa9ac0fba3b651f1d4abfca79614af5f.tar.bz2
gh-101196: Make isdir/isfile/exists faster on Windows (GH-101324)
Co-authored-by: Eryk Sun <eryksun@gmail.com>
Diffstat (limited to 'Include')
-rw-r--r--Include/pyport.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/Include/pyport.h b/Include/pyport.h
index 2208504..40092c2 100644
--- a/Include/pyport.h
+++ b/Include/pyport.h
@@ -247,6 +247,10 @@ typedef Py_ssize_t Py_ssize_clean_t;
#define S_ISCHR(x) (((x) & S_IFMT) == S_IFCHR)
#endif
+#ifndef S_ISLNK
+#define S_ISLNK(x) (((x) & S_IFMT) == S_IFLNK)
+#endif
+
#ifdef __cplusplus
/* Move this down here since some C++ #include's don't like to be included
inside an extern "C" */