bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: getcwd replacement + cross compilation


From: Bruno Haible
Subject: Re: getcwd replacement + cross compilation
Date: Thu, 23 Aug 2018 21:15:29 +0200
User-agent: KMail/5.1.3 (Linux/4.4.0-130-generic; KDE/5.18.0; x86_64; ; )

>                   gl_cv_func_getcwd_abort_bug   gl_cv_func_getcwd_path_max
> 
> Linux CentOS 5                 no                no, but it is partly working
> Linux CentOS 6                 no                no, but it is partly working
> Linux CentOS 7                 no                yes
> Linux Alpine 3.7 (musl libc)   no                no, but it is partly working
> Linux alpha (Debian 5)         no                no, but it is partly working
> kFreeBSD                       yes               no, but it is partly working
> Hurd                           no                yes
> AIX 7.1                        no                no, it has the AIX bug

Based on these results, I pushed this:


2018-08-23  Bruno Haible  <address@hidden>

        getcwd: Add cross-compilation guesses.
        Reported by Sergio Durigan Junior <address@hidden> in
        <https://lists.gnu.org/archive/html/bug-gnulib/2018-08/msg00130.html>.
        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/m4/getcwd-path-max.m4 b/m4/getcwd-path-max.m4
index e312bd4..90b1eff 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
+       ])
     ])
 ])




reply via email to

[Prev in Thread] Current Thread [Next in Thread]