[gccsdk] Patch for getgrouplist() and ELF questions

Theo Markettos theo at markettos.org.uk
Sat Dec 13 14:04:57 PST 2008


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.

> > +  while ((grp = getgrent ()) !=NULL)
> > +    {
> > +      char **mem;
> 
> const char ** would be slightly better.

That doesn't work, because we have to modify the value of mem.

> What about doing a #include "../../grp/getgrouplist.c" instead (assuming you
> have your getgrouplist implementation in a separate file) and have the
> differences between this version and the UnixLib implementation covered with
> a test on __riscos ? So that we're sure that any changes in
> libunixlib/grp/getgrouplist.c are under test when compiling and running
> libunixlib/test/grp/getgrouplist.c ?

That's a good idea - I've done this.

Theo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: getgrouplist3.p
Type: text/x-pascal
Size: 9022 bytes
Desc: not available
URL: <http://www.riscos.info/pipermail/gcc/attachments/20081213/f5e4b390/attachment.p>


More information about the gcc mailing list