]> code.ossystems Code Review - openembedded-core.git/commitdiff
site: set getcwd() behaviour for long paths for glibc / musl
authorAndré Draszik <git@andred.net>
Fri, 10 Jan 2020 16:52:53 +0000 (16:52 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 11 Jan 2020 09:17:20 +0000 (09:17 +0000)
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.

Signed-off-by: André Draszik <git@andred.net>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/site/common-glibc
meta/site/common-musl

index e5085f518fd45788a4375b2013b3be5e8173df39..1f6175ba937ca498b59e77a77cf802b6e6b63585 100644 (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
index 0c9d21e0b7e7ba68153298c5cf9a8388cd8dd463..c8113755aaed297d3412fdbf5669b7cb290f74e7 100644 (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}