[PATCH 3/7] Add getauxval.

Roland McGrath roland@hack.frob.com
Mon May 21 18:15:00 GMT 2012


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


Thanks,
Roland



More information about the Libc-alpha mailing list