From 7058b3fc160662902c26401c118912a7a32554e2 Mon Sep 17 00:00:00 2001 From: Joakim Tjernlund Date: Tue, 20 Sep 2005 21:16:25 +0000 Subject: Fix bug 370. --- libc/sysdeps/linux/powerpc/bits/syscalls.h | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) (limited to 'libc/sysdeps/linux/powerpc') diff --git a/libc/sysdeps/linux/powerpc/bits/syscalls.h b/libc/sysdeps/linux/powerpc/bits/syscalls.h index 75001f218..e28c380ee 100644 --- a/libc/sysdeps/linux/powerpc/bits/syscalls.h +++ b/libc/sysdeps/linux/powerpc/bits/syscalls.h @@ -5,6 +5,8 @@ # 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. */ @@ -19,7 +21,7 @@ an error return status). */ # undef INLINE_SYSCALL -#if 0 +#if 1 # define INLINE_SYSCALL(name, nr, args...) \ ({ \ INTERNAL_SYSCALL_DECL (sc_err); \ @@ -31,8 +33,7 @@ } \ sc_ret; \ }) -#endif - +#else # define INLINE_SYSCALL(name, nr, args...) \ ({ \ INTERNAL_SYSCALL_DECL (sc_err); \ @@ -43,6 +44,8 @@ } \ sc_ret; \ }) +#endif + /* 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. @@ -122,43 +125,43 @@ #undef _syscall0 #define _syscall0(type,name) \ type name(void){ \ - return INLINE_SYSCALL(name, 0); \ + return (type) INLINE_SYSCALL(name, 0); \ } #undef _syscall1 #define _syscall1(type,name,type1,arg1) \ type name(type1 arg1){ \ - return INLINE_SYSCALL(name, 1, arg1); \ + return (type) INLINE_SYSCALL(name, 1, arg1); \ } #undef _syscall2 #define _syscall2(type,name,type1,arg1,type2,arg2) \ type name(type1 arg1, type2 arg2){ \ - return INLINE_SYSCALL(name, 2, arg1, arg2); \ + return (type) INLINE_SYSCALL(name, 2, arg1, arg2); \ } #undef _syscall3 #define _syscall3(type,name,type1,arg1,type2,arg2,type3,arg3) \ type name(type1 arg1, type2 arg2, type3 arg3){ \ - return INLINE_SYSCALL(name, 3, arg1, arg2, arg3); \ + return (type) INLINE_SYSCALL(name, 3, arg1, arg2, arg3); \ } #undef _syscall4 #define _syscall4(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4) \ type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4){ \ - return INLINE_SYSCALL(name, 4, arg1, arg2, arg3, arg4); \ + return (type) INLINE_SYSCALL(name, 4, arg1, arg2, arg3, arg4); \ } #undef _syscall5 #define _syscall5(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4,type5,arg5) \ type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5){ \ - return INLINE_SYSCALL(name, 5, arg1, arg2, arg3, arg4, arg5); \ + return (type) INLINE_SYSCALL(name, 5, arg1, arg2, arg3, arg4, arg5); \ } #undef _syscall6 #define _syscall6(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4,type5,arg5,type6,arg6) \ type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5, type6 arg6){ \ - return INLINE_SYSCALL(name, 6, arg1, arg2, arg3, arg4, arg5, arg6); \ + return (type) INLINE_SYSCALL(name, 6, arg1, arg2, arg3, arg4, arg5, arg6); \ } #endif /* _BITS_SYSCALLS_H */ -- cgit v1.2.3