mirror of
git://sourceware.org/git/glibc.git
synced 2024-11-21 01:12:26 +08:00
* 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>.
This commit is contained in:
parent
4b4fcf99d1
commit
0a1e7f70eb
@ -1,3 +1,8 @@
|
||||
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>.
|
||||
|
||||
2000-10-24 Ulrich Drepper <drepper@redhat.com>
|
||||
|
||||
* elf/dl-close.c (_dl_close): Handle relocation dependencies of
|
||||
|
@ -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));
|
||||
|
Loading…
Reference in New Issue
Block a user