.
[gnulib.git] / lib / modechange.c
index b09661d..8eb8dc5 100644 (file)
    changing the mode of many files, this probably results in a
    performance gain. */
 
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
 #include <sys/types.h>
 #include <sys/stat.h>
 #include "modechange.h"
@@ -38,7 +42,11 @@ char *malloc ();
 #define NULL 0
 #endif
 
-#ifndef S_ISDIR
+#ifdef STAT_MACROS_BROKEN
+#undef S_ISDIR
+#endif /* STAT_MACROS_BROKEN.  */
+
+#if !defined(S_ISDIR) && defined(S_IFDIR)
 #define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
 #endif
 
@@ -95,6 +103,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...]". */