From: Bruno Haible Date: Thu, 23 Aug 2018 19:13:19 +0000 (+0200) Subject: getcwd: Add cross-compilation guesses. X-Git-Tag: v1.0~5458 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=a96d2e67052c879b1bcc5bc461722beac75fc372;p=gnulib.git getcwd: Add cross-compilation guesses. Reported by Sergio Durigan Junior in . Based on a patch by Paul Eggert. * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Add cross-compilation guesses for all GNU systems. --- diff --git a/ChangeLog b/ChangeLog index f43e4006fe..acd3e2a053 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2018-08-23 Bruno Haible + + getcwd: Add cross-compilation guesses. + Reported by Sergio Durigan Junior in + . + Based on a patch by Paul Eggert. + * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Add cross-compilation + guesses for all GNU systems. + 2018-08-19 Bruno Haible glob-h: Formalize side effects from other modules. diff --git a/m4/getcwd-path-max.m4 b/m4/getcwd-path-max.m4 index e312bd475a..90b1efff69 100644 --- a/m4/getcwd-path-max.m4 +++ b/m4/getcwd-path-max.m4 @@ -1,4 +1,4 @@ -# serial 20 +# serial 21 # Check for several getcwd bugs with long file names. # If so, arrange to compile the wrapper function. @@ -209,9 +209,21 @@ main () 32) gl_cv_func_getcwd_path_max='yes, but with shorter paths';; *) gl_cv_func_getcwd_path_max=no;; esac], - [case "$host_os" in - aix*) gl_cv_func_getcwd_path_max='no, it has the AIX bug';; - *) gl_cv_func_getcwd_path_max=no;; - esac]) + [# Cross-compilation guesses: + case "$host_os" in + aix*) # On AIX, it has the AIX bug. + gl_cv_func_getcwd_path_max='no, it has the AIX bug' ;; + gnu*) # On Hurd, it is 'yes'. + gl_cv_func_getcwd_path_max=yes ;; + linux* | kfreebsd*) + # On older Linux+glibc it's 'no, but it is partly working', + # on newer Linux+glibc it's 'yes'. + # On Linux+musl libc, it's 'no, but it is partly working'. + # On kFreeBSD+glibc, it's 'no, but it is partly working'. + gl_cv_func_getcwd_path_max='no, but it is partly working' ;; + *) # If we don't know, assume the worst. + gl_cv_func_getcwd_path_max=no ;; + esac + ]) ]) ])