[vlc-devel] [PATCH v2 11/18] configure: Test if pathconf exists

Rémi Denis-Courmont remi at remlab.net
Mon Mar 13 20:20:33 CET 2017


Le maanantaina 13. maaliskuuta 2017, 12.36.57 EET Dennis Hamester a écrit :
> diff --git a/src/posix/filesystem.c b/src/posix/filesystem.c
> index f4d0e2691f..f3e09f8fd9 100644
> --- a/src/posix/filesystem.c
> +++ b/src/posix/filesystem.c
> @@ -187,7 +187,13 @@ int vlc_rename (const char *oldpath, const char
> *newpath)
> 
>  char *vlc_getcwd (void)
>  {
> -    long path_max = pathconf (".", _PC_PATH_MAX);
> +    long path_max;
> +#ifdef HAVE_PATHCONF
> +    path_max = pathconf (".", _PC_PATH_MAX);
> +#else
> +    path_max = -1;
> +#endif
> +
>      size_t size = (path_max == -1 || path_max > 4096) ? 4096 : path_max;
> 
>      for (;; size *= 2)

pathconf() is not optional in POSIX / src/posix. No thanks.

-- 
雷米‧德尼-库尔蒙
https://www.remlab.net/



More information about the vlc-devel mailing list