summaryrefslogtreecommitdiff
path: root/lib/euidaccess.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1994-11-03 22:03:16 +0000
committerJim Meyering <jim@meyering.net>1994-11-03 22:03:16 +0000
commit17a29b6eea6539100f722fc37e5bec8aa9b8da0b (patch)
tree98bc5df15efc3c4c45d6b12c301bd56b7b1b89ad /lib/euidaccess.c
parent8d447abdbfee07bf32f1222534e47162874370a7 (diff)
downloadcoreutils-17a29b6eea6539100f722fc37e5bec8aa9b8da0b.tar.xz
Define S_IXUSR, S_IXGRP, and S_IXOTH in terms of _IEXEC if they're not
already defined. Reported by Daniel Hagerty <hag@gnu.ai.mit.edu>.
Diffstat (limited to 'lib/euidaccess.c')
-rw-r--r--lib/euidaccess.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/euidaccess.c b/lib/euidaccess.c
index 1073c9741..00d6a9569 100644
--- a/lib/euidaccess.c
+++ b/lib/euidaccess.c
@@ -24,6 +24,18 @@
#include <sys/types.h>
#include <sys/stat.h>
+#ifdef S_IEXEC
+#ifndef S_IXUSR
+#define S_IXUSR S_IEXEC
+#endif
+#ifndef S_IXGRP
+#define S_IXGRP (S_IEXEC >> 3)
+#endif
+#ifndef S_IXOTH
+#define S_IXOTH (S_IEXEC >> 6)
+#endif
+#endif /* S_IEXEC */
+
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif