This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 3/7] Add getauxval.
> +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