summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2016-02-09 09:06:40 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2016-02-09 09:07:23 -0800
commitf2e9d1b3847d43206e8b0d05e5b64335d2c0b36f (patch)
treed8a42809212f10a17deb9f0bd53073d2187469cd /m4
parent815439eadc0ac0fb442be9f1269eadbf37471ff6 (diff)
Sync with gnulib
This incorporates: 2016-02-09 stdalign: port to clang 3.7.0 2016-02-06 misc: port better to gcc -fsanitize=address * doc/misc/texinfo.tex, lib/stdalign.in.h, m4/acl.m4, m4/getgroups.m4: Copy from gnulib.
Diffstat (limited to 'm4')
-rw-r--r--m4/acl.m47
-rw-r--r--m4/getgroups.m46
2 files changed, 7 insertions, 6 deletions
diff --git a/m4/acl.m4 b/m4/acl.m4
index 0f963374dc..ce0fe6bc1e 100644
--- a/m4/acl.m4
+++ b/m4/acl.m4
@@ -1,5 +1,5 @@
# acl.m4 - check for access control list (ACL) primitives
-# serial 21
+# serial 22
# Copyright (C) 2002, 2004-2016 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
@@ -163,9 +163,8 @@ AC_DEFUN([gl_ACL_GET_FILE],
#include <sys/acl.h>
#include <errno.h>
]],
- [[if (!acl_get_file (".", ACL_TYPE_ACCESS) && errno == ENOENT)
- return 1;
- return 0;
+ [[acl_t acl = acl_get_file (".", ACL_TYPE_ACCESS);
+ return acl ? acl_free (acl) != 0 : errno == ENOENT;
]])],
[if test $cross_compiling = yes; then
gl_cv_func_working_acl_get_file="guessing yes"
diff --git a/m4/getgroups.m4 b/m4/getgroups.m4
index 4b1573d865..bf01f32eef 100644
--- a/m4/getgroups.m4
+++ b/m4/getgroups.m4
@@ -1,4 +1,4 @@
-# serial 18
+# serial 19
dnl From Jim Meyering.
dnl A wrapper around AC_FUNC_GETGROUPS.
@@ -87,7 +87,9 @@ AC_DEFUN([gl_FUNC_GETGROUPS],
[AC_RUN_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT],
[[int size = getgroups (0, 0);
gid_t *list = malloc (size * sizeof *list);
- return getgroups (-1, list) != -1;]])],
+ int result = getgroups (-1, list) != -1;
+ free (list);
+ return result;]])],
[gl_cv_func_getgroups_works=yes],
[gl_cv_func_getgroups_works=no],
[case "$host_os" in