[gccsdk] Patch for getgrouplist() and ELF questions
John.Tytgat at aaug.net
Sun Dec 14 06:28:10 PST 2008
In message <20081213220457.GK19708 at chiark.greenend.org.uk>
Theo Markettos <theo at markettos.org.uk> wrote:
> On Sat, Dec 06, 2008 at 04:20:45PM +0200, John Tytgat wrote:
> > In message <20081204215433.GA19708 at chiark.greenend.org.uk>
> > Theo Markettos <theo at markettos.org.uk> wrote:
> > > Anyway, attached is a patch to provide getgrouplist() for review.
> > I would break out this getgrouplist() implementation into a new file in
> > grp directory. When you would do that, add something like this:
> I've made most of the changes you suggested - new patch attached.
Thank you. One last thing which I just noticed:
> --- gcc4/recipe/files/libunixlib/include/grp.h (revision 3564)
> +++ gcc4/recipe/files/libunixlib/include/grp.h (working copy)
> @@ -109,6 +109,12 @@
> This function is a cancellation point. */
> extern int initgroups (const char *__name, gid_t __basegid)
> __nonnull ((1));
> +/* Return a list of groups the user is in */
> +extern int getgrouplist (const char *__user, gid_t __group,
> + gid_t *__groups, int *__ngroups);
> + __nonnull ((1,3,4));
I see a ';' right after the getgrouplist() declaration and this before
the __nonnull macro. I'm not sure of the consequences but better leave the
first ';' out, see initgroups(). I wouldn't be surprised that with this
extra ';', your __nonnull attribute gets ignored.
Feel free to commit Theo, and thanks again.
John Tytgat, in his comfy chair at home BASS
John.Tytgat at aaug.net ARM powered, RISC OS driven
More information about the gcc