# HG changeset patch # User Paul Eggert # Date 1381730922 25200 # Node ID addcd3785ab36111d0fa2aa6cb1be43ab2a9510b # Parent 871c8ea4f18cfcab2e8123e3c0c43760e943ecfc mgetgroups: remove dependency on realloc-gnu The dependency violates the comment in realloc-gnu, which says that tests can't depend on realloc-gnu; some tests depend on mgetgroups, so mgetgroups can't depend on realloc-gnu. Problem reported by Daniel Richard G. in . * lib/mgetgroups.c (mgetgroups): Don't call realloc (NULL, 0). * modules/mgetgroups (Depends-on): Depend on realloc-posix, not realloc-gnu. diff -r 871c8ea4f18c -r addcd3785ab3 ChangeLog --- a/ChangeLog Sat Oct 12 11:50:15 2013 -0700 +++ b/ChangeLog Sun Oct 13 23:08:42 2013 -0700 @@ -1,3 +1,15 @@ +2013-10-13 Paul Eggert + + mgetgroups: remove dependency on realloc-gnu + The dependency violates the comment in realloc-gnu, which + says that tests can't depend on realloc-gnu; some tests depend + on mgetgroups, so mgetgroups can't depend on realloc-gnu. + Problem reported by Daniel Richard G. in + . + * lib/mgetgroups.c (mgetgroups): Don't call realloc (NULL, 0). + * modules/mgetgroups (Depends-on): Depend on realloc-posix, + not realloc-gnu. + 2013-10-12 Paul Eggert regex-tests: port to HP-UX 11.11 diff -r 871c8ea4f18c -r addcd3785ab3 lib/mgetgroups.c --- a/lib/mgetgroups.c Sat Oct 12 11:50:15 2013 -0700 +++ b/lib/mgetgroups.c Sun Oct 13 23:08:42 2013 -0700 @@ -133,7 +133,7 @@ return -1; } - if (!username && gid != (gid_t) -1) + if (max_n_groups == 0 || (!username && gid != (gid_t) -1)) max_n_groups++; g = realloc_groupbuf (NULL, max_n_groups); if (g == NULL) diff -r 871c8ea4f18c -r addcd3785ab3 modules/mgetgroups --- a/modules/mgetgroups Sat Oct 12 11:50:15 2013 -0700 +++ b/modules/mgetgroups Sun Oct 13 23:08:42 2013 -0700 @@ -9,7 +9,7 @@ Depends-on: getgroups getugroups -realloc-gnu +realloc-posix xalloc-oversized configure.ac: