aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/make
diff options
context:
space:
mode:
authorWill Andrews <will@FreeBSD.org>2001-01-21 08:24:41 +0000
committerWill Andrews <will@FreeBSD.org>2001-01-21 08:24:41 +0000
commite3cb529472258dce535b4503934d6141c6562b85 (patch)
tree5aec6402c500a3b62484051cab73fd97619ada39 /usr.bin/make
parent012b895034f9c0f7343e81213e2643634e793506 (diff)
Notes
Diffstat (limited to 'usr.bin/make')
-rw-r--r--usr.bin/make/dir.c15
-rw-r--r--usr.bin/make/make.h2
-rw-r--r--usr.bin/make/util.c3
3 files changed, 9 insertions, 11 deletions
diff --git a/usr.bin/make/dir.c b/usr.bin/make/dir.c
index f92073186c9ce..0c16cc8f2268f 100644
--- a/usr.bin/make/dir.c
+++ b/usr.bin/make/dir.c
@@ -1067,15 +1067,14 @@ Dir_AddDir (path, name)
}
#endif /* sun && d_ino */
- /* Skip the '.' and '..' entries by checking for them specifically
- * instead of assuming readdir() reuturns them in that order when
- * first going through a directory. This is needed for XFS over
- * NFS filesystems since SGI does not guarantee that these are the
- * first two entries returned from readdir().
+ /* Skip the '.' and '..' entries by checking for them
+ * specifically instead of assuming readdir() reuturns them in
+ * that order when first going through a directory. This is
+ * needed for XFS over NFS filesystems since SGI does not
+ * guarantee that these are * the first two entries returned
+ * from readdir().
*/
- if (dp->d_name[0] == '.' &&
- (dp->d_name[1] == NULL ||
- (dp->d_name[1] == '.' && dp->d_name[2] == NULL)))
+ if (ISDOT(dp->d_name) || ISDOTDOT(dp->d_name))
continue;
(void)Hash_CreateEntry(&p->files, dp->d_name, (Boolean *)NULL);
diff --git a/usr.bin/make/make.h b/usr.bin/make/make.h
index 003663b9f1334..81aabcb865fc3 100644
--- a/usr.bin/make/make.h
+++ b/usr.bin/make/make.h
@@ -365,6 +365,8 @@ extern int debug;
#endif /* __STDC__ */
#define DEBUG(module) (debug & CONCAT(DEBUG_,module))
+#define ISDOT(c) ((c)[0] == '.' && (((c)[1] == '\0') || ((c)[1] == '/')))
+#define ISDOTDOT(c) ((c)[0] == '.' && ISDOT(&((c)[1])))
/*
* Since there are so many, all functions that return non-integer values are
diff --git a/usr.bin/make/util.c b/usr.bin/make/util.c
index 80197b9ba8fdc..67054c245e8f2 100644
--- a/usr.bin/make/util.c
+++ b/usr.bin/make/util.c
@@ -155,9 +155,6 @@ signal(s, a)) ()
#ifndef DEV_DEV_COMPARE
# define DEV_DEV_COMPARE(a, b) ((a) == (b))
#endif
-#define ISDOT(c) ((c)[0] == '.' && (((c)[1] == '\0') || ((c)[1] == '/')))
-#define ISDOTDOT(c) ((c)[0] == '.' && ISDOT(&((c)[1])))
-
/* strrcpy():
* Like strcpy, going backwards and returning the new pointer