From 82a975f2f2671f0fb54ccc56d3cc621dad8b645b Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Fri, 15 Nov 2002 14:12:12 +0000 Subject: 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 --- libc/sysdeps/linux/powerpc/_mmap.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'libc/sysdeps/linux/powerpc/_mmap.c') 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 #include -#include #include +#include +#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) -- cgit v1.2.3