diff options
author | Geoff Keating <geoffk@cygnus.com> | 2000-10-24 21:09:50 +0000 |
---|---|---|
committer | Geoff Keating <geoffk@cygnus.com> | 2000-10-24 21:09:50 +0000 |
commit | 0a1e7f70eb344d75df116940a5d887c6154a4b41 (patch) | |
tree | acdf480444f1d8113fc9ef2f350b74137e3a7cf0 /sysdeps/unix/sysv/linux/powerpc/mmap64.c | |
parent | 4b4fcf99d16d881e33308c3e333ab32dbb9b999b (diff) | |
download | glibc-0a1e7f70eb344d75df116940a5d887c6154a4b41.tar.gz |
* sysdeps/unix/sysv/linux/powerpc/mmap64.c: Define PAGE_SHIFT
explicitly rather than getting it from <asm/page.h>.
2000-10-21 Geoffrey Keating <geoffk@cygnus.com>
* sysdeps/unix/sysv/linux/powerpc/mmap64.c: Define PAGE_SHIFT
explicitly rather than getting it from <asm/page.h>.
Diffstat (limited to 'sysdeps/unix/sysv/linux/powerpc/mmap64.c')
-rw-r--r-- | sysdeps/unix/sysv/linux/powerpc/mmap64.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sysdeps/unix/sysv/linux/powerpc/mmap64.c b/sysdeps/unix/sysv/linux/powerpc/mmap64.c index f799b05106..076ceaa1c6 100644 --- a/sysdeps/unix/sysv/linux/powerpc/mmap64.c +++ b/sysdeps/unix/sysv/linux/powerpc/mmap64.c @@ -25,9 +25,12 @@ #include <sys/syscall.h> #include <bp-checks.h> -#include <asm/page.h> #include "kernel-features.h" +/* This is always the constant 12 for this routine, even if the actual + page size is larger. */ +#define PAGE_SHIFT 12 + #ifdef __NR_mmap2 extern void *__unbounded __syscall_mmap2(void *__unbounded, size_t, int, int, int, off_t); @@ -44,12 +47,11 @@ __mmap64 (__ptr_t addr, size_t len, int prot, int flags, int fd, off64_t offset) # ifndef __ASSUME_MMAP2_SYSCALL ! have_no_mmap2 && # endif - ! (offset & ~PAGE_MASK)) + ! (offset & -(1 << (PAGE_SHIFT+1)))) { # ifndef __ASSUME_MMAP2_SYSCALL int saved_errno = errno; # endif - /* This will be always 12, no matter what page size is. */ __ptr_t result; __ptrvalue (result) = INLINE_SYSCALL (mmap2, 6, __ptrvalue (addr), len, prot, flags, fd, (off_t) (offset >> PAGE_SHIFT)); |