summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2002-05-21 23:15:05 +0000
committerJim Meyering <jim@meyering.net>2002-05-21 23:15:05 +0000
commitfdadb32d0aad1dc5ebe0cc7827ef2d4233321aa6 (patch)
treee4a137af1a6199ede64d4c36b34e40b8ac3c8ac2 /src
parentb2cb94b93ccec08b248a72b8ea9ba6085e302946 (diff)
downloadcoreutils-fdadb32d0aad1dc5ebe0cc7827ef2d4233321aa6.tar.xz
(S_ISLNK, S_ISFIFO, S_ISSOCK, S_ISCHR, S_ISBLK, S_ISDOOR): Define here instead.
Diffstat (limited to 'src')
-rw-r--r--src/sys2.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/sys2.h b/src/sys2.h
index 6914a5043..8493be78d 100644
--- a/src/sys2.h
+++ b/src/sys2.h
@@ -52,6 +52,34 @@
# define S_ISDOOR(m) (((m) & S_IFMT) == S_IFDOOR)
#endif
+/* If any of the following S_* macros are undefined, define them here
+ so each use doesn't have to be guarded with e.g., #ifdef S_ISLNK. */
+#ifndef S_ISLNK
+# define S_ISLNK(Mode) 0
+#endif
+
+#ifndef S_ISFIFO
+# define S_ISFIFO(Mode) 0
+#endif
+
+#ifndef S_ISSOCK
+# define S_ISSOCK(Mode) 0
+#endif
+
+#ifndef S_ISCHR
+# define S_ISCHR(Mode) 0
+#endif
+
+#ifndef S_ISBLK
+# define S_ISBLK(Mode) 0
+#endif
+
+#ifndef S_ISDOOR
+# define S_ISDOOR(Mode) 0
+#endif
+
+/* If any of the following are undefined,
+ define them to their de facto standard values. */
#if !S_ISUID
# define S_ISUID 04000
#endif