summaryrefslogtreecommitdiff
path: root/lib/modechange.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1994-07-01 13:46:42 +0000
committerJim Meyering <jim@meyering.net>1994-07-01 13:46:42 +0000
commit11023e1493cd36f433d01e6718a25f961728a27d (patch)
treeb31207d9211648dc7ac9078890f222179cfa1028 /lib/modechange.c
parent1cf80189acddc9074d534443a12952988d19a9af (diff)
downloadcoreutils-11023e1493cd36f433d01e6718a25f961728a27d.tar.xz
.
Diffstat (limited to 'lib/modechange.c')
-rw-r--r--lib/modechange.c22
1 files changed, 21 insertions, 1 deletions
diff --git a/lib/modechange.c b/lib/modechange.c
index b09661d0c..e1212e90a 100644
--- a/lib/modechange.c
+++ b/lib/modechange.c
@@ -24,6 +24,17 @@
changing the mode of many files, this probably results in a
performance gain. */
+#ifdef HAVE_CONFIG_H
+#if defined (CONFIG_BROKETS)
+/* We use <config.h> instead of "config.h" so that a compilation
+ using -I. -I$srcdir will use ./config.h rather than $srcdir/config.h
+ (which it would do because it found this file in $srcdir). */
+#include <config.h>
+#else
+#include "config.h"
+#endif
+#endif
+
#include <sys/types.h>
#include <sys/stat.h>
#include "modechange.h"
@@ -38,7 +49,13 @@ char *malloc ();
#define NULL 0
#endif
-#ifndef S_ISDIR
+#ifdef STAT_MACROS_BROKEN
+#ifdef S_ISDIR
+#undef S_ISDIR
+#endif
+#endif /* STAT_MACROS_BROKEN. */
+
+#if !defined(S_ISDIR) && defined(S_IFDIR)
#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
#endif
@@ -95,6 +112,9 @@ mode_compile (mode_string, masked_ops)
umask (umask_value); /* Restore the old value. */
head = NULL;
+#ifdef lint
+ change = NULL;
+#endif
--mode_string;
/* One loop iteration for each "ugoa...=+-rwxXstugo...[=+-rwxXstugo...]". */