summaryrefslogtreecommitdiff
path: root/src/basic/def.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/basic/def.h')
-rw-r--r--src/basic/def.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/basic/def.h b/src/basic/def.h
index b33f9ae76a..950f693899 100644
--- a/src/basic/def.h
+++ b/src/basic/def.h
@@ -75,3 +75,18 @@
#define NOTIFY_FD_MAX 768
#define NOTIFY_BUFFER_MAX PIPE_BUF
+
+/* Return a nulstr for a standard cascade of configuration directories,
+ * suitable to pass to conf_files_list_nulstr or config_parse_many. */
+#define CONF_DIRS_NULSTR(n) \
+ "/etc/" n ".d\0" \
+ "/run/" n ".d\0" \
+ "/usr/local/lib/" n ".d\0" \
+ "/usr/lib/" n ".d\0" \
+ CONF_DIR_SPLIT_USR(n)
+
+#ifdef HAVE_SPLIT_USR
+#define CONF_DIR_SPLIT_USR(n) "/lib/" n ".d\0"
+#else
+#define CONF_DIR_SPLIT_USR(n)
+#endif