mirror of
https://git.savannah.gnu.org/git/gnulib.git
synced 2025-08-14 14:01:48 +03:00
This is for Emacs, which has its own allocator and where we don't want to use xalloc. * lib/group-member.c: Include xalloc-oversized.h, not xalloc.h, since we no longer use xmalloc. Do not include stdbool.h, since the changes below happen to remove the only use of bool. (GROUPBUF_SIZE): New constant. (struct group_info): Remove n_groups member. Add groupbuf member. This lets us get the groups without using malloc, usually. (free_group_info, get_group_info): Adjust to this. (get_group_info): Return the number of groups found, or -1 on error. Use plain malloc not xmalloc, and treat its failure as if there are no groups, as the user already loses in case of error. (group_member): Simplify, based on changes to get_group_info. * modules/group-member (Depends-on): Remove dependencies on xalloc and stdbool. Add dependency on xalloc-oversized.
32 lines
510 B
Plaintext
32 lines
510 B
Plaintext
Description:
|
|
Determine whether the current process has the permissions of a given group ID.
|
|
|
|
Files:
|
|
lib/group-member.c
|
|
m4/group-member.m4
|
|
|
|
Depends-on:
|
|
unistd
|
|
extensions
|
|
getgroups [test $HAVE_GROUP_MEMBER = 0]
|
|
xalloc-oversized [test $HAVE_GROUP_MEMBER = 0]
|
|
|
|
configure.ac:
|
|
gl_FUNC_GROUP_MEMBER
|
|
if test $HAVE_GROUP_MEMBER = 0; then
|
|
AC_LIBOBJ([group-member])
|
|
gl_PREREQ_GROUP_MEMBER
|
|
fi
|
|
gl_UNISTD_MODULE_INDICATOR([group-member])
|
|
|
|
Makefile.am:
|
|
|
|
Include:
|
|
<unistd.h>
|
|
|
|
License:
|
|
GPL
|
|
|
|
Maintainer:
|
|
Jim Meyering
|