[PATCH 1/5] [ARM] implement arch_randomize_brk()

Jamie Lokier jamie at shareable.org
Fri Jun 18 08:15:52 EDT 2010


Sergei Shtylyov wrote:
> >+extern unsigned long arch_randomize_brk(struct mm_struct *mm);
> >+#define arch_randomize_brk arch_randomize_brk
> 
>    Isn't this an "infinitely recursive" macro?

Not in ISO C.  It'll expand to itself and stop.  This is a handy trick
for confirming #ifdef tests elsewhere.  Glibc does it a lot for enums
defined in header files, for those which applications commonly test
with #ifdef because they were traditionally defined using macros.

-- Jamie



More information about the linux-arm-kernel mailing list