@kugel- commented on this pull request.
@@ -2414,6 +2419,48 @@ void utils_start_new_geany_instance(const gchar *doc_path)
}
+ +static int get_path_max(const char *path) +{ +#ifdef PATH_MAX + return PATH_MAX; +#else + int path_max = pathconf(path, _PC_PATH_MAX); + if (path_max <= 0) + path_max = 4096; + return path_max; +#endif
Sounds like a plan. The man page says you can pass NULL since glibc v2.3, and Ubuntu 18.04 has glibc v2.31 (and a BSD manpage agress as well) so it seems to be supported well.