From 0a1e7f70eb344d75df116940a5d887c6154a4b41 Mon Sep 17 00:00:00 2001 From: Geoff Keating Date: Tue, 24 Oct 2000 21:09:50 +0000 Subject: * sysdeps/unix/sysv/linux/powerpc/mmap64.c: Define PAGE_SHIFT explicitly rather than getting it from . 2000-10-21 Geoffrey Keating * sysdeps/unix/sysv/linux/powerpc/mmap64.c: Define PAGE_SHIFT explicitly rather than getting it from . --- ChangeLog | 5 +++++ sysdeps/unix/sysv/linux/powerpc/mmap64.c | 8 +++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index f5ef5bbf2d..e96abacf80 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2000-10-21 Geoffrey Keating + + * sysdeps/unix/sysv/linux/powerpc/mmap64.c: Define PAGE_SHIFT + explicitly rather than getting it from . + 2000-10-24 Ulrich Drepper * elf/dl-close.c (_dl_close): Handle relocation dependencies of 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 #include -#include #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)); -- cgit 1.4.1