X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fshared%2Fmacro.h;h=6d4712c30d779ac9889a605b1201f9ad18a5c0ec;hb=0c124f8b2c93d2c7d6eefca3bdc59b28250fc077;hp=9ee332c8dfaf74c4e0a0b8b2b0350d8db7446a98;hpb=667a0377fb25ddb0c3efbc43d186ffd4c097ce41;p=elogind.git diff --git a/src/shared/macro.h b/src/shared/macro.h index 9ee332c8d..6d4712c30 100644 --- a/src/shared/macro.h +++ b/src/shared/macro.h @@ -384,6 +384,21 @@ do { \ _found; \ }) +/* 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 + /* Define C11 thread_local attribute even on older gcc compiler * version */ #ifndef thread_local