From 190da1cd0c221438c563b5b605ff811e9075e210 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Wed, 23 Aug 2006 23:20:30 +0000 Subject: sync with psm: update errno handling to be the same on all arches --- libc/sysdeps/linux/powerpc/bits/syscalls.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'libc/sysdeps/linux/powerpc/bits') diff --git a/libc/sysdeps/linux/powerpc/bits/syscalls.h b/libc/sysdeps/linux/powerpc/bits/syscalls.h index e28c380ee..ae269b876 100644 --- a/libc/sysdeps/linux/powerpc/bits/syscalls.h +++ b/libc/sysdeps/linux/powerpc/bits/syscalls.h @@ -5,13 +5,13 @@ # error "Never use directly; include instead." #endif -#include - /* This includes the `__NR_' syscall numbers taken from the Linux kernel * header files. It also defines the traditional `SYS_' macros for older * programs. */ #include +#ifndef __ASSEMBLER__ + /* Define a macro which expands inline into the wrapper code for a system call. This use is for internal calls that do not need to handle errors normally. It will never touch errno. @@ -20,6 +20,10 @@ "sc; bnslr+" sequence) and CR (where only CR0.SO is clobbered to signal an error return status). */ +#include + +#define SYS_ify(syscall_name) (__NR_##syscall_name) + # undef INLINE_SYSCALL #if 1 # define INLINE_SYSCALL(name, nr, args...) \ @@ -164,5 +168,5 @@ type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5, type6 arg6 return (type) INLINE_SYSCALL(name, 6, arg1, arg2, arg3, arg4, arg5, arg6); \ } +#endif /* __ASSEMBLER__ */ #endif /* _BITS_SYSCALLS_H */ - -- cgit v1.2.3