summaryrefslogtreecommitdiff
path: root/source4/include
diff options
context:
space:
mode:
Diffstat (limited to 'source4/include')
-rw-r--r--source4/include/system/dir.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/source4/include/system/dir.h b/source4/include/system/dir.h
index 07a732e206..ce6aae0264 100644
--- a/source4/include/system/dir.h
+++ b/source4/include/system/dir.h
@@ -40,3 +40,22 @@
#ifndef HAVE_MKDIR_MODE
#define mkdir(dir, mode) mkdir(dir)
#endif
+
+/* Test whether a file name is the "." or ".." directory entries.
+ * These really should be inline functions.
+ */
+#ifndef ISDOT
+#define ISDOT(path) ( \
+ *((const char *)path) == '.' && \
+ *(((const char *)path) + 1) == '\0' \
+ )
+#endif
+
+#ifndef ISDOTDOT
+#define ISDOTDOT(path) ( \
+ *((const char *)path) == '.' && \
+ *(((const char *)path) + 1) == '.' && \
+ *(((const char *)path) + 2) == '\0' \
+ )
+#endif
+