summaryrefslogtreecommitdiffstats
path: root/libc/sysdeps/linux/powerpc/vfork.c
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2002-11-15 14:12:12 +0000
committerEric Andersen <andersen@codepoet.org>2002-11-15 14:12:12 +0000
commit82a975f2f2671f0fb54ccc56d3cc621dad8b645b (patch)
tree39ad2c87c1a4da6419ddc49638f3c599882e79b4 /libc/sysdeps/linux/powerpc/vfork.c
parent80b0b55af2faa2e314d61d2f17fc24c9cfa94a34 (diff)
downloaduClibc-alpine-82a975f2f2671f0fb54ccc56d3cc621dad8b645b.tar.bz2
uClibc-alpine-82a975f2f2671f0fb54ccc56d3cc621dad8b645b.tar.xz
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/vfork.c')
-rw-r--r--libc/sysdeps/linux/powerpc/vfork.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/libc/sysdeps/linux/powerpc/vfork.c b/libc/sysdeps/linux/powerpc/vfork.c
index fcf020804..750255be9 100644
--- a/libc/sysdeps/linux/powerpc/vfork.c
+++ b/libc/sysdeps/linux/powerpc/vfork.c
@@ -1,9 +1,14 @@
#include <unistd.h>
-#include <sys/syscall.h>
#include <sys/types.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
int vfork(void)
{