summaryrefslogtreecommitdiff
path: root/m4/acl.m4
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2015-05-27 17:46:15 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2015-05-27 17:55:06 -0700
commit6c52e9b93b68795d1876718d8f3c1d57bf7f6d91 (patch)
treeb2d93b1121c05cfffa59df9325139cdf56eed6c0 /m4/acl.m4
parentcc41938ae0f5694d657f360f19dd9ac166271db2 (diff)
downloademacs-6c52e9b93b68795d1876718d8f3c1d57bf7f6d91.tar.gz
Merge from gnulib
This incorporates: 2015-05-27 qacl: Reimplement qset_acl and qcopy_acl (Bug#20666) 2015-05-27 file-has-acl: Split feature tests again (Bug#20667) 2015-05-27 string: fix build failure on BSD/OSX with FORTIFY_SOURCE 2015-05-26 stdio: limit __gnu_printf__ witness to gcc 4.4+ 2015-05-26 inttypes: force correct mingw PRIdMAX even without <stdio.h> 2015-05-26 stdio: fix probe on mingw under gcc 5.1 * admin/merge-gnulib (GNULIB_MODULES): Replace qacl with qcopy-acl, since we don't need the rest of qacl. * doc/misc/texinfo.tex, lib/acl-internal.c, lib/acl-internal.h: * lib/inttypes.in.h, lib/qcopy-acl.c, lib/qset-acl.c: * lib/string.in.h, m4/acl.m4, m4/stdio_h.m4: Get latest versions from gnulib. * lib/get-permissions.c, lib/set-permissions.c: New files. * lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate. * nt/gnulib.mk: Merge lib/gnulib.mk changes by hand.
Diffstat (limited to 'm4/acl.m4')
-rw-r--r--m4/acl.m424
1 files changed, 5 insertions, 19 deletions
diff --git a/m4/acl.m4 b/m4/acl.m4
index b8f4660f7e3..5da6a43ab6a 100644
--- a/m4/acl.m4
+++ b/m4/acl.m4
@@ -1,5 +1,5 @@
# acl.m4 - check for access control list (ACL) primitives
-# serial 19
+# serial 20
# Copyright (C) 2002, 2004-2015 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
@@ -181,26 +181,12 @@ AC_DEFUN([gl_FILE_HAS_ACL],
[
AC_REQUIRE([gl_FUNC_ACL_ARG])
if test "$enable_acl" != no; then
- AC_CACHE_CHECK([for getxattr with XATTR_NAME_POSIX_ACL macros],
- [gl_cv_getxattr_with_posix_acls],
- [gl_cv_getxattr_with_posix_acls=no
- AC_LINK_IFELSE(
- [AC_LANG_PROGRAM(
- [[#include <sys/types.h>
- #include <sys/xattr.h>
- #include <linux/xattr.h>
- ]],
- [[ssize_t a = getxattr (".", XATTR_NAME_POSIX_ACL_ACCESS, 0, 0);
- ssize_t b = getxattr (".", XATTR_NAME_POSIX_ACL_DEFAULT, 0, 0);
- return a < 0 || b < 0;
- ]])],
- [gl_cv_getxattr_with_posix_acls=yes])])
+ AC_CHECK_HEADERS([linux/xattr.h])
+ AC_CHECK_HEADERS([sys/xattr.h],
+ [AC_CHECK_FUNCS([getxattr])])
fi
- if test "$gl_cv_getxattr_with_posix_acls" = yes; then
+ if test "$ac_cv_header_sys_xattr_h,$ac_cv_func_getxattr" = yes,yes; then
LIB_HAS_ACL=
- AC_DEFINE([GETXATTR_WITH_POSIX_ACLS], 1,
- [Define to 1 if getxattr works with XATTR_NAME_POSIX_ACL_ACCESS
- and XATTR_NAME_POSIX_ACL_DEFAULT.])
else
dnl Set gl_need_lib_has_acl to a nonempty value, so that any
dnl later gl_FUNC_ACL call will set LIB_HAS_ACL=$LIB_ACL.