]> git.eshelyaron.com Git - emacs.git/commitdiff
Update from Gnulib by running admin/merge-gnulib
authorPaul Eggert <eggert@cs.ucla.edu>
Fri, 17 Jan 2025 07:19:27 +0000 (23:19 -0800)
committerEshel Yaron <me@eshelyaron.com>
Fri, 17 Jan 2025 11:48:53 +0000 (12:48 +0100)
(cherry picked from commit bc4c5818dfb3c16f817514d3ae3bc074b4c4c007)

lib/file-has-acl.c
lib/getopt-pfx-core.h
lib/gnulib.mk.in
m4/gnulib-comp.m4

index e8413f8f85f928cff19f757c64e0592d67e25c9a..c02cfee842bf5f7f847d641d28a4081b4e0f1aa3 100644 (file)
@@ -101,14 +101,15 @@ enum {
 
 /* AI indicates XATTR may be present but wasn't accessible.
    This is the case when [l]listxattr failed with E2BIG,
-   or failed with EACCES which in Linux kernel 6.12 NFS can mean merely
-   that we lack read access.
+   or is not supported (!acl_errno_valid()), or failed with EACCES
+   which in Linux kernel 6.12 NFS can mean merely that we lack read access.
 */
 
 static bool
 aclinfo_may_indicate_xattr (struct aclinfo const *ai)
 {
-  return ai->size < 0 && (ai->u.err == EACCES || ai->u.err == E2BIG);
+  return ai->size < 0 && (!acl_errno_valid (ai->u.err)
+                          || ai->u.err == EACCES || ai->u.err == E2BIG);
 }
 
 /* Does NAME have XATTR?  */
index 391c7af8e71562023c977c9970eb14fdb66ed75b..7c5ea0946838691a129c3124ab618a5306b5b4eb 100644 (file)
@@ -37,6 +37,9 @@
 # if defined _AIX || defined __hpux || defined __sun || defined __QNX__
 #  include <stdio.h>
 # endif
+# if defined MUSL_LIBC || (defined __FreeBSD__ || defined __DragonFly__) || defined __NetBSD__ || defined __OpenBSD__ || (defined __APPLE__ && defined __MACH__) || defined _AIX || defined __sun || defined __minix || defined __HAIKU__
+#  include <unistd.h>
+# endif
 
 # ifndef __GETOPT_ID
 #  define __GETOPT_CONCAT(x, y) x ## y
index b1f0053e582f4b581224a65673419e976c97c380..ce874048f4ab0f403f91971e7a126c890a30ba22 100644 (file)
@@ -2616,17 +2616,17 @@ ifneq (,$(GL_GENERATE_GMP_H_CONDITION))
 ifneq (,$(GL_GENERATE_MINI_GMP_H_CONDITION))
 # Build gmp.h as a wrapper for mini-gmp.h when using mini-gmp.
 gmp.h: $(top_builddir)/config.status
-       echo '#include "mini-gmp.h"' > $@-t
-       echo '#if GNULIB_LIBGMP_MPQ' >> $@-t
-       echo '# include "mini-mpq.h"' >> $@-t
-       echo '#endif' >> $@-t
-       mv $@-t $@
+       $(gl_V_at)echo '#include "mini-gmp.h"' > $@-t
+       $(AM_V_at)echo '#if GNULIB_LIBGMP_MPQ' >> $@-t
+       $(AM_V_at)echo '# include "mini-mpq.h"' >> $@-t
+       $(AM_V_at)echo '#endif' >> $@-t
+       $(AM_V_at)mv $@-t $@
 endif
 ifneq (,$(GL_GENERATE_GMP_GMP_H_CONDITION))
 # Build gmp.h as a wrapper for gmp/gmp.h.
 gmp.h: $(top_builddir)/config.status
-       echo '#include <gmp/gmp.h>' > $@-t
-       mv $@-t $@
+       $(gl_V_at)echo '#include <gmp/gmp.h>' > $@-t
+       $(AM_V_at)mv $@-t $@
 endif
 else
 gmp.h: $(top_builddir)/config.status
index 771181cb1bf210c503dff67b390c1c21517f1bee..dd083cae05defe7bb75ee784cfacc921624a7a37 100644 (file)
@@ -388,6 +388,7 @@ AC_DEFUN([gl_INIT],
     gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNISTD_H_GETOPT], [1])
   ])
   gl_UNISTD_MODULE_INDICATOR([getopt-posix])
+  gl_MUSL_LIBC
   AC_REQUIRE([AC_CANONICAL_HOST])
   gl_FUNC_GETRANDOM
   gl_CONDITIONAL([GL_COND_OBJ_GETRANDOM],