From 78aa2fc7871a4f79613d38122dc6d5ac7454f57c Mon Sep 17 00:00:00 2001 From: Jakob Kaivo Date: Sat, 23 Feb 2019 15:21:37 -0500 Subject: merge SYSCALL macros into one --- src/nonstd/SYSCALL.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/nonstd/SYSCALL.c') diff --git a/src/nonstd/SYSCALL.c b/src/nonstd/SYSCALL.c index 8f91d870..b5cab01c 100644 --- a/src/nonstd/SYSCALL.c +++ b/src/nonstd/SYSCALL.c @@ -1,11 +1,11 @@ #include -#define SYSCALL(_name, _type, _args) \ +#define SYSCALL(_name, _type, _err, _a1, _a2, _a3, _a4, _a5, _a6) \ static int _scno = -2; \ if (_scno == -2) { _scno = ((syscall_lookup_t)__libc(SYSCALL_LOOKUP))(_name); } \ - _type _ret = __syscall(_scno, _args); \ + long _ret = __syscall(_scno, _a1, _a2, _a3, _a4, _a5, _a6); \ if (_ret < 0) { \ errno = -_ret; \ - return -1; \ + return _err; \ } \ - return _ret + return (_type)_ret -- cgit v1.2.1