diff options
author | Mike Frysinger <vapier@gentoo.org> | 2009-01-09 21:02:12 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2009-01-09 21:02:12 +0000 |
commit | 67ca2fcf45ba7b240911e9bf345fcefd34a3e6e1 (patch) | |
tree | 75e3adc3e92c65cedabcfaf21578a89595ca8541 /dev-libs/libaio | |
parent | Marked ppc/ppc64 stable for bug #254335. (diff) | |
download | gentoo-2-67ca2fcf45ba7b240911e9bf345fcefd34a3e6e1.tar.gz gentoo-2-67ca2fcf45ba7b240911e9bf345fcefd34a3e6e1.tar.bz2 gentoo-2-67ca2fcf45ba7b240911e9bf345fcefd34a3e6e1.zip |
tweak syscall() handling based on upstream comments
(Portage version: 2.2_rc20/cvs/Linux 2.6.28 x86_64)
Diffstat (limited to 'dev-libs/libaio')
-rw-r--r-- | dev-libs/libaio/files/libaio-0.3.107-generic-arch.patch | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/dev-libs/libaio/files/libaio-0.3.107-generic-arch.patch b/dev-libs/libaio/files/libaio-0.3.107-generic-arch.patch index 3ad818962ce3..bb49eb2634dd 100644 --- a/dev-libs/libaio/files/libaio-0.3.107-generic-arch.patch +++ b/dev-libs/libaio/files/libaio-0.3.107-generic-arch.patch @@ -59,33 +59,36 @@ using standard syscall() function #endif --- /dev/null +++ src/syscall-generic.h -@@ -0,0 +1,26 @@ +@@ -0,0 +1,29 @@ +#include <errno.h> +#include <unistd.h> +#include <sys/syscall.h> + -+#define _ret_io_syscall(sname, args...) \ -+ return syscall(__NR_##sname, ## args) ? -errno : 0 ++#define _body_io_syscall(sname, args...) \ ++{ \ ++ int ret = syscall(__NR_##sname, ## args); \ ++ return ret < 0 ? -errno : ret; \ ++} + +#define io_syscall1(type,fname,sname,type1,arg1) \ +type fname(type1 arg1) \ -+{ _ret_io_syscall(sname, (long)arg1); } ++_body_io_syscall(sname, (long)arg1) + +#define io_syscall2(type,fname,sname,type1,arg1,type2,arg2) \ +type fname(type1 arg1,type2 arg2) \ -+{ _ret_io_syscall(sname, (long)arg1, (long)arg2); } ++_body_io_syscall(sname, (long)arg1, (long)arg2) + +#define io_syscall3(type,fname,sname,type1,arg1,type2,arg2,type3,arg3) \ +type fname(type1 arg1,type2 arg2,type3 arg3) \ -+{ _ret_io_syscall(sname, (long)arg1, (long)arg2, (long)arg3); } ++_body_io_syscall(sname, (long)arg1, (long)arg2, (long)arg3) + +#define io_syscall4(type,fname,sname,type1,arg1,type2,arg2,type3,arg3,type4,arg4) \ +type fname (type1 arg1, type2 arg2, type3 arg3, type4 arg4) \ -+{ _ret_io_syscall(sname, (long)arg1, (long)arg2, (long)arg3, (long)arg4); } ++_body_io_syscall(sname, (long)arg1, (long)arg2, (long)arg3, (long)arg4) + +#define io_syscall5(type,fname,sname,type1,arg1,type2,arg2,type3,arg3,type4,arg4, type5,arg5) \ +type fname (type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5) \ -+{ _ret_io_syscall(sname, (long)arg1, (long)arg2, (long)arg3, (long)arg4, (long)arg5); } ++_body_io_syscall(sname, (long)arg1, (long)arg2, (long)arg3, (long)arg4, (long)arg5) --- src/syscall.h +++ src/syscall.h @@ -25,5 +25,6 @@ |