summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1999-12-12 21:45:34 +0000
committerJim Meyering <jim@meyering.net>1999-12-12 21:45:34 +0000
commit488028199d4db9f2eb35921e9d1e10181c53dd7d (patch)
tree75e985f7d8332d44327b16c1653f600a6913b7c7
parentc71815ac7b6a93dc1e2fffda15c73fec072effd9 (diff)
downloadcoreutils-488028199d4db9f2eb35921e9d1e10181c53dd7d.tar.xz
(S_IRUSR, S_IRGRP, S_IWGRP, S_IROTH, S_IWOTH): Define
if not defined. This was necessary on a NeXT Turbostation running Mach 3.3. Reported by Nelson H. F. Beebe.
-rw-r--r--src/system.h57
1 files changed, 33 insertions, 24 deletions
diff --git a/src/system.h b/src/system.h
index 4e2be1d46..928ee1b7b 100644
--- a/src/system.h
+++ b/src/system.h
@@ -80,48 +80,57 @@
# define S_ISVTX 01000
#endif
-#if !S_IWUSR
-# if S_IWRITE
-# define S_IWUSR S_IWRITE
-# else
-# define S_IWUSR 00200
-# endif
+#if !S_IRUSR && S_IREAD
+# define S_IRUSR S_IREAD
#endif
-
-#ifndef S_IWUSR
-# ifdef S_IWRITE
-# define S_IWUSR S_IWRITE
-# else
-# define S_IWUSR 00200
-# endif
+#if !S_IRUSR
+# define S_IRUSR 00400
+#endif
+#if !S_IRGRP
+# define S_IRGRP (S_IRUSR >> 3)
+#endif
+#if !S_IROTH
+# define S_IROTH (S_IRUSR >> 6)
#endif
-#ifndef S_IEXEC
-# define S_IEXEC S_IXUSR
+#if !S_IWUSR && S_IWRITE
+# define S_IWUSR S_IWRITE
+#endif
+#if !S_IWUSR
+# define S_IWUSR 00200
+#endif
+#if !S_IWGRP
+# define S_IWGRP (S_IWUSR >> 3)
+#endif
+#if !S_IWOTH
+# define S_IWOTH (S_IWUSR >> 6)
#endif
-#ifndef S_IXUSR
+#if !S_IXUSR && S_IEXEC
# define S_IXUSR S_IEXEC
#endif
-#ifndef S_IXGRP
-# define S_IXGRP (S_IEXEC >> 3)
+#if !S_IXUSR
+# define S_IXUSR 00100
+#endif
+#if !S_IXGRP
+# define S_IXGRP (S_IXUSR >> 3)
#endif
-#ifndef S_IXOTH
-# define S_IXOTH (S_IEXEC >> 6)
+#if !S_IXOTH
+# define S_IXOTH (S_IXUSR >> 6)
#endif
-#ifndef S_IRWXU
+#if !S_IRWXU
# define S_IRWXU (S_IRUSR | S_IWUSR | S_IXUSR)
#endif
-#ifndef S_IRWXG
+#if !S_IRWXG
# define S_IRWXG (S_IRGRP | S_IWGRP | S_IXGRP)
#endif
-#ifndef S_IRWXO
+#if !S_IRWXO
# define S_IRWXO (S_IROTH | S_IWOTH | S_IXOTH)
#endif
/* S_IXUGO is a common extension to POSIX.1. */
-#ifndef S_IXUGO
+#if !S_IXUGO
# define S_IXUGO (S_IXUSR | S_IXGRP | S_IXOTH)
#endif