summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXiangfu Liu <xiangfu@sharism.cc>2011-12-20 13:09:40 +0800
committerXiangfu Liu <xiangfu@sharism.cc>2011-12-28 14:49:08 +0800
commitca9305ab6317ad9dfb35ab5cedc6669c3bbf67d3 (patch)
treebb9591df35cf8023abadeb6ace17b1aa39710f69
parentacb14471a54865f1d1a018b38bbd2c3cc7015701 (diff)
fix the redefined warning
Signed-off-by: Xiangfu Liu <xiangfu@sharism.cc>
-rw-r--r--direct/yportenv.h21
1 files changed, 20 insertions, 1 deletions
diff --git a/direct/yportenv.h b/direct/yportenv.h
index 69509e0..a8d1b28 100644
--- a/direct/yportenv.h
+++ b/direct/yportenv.h
@@ -261,14 +261,33 @@ struct iattr {
#define S_IFREG 0100000
#endif
+#ifndef S_ISSOCK
#define S_ISSOCK(m) (((m) & S_IFMT) == S_IFSOCK)
+#endif
+
+#ifndef S_ISLNK
#define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK)
+#endif
+
+#ifndef S_ISDIR
#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
+#endif
+
+#ifndef S_ISREG
#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
+#endif
+
+#ifndef S_ISBLK
#define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK)
+#endif
+
+#ifndef S_ISCHR
#define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR)
-#define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO)
+#endif
+#ifndef S_ISFIFO
+#define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO)
+#endif
#ifndef S_IREAD
#define S_IREAD 0000400