site: set getcwd() behaviour for long paths for glibc / musl

In glibc, getcwd() handles long file names properly, on
musl, getcwd() only works up to PATH_MAX directory depths.

Configuring the autotools (gnulib) test result here allows
coreutils to compile more optimised code for both platforms,
rather than being pessimistic and re-implementing everything
itself.

The difference in behaviour is because both do the kernel
getcwd syscall (which only supports up to PATH_MAX), but
glibc implements fallbacks for longer paths, while musl
doesn't.

(From OE-Core rev: 525e33cf99983ee4bc3cf1822364123551aa7c83)

Signed-off-by: André Draszik <git@andred.net>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
André Draszik
2020-01-10 16:52:53 +00:00
committed by Richard Purdie
parent e594841ef5
commit a1a0fa1317
2 changed files with 2 additions and 0 deletions

View File

@@ -30,6 +30,7 @@ ac_cv_func_mmap_fixed_mapped=${ac_cv_func_mmap_fixed_mapped=yes}
# coreutils
fu_cv_sys_stat_statfs2_bsize=${fu_cv_sys_stat_statfs2_bsize=yes}
gl_cv_func_getcwd_null=${gl_cv_func_getcwd_null=yes}
gl_cv_func_getcwd_path_max=${gl_cv_func_getcwd_path_max=yes}
gl_cv_func_working_mkstemp=${gl_cv_func_working_mkstemp=yes}
# glib

View File

@@ -35,6 +35,7 @@ bash_cv_sys_siglist=${bash_cv_sys_siglist=no}
# coreutils
fu_cv_sys_stat_statfs2_bsize=${fu_cv_sys_stat_statfs2_bsize=yes}
gl_cv_func_getcwd_null=${gl_cv_func_getcwd_null=yes}
gl_cv_func_getcwd_path_max=${gl_cv_func_getcwd_path_max='no, but it is partly working'}
gl_cv_func_gettimeofday_clobber=${gl_cv_func_gettimeofday_clobber=no}
gl_cv_func_tzset_clobber=${gl_cv_func_tzset_clobber=no}
gl_cv_func_gettimeofday_posix_signature=${gl_cv_func_gettimeofday_posix_signature=yes}