+2015-06-29 Paul Eggert <eggert@cs.ucla.edu>
+
+ mgetgroups: port to strict OS X
+ * doc/glibc-functions/getgrouplist.texi (getgrouplist):
+ Document the getgrouplist problem.
+ * lib/mgetgroups.c (getgrouplist_gids) [HAVE_GETGROUPLIST]:
+ New macro.
+ (mgetgroups): Use it.
+ * m4/mgetgroups.m4 (gl_MGETGROUPS):
+ Check for OS X signature for getgrouplist.
+
2015-06-29 Jim Meyering <meyering@fb.com>
linkat: fix invalid definition of LINKAT_SYMLINK_NOTSUP on OS X
-#serial 6
+#serial 7
dnl Copyright (C) 2007-2015 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
AC_CACHE_CHECK([for getgrouplist with int signature],
[gl_cv_getgrouplist_with_int],
[gl_cv_getgrouplist_with_int=no
+ gl_save_c_werror_flag=$ac_c_werror_flag
+ ac_c_werror_flag=yes
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM(
[[#if HAVE_GRP_H
#endif
int groups[1];
int ngroups = 1;
- int getgrouplist (char const *, gid_t, gid_t *, int *);
]],
- [[
- return - getgrouplist ("root", 0, groups, &ngroups);
- ]])],
+ [[return - getgrouplist ("root", 0, groups, &ngroups);]])],
[],
[AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM(
#endif
int groups[sizeof (gid_t) == sizeof (int) ? 1 : -1];
int ngroups = 1;
- int getgrouplist (char const *, int, int *, int *);
]],
- [[
- return - getgrouplist ("root", 0, groups, &ngroups);
- ]])],
- [gl_cv_getgrouplist_with_int=yes])])])
+ [[return - getgrouplist ("root", 0, groups, &ngroups);]])],
+ [gl_cv_getgrouplist_with_int=yes])])
+ ac_c_werror_flag=$gl_save_c_werror_flag])
if test "$gl_cv_getgrouplist_with_int" = yes; then
AC_DEFINE([HAVE_GETGROUPLIST_WITH_INT], 1,
[Define to 1 if getgrouplist accepts and returns int and not gid_t.])