[gccsdk] Patch for getgrouplist() and ELF questions

Alex Macfarlane Smith archifishal at gmx.co.uk
Sun Dec 14 14:52:36 PST 2008


Theo Markettos 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.
> 
>>> +  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.
> 

I thought const char ** meant a pointer to a pointer to a const char, so 
that doesn't negate the possibility of changing mem.

I think char * const * mem; would be that...

Or I may be talking gibberish :)

Alex.




More information about the gcc mailing list