diff options
-rw-r--r-- | libc/sysdeps/linux/mips/bits/syscalls.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/libc/sysdeps/linux/mips/bits/syscalls.h b/libc/sysdeps/linux/mips/bits/syscalls.h index 2be184527..788e84769 100644 --- a/libc/sysdeps/linux/mips/bits/syscalls.h +++ b/libc/sysdeps/linux/mips/bits/syscalls.h @@ -10,7 +10,7 @@ #include <bits/syscall.h> #ifndef __set_errno -# define __set_errno(val) { (*__errno_location ()) = (val); return -1; } +# define __set_errno(val) (*__errno_location ()) = (val) #endif #ifndef SYS_ify # define SYS_ify(syscall_name) (__NR_##syscall_name) @@ -34,6 +34,7 @@ __asm__ volatile ("li\t$2,%2\n\t" \ if (__err == 0) \ return (type) __res; \ __set_errno(__res); \ +return -1; \ } /* @@ -55,6 +56,7 @@ __asm__ volatile ("move\t$4,%3\n\t" \ if (__err == 0) \ return (type) __res; \ __set_errno(__res); \ +return -1; \ } #define _syscall2(type,name,atype,a,btype,b) \ @@ -75,6 +77,7 @@ __asm__ volatile ("move\t$4,%3\n\t" \ if (__err == 0) \ return (type) __res; \ __set_errno(__res); \ +return -1; \ } #define _syscall3(type,name,atype,a,btype,b,ctype,c) \ @@ -97,6 +100,7 @@ __asm__ volatile ("move\t$4,%3\n\t" \ if (__err == 0) \ return (type) __res; \ __set_errno(__res); \ +return -1; \ } #define _syscall4(type,name,atype,a,btype,b,ctype,c,dtype,d) \ @@ -121,6 +125,7 @@ __asm__ volatile ("move\t$4,%3\n\t" \ if (__err == 0) \ return (type) __res; \ __set_errno(__res); \ +return -1; \ } #define _syscall5(type,name,atype,a,btype,b,ctype,c,dtype,d,etype,e) \ @@ -150,6 +155,7 @@ __asm__ volatile ("move\t$4,%3\n\t" \ if (__err == 0) \ return (type) __res; \ __set_errno(__res); \ +return -1; \ } #define _syscall6(type,name,atype,a,btype,b,ctype,c,dtype,d,etype,e,ftype,f) \ @@ -182,6 +188,7 @@ __asm__ volatile ("move\t$4,%3\n\t" \ if (__err == 0) \ return (type) __res; \ __set_errno(__res); \ +return -1; \ } #define _syscall7(type,name,atype,a,btype,b,ctype,c,dtype,d,etype,e,ftype,f,gtype,g) \ @@ -217,6 +224,7 @@ __asm__ volatile ("move\t$4,%3\n\t" \ if (__err == 0) \ return (type) __res; \ __set_errno(__res); \ +return -1; \ } #endif /* __ASSEMBLER__ */ |