X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=klibc%2Fklibc%2Fmmap.c;h=11c540aed60c97c73120d641ff98e83b4b395ca1;hb=e5f053b5312a0f8d62a2bcff8ddb095052d228bc;hp=196f1c088f38d450dc9bc0af86c286ace71a8c53;hpb=a0622777688ad84ef3d789e0171cfb0ca3dc21d2;p=elogind.git diff --git a/klibc/klibc/mmap.c b/klibc/klibc/mmap.c index 196f1c088..11c540aed 100644 --- a/klibc/klibc/mmap.c +++ b/klibc/klibc/mmap.c @@ -8,20 +8,20 @@ #include #include #include /* For PAGE_SHIFT */ +#include -#if defined(__sparc__) +/* + * MMAP2_SHIFT is definitely *NOT* equal to getpageshift() for + * many 32-bit architectures. Supposedly this is fixed to 12 + * for all 32-bit architectures. CHECK THIS!!! + */ # define MMAP2_SHIFT 12 /* Fixed by syscall definition */ -#elif defined(__mips__) || defined(__powerpc__) -# define MMAP2_SHIFT __getpageshift() /* Variable */ -#else -# define MMAP2_SHIFT PAGE_SHIFT -#endif /* * Set in SYSCALLS whether or not we should use an unadorned mmap() system * call (typical on 64-bit architectures). */ -#if (BITSIZE == 32 && defined(__NR_mmap2)) || (BITSIZE == 64 && !defined(__NR_mmap)) +#if (_BITSIZE == 32 && defined(__NR_mmap2)) || (_BITSIZE == 64 && !defined(__NR_mmap)) /* This architecture uses mmap2(). The Linux mmap2() system call takes a page offset as the offset argument. We need to make sure we have