summaryrefslogtreecommitdiff
path: root/lib/lchown.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1999-09-19 16:46:50 +0000
committerJim Meyering <jim@meyering.net>1999-09-19 16:46:50 +0000
commit8e0c33f8ead193518920bc26fc3cdf4da313842a (patch)
treeb6e0f0fa98269f7a9bf46ecb8ded04dd1ba1c1a7 /lib/lchown.c
parent16155b0807d60621c489d04d2d501baa2f91af80 (diff)
downloadcoreutils-8e0c33f8ead193518920bc26fc3cdf4da313842a.tar.xz
[STAT_MACROS_BROKEN] (S_ISLNK): Undefine.
(S_ISLNK): Define if necessary. This is necessary on a NEC SX-4 with SUPER-UX 9.1.
Diffstat (limited to 'lib/lchown.c')
-rw-r--r--lib/lchown.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/lchown.c b/lib/lchown.c
index 9c420bb09..391f5ca98 100644
--- a/lib/lchown.c
+++ b/lib/lchown.c
@@ -27,6 +27,14 @@ extern int errno;
#endif
#include "lchown.h"
+#ifdef STAT_MACROS_BROKEN
+# undef S_ISLNK
+#endif
+#if !defined(S_ISLNK) && defined(S_IFLNK)
+# define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK)
+#endif
+
+
/* Declare chown to avoid a warning. Don't include unistd.h,
because it may have a conflicting prototype for lchown. */
int chown ();