X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fbasic%2Fpath-util.h;h=a4c80493cc972238b839f299f198fe9378abaebc;hb=aa63b97173e12293234cce3b378912eb761778e1;hp=4d284d23cfe309f12470c24c220c63bd4d52cc3a;hpb=2f30582bd3d00ce582d190ddb379e46e0a67f813;p=elogind.git diff --git a/src/basic/path-util.h b/src/basic/path-util.h index 4d284d23c..a4c80493c 100644 --- a/src/basic/path-util.h +++ b/src/basic/path-util.h @@ -74,6 +74,18 @@ static inline bool path_equal_ptr(const char *a, const char *b) { }) #if 0 /// UNNEEDED by elogind +#define PATH_STARTSWITH_SET(p, ...) \ + ({ \ + char **s; \ + bool _found = false; \ + STRV_FOREACH(s, STRV_MAKE(__VA_ARGS__)) \ + if (path_startswith(p, *s)) { \ + _found = true; \ + break; \ + } \ + _found; \ + }) + int path_strv_make_absolute_cwd(char **l); #endif // 0 char** path_strv_resolve(char **l, const char *root);