X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/d16fb740912bf4874e7087f6f419427516047977..99fe98d37a39d26f5dea424926d0e0a082655fe5:/m4/getgroups.m4 diff --git a/m4/getgroups.m4 b/m4/getgroups.m4 index 16e72c7bf3..bf01f32eef 100644 --- a/m4/getgroups.m4 +++ b/m4/getgroups.m4 @@ -1,9 +1,9 @@ -# serial 18 +# serial 19 dnl From Jim Meyering. dnl A wrapper around AC_FUNC_GETGROUPS. -# Copyright (C) 1996-1997, 1999-2004, 2008-2015 Free Software Foundation, Inc. +# Copyright (C) 1996-1997, 1999-2004, 2008-2016 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -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