This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 3/7] Add getauxval.


On 05/21/12 11:07, Roland McGrath wrote:
>> +unsigned long
>> +__getauxval (unsigned long type)
> 
> We never use implicit 'int' in glibc code.
> Always write 'unsigned long int', never 'unsigned long'.
> 
> In the sys/auxv.h you committed, there is a comment for the function, which
> is good.  But...
> 
>> /* Return the value associated with an Elf*_auxv_t type from the auxv list
>>    passed to the program on startup.  If __type was not present in the auxv
> 
> In a comment referring to a parameter declared as "__foo", we write "FOO".
> So "TYPE" here.
> 
>>    list, returns zero.  */
>> extern unsigned long getauxval (unsigned long __type)
> 
> And no implicit 'int' in the types here.
> 
> Also, since sys/auxv.h uses __BEGIN_DECLS it ought to #include <sys/cdefs.h>
> itself rather than expecting those macros to be available by some other
> indirectio inclusion.

Ok.  Committed the following to fix all of the above.


r~

Attachment: z
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]