summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2016-02-09 14:26:40 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2016-02-09 14:26:40 -0800
commit8456ba1d493d5e5b46e450d0e8b2dd1577f246ab (patch)
tree9b57b19f6591e3c8f673e6152bfb9828c1940967 /m4
parent0e7b901b905fb8db3c7e391661f1510e96ff3814 (diff)
parent145a11e1a3417d0fef60148296f2e8f97e09d5e9 (diff)
-
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