linux-libc-headers 2.6.8.0
For IA-64 and MIPS, and for any other arch with variable page sizes, you need something like this:
////////////////////////////////////////
extern int getpagesize(void);
#define PAGE_SIZE ((unsigned long)(getpagesize()))
// This is a gcc statement-expression.
// You might want the __extension__ keyword.
#define PAGE_SHIFT ({ \
int _PAGE_SIZE = PAGE_SIZE; \
(_PAGE_SIZE > 16*1024) \
? (_PAGE_SIZE == 32*1024) \
? 15ul \
: 16ul \
: (_PAGE_SIZE == 8*1024) \
? 13ul \
: (_PAGE_SIZE == 4*1024) \
? 12ul \
: 14ul \ ; \
})
//////////////////////////////////////////