diff options
author | Eric Andersen <andersen@codepoet.org> | 2002-11-15 14:12:12 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2002-11-15 14:12:12 +0000 |
commit | 82a975f2f2671f0fb54ccc56d3cc621dad8b645b (patch) | |
tree | 39ad2c87c1a4da6419ddc49638f3c599882e79b4 /libc/sysdeps/linux/powerpc/_mmap.c | |
parent | 80b0b55af2faa2e314d61d2f17fc24c9cfa94a34 (diff) |
This draws from an old patch by David Blythe for the now-dead
unified syscall interface. I reworked his old patch considerably
and cleaned up his version of bits/syscalls.h with some sneaky macro
magic. And I implemented a powerpc correct version of pread/pwrite
-Erik
Diffstat (limited to 'libc/sysdeps/linux/powerpc/_mmap.c')
-rw-r--r-- | libc/sysdeps/linux/powerpc/_mmap.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libc/sysdeps/linux/powerpc/_mmap.c b/libc/sysdeps/linux/powerpc/_mmap.c index a229181e0..350f4c49e 100644 --- a/libc/sysdeps/linux/powerpc/_mmap.c +++ b/libc/sysdeps/linux/powerpc/_mmap.c @@ -1,9 +1,14 @@ #include <unistd.h> #include <sys/mman.h> -#include <sys/syscall.h> #include <errno.h> +#include <sys/syscall.h> +#define __syscall_clobbers \ + "r4", "r5", "r6", "r7", "r8", "r9", "r10", "r11", "r12" +#define __syscall_return(type) \ + return (__sc_err & 0x10000000 ? errno = __sc_ret, __sc_ret = -1 : 0), \ + (type) __sc_ret void * mmap(void *start, size_t length, int prot, int flags, int fd, off_t offset) |