summaryrefslogtreecommitdiffstats
path: root/Include
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2001-08-08 10:28:06 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2001-08-08 10:28:06 (GMT)
commitf9836ba4fea66d74fc2afddc434a147265a9caa7 (patch)
tree868672f429a7a963f58dc0dc671b0f907c0a84fd /Include
parente00dde2087db2c211f9c9267659d37e3306f79d8 (diff)
downloadcpython-f9836ba4fea66d74fc2afddc434a147265a9caa7.zip
cpython-f9836ba4fea66d74fc2afddc434a147265a9caa7.tar.gz
cpython-f9836ba4fea66d74fc2afddc434a147265a9caa7.tar.bz2
Put conditional S_ISDIR definition(s) into pyport.h.
Diffstat (limited to 'Include')
-rw-r--r--Include/pyport.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/Include/pyport.h b/Include/pyport.h
index 35d8713..e9dc812 100644
--- a/Include/pyport.h
+++ b/Include/pyport.h
@@ -150,6 +150,19 @@ typedef unsigned LONG_LONG Py_uintptr_t;
#include <stat.h>
#endif
+#if defined(PYCC_VACPP)
+/* VisualAge C/C++ Failed to Define MountType Field in sys/stat.h */
+#define S_IFMT (S_IFDIR|S_IFCHR|S_IFREG)
+#endif
+
+#ifndef S_ISREG
+#define S_ISREG(x) (((x) & S_IFMT) == S_IFREG)
+#endif
+
+#ifndef S_ISDIR
+#define S_ISDIR(x) (((x) & S_IFMT) == S_IFDIR)
+#endif
+
#ifdef __cplusplus
/* Move this down here since some C++ #include's don't like to be included