From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1944) id 3E24F385151E; Thu, 27 Oct 2022 13:53:02 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3E24F385151E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1666878782; bh=1+Qhq2OZNdTZbL1+avrtysuO5dXZjjgV+oIh9Xst40A=; h=From:To:Subject:Date:From; b=APQj5M/klpy3KuAAl8+UmU0cw7VEzsRNXmzfcnPM/Mu1jTMjoqfO0S08vDt9WXz1l aFpNnVqCpIYl+E1ftccXWMSwkErcTm4Ms8nzaFJfN0Zz1A0Uy4ZFPQeqRimR0YnBiv D6aOf29HFGxcEJqSi+2dy0ucINUmi9veXCH9SQGw= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Szabolcs Nagy To: glibc-cvs@sourceware.org Subject: [glibc/arm/morello/main] TODO(api): cheri: fix syscall return type X-Act-Checkin: glibc X-Git-Author: Szabolcs Nagy X-Git-Refname: refs/heads/arm/morello/main X-Git-Oldrev: 12eeeae444d2d35ec77d325809db773742f896b6 X-Git-Newrev: 9733f57ff3f664c735dbe15f4839c534aeecf41c Message-Id: <20221027135302.3E24F385151E@sourceware.org> Date: Thu, 27 Oct 2022 13:53:02 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=9733f57ff3f664c735dbe15f4839c534aeecf41c commit 9733f57ff3f664c735dbe15f4839c534aeecf41c Author: Szabolcs Nagy Date: Thu Jul 14 14:22:26 2022 +0100 TODO(api): cheri: fix syscall return type TODO: this affects API (syscall return type is long) so breaks portability and requires doc updates. Diff: --- sysdeps/unix/sysv/linux/sysdep.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/sysdep.h b/sysdeps/unix/sysv/linux/sysdep.h index 3dc2bad50e..83f2323eda 100644 --- a/sysdeps/unix/sysv/linux/sysdep.h +++ b/sysdeps/unix/sysv/linux/sysdep.h @@ -35,13 +35,19 @@ }) #endif +#ifdef __CHERI_PURE_CAPABILITY__ +# define syscall_ret_t intptr_t +#else +# define syscall_ret_t long +#endif + /* Define a macro which expands into the inline wrapper code for a system call. It sets the errno and returns -1 on a failure, or the syscall return value otherwise. */ #undef INLINE_SYSCALL #define INLINE_SYSCALL(name, nr, args...) \ ({ \ - long int sc_ret = INTERNAL_SYSCALL (name, nr, args); \ + syscall_ret_t sc_ret = INTERNAL_SYSCALL (name, nr, args); \ __glibc_unlikely (INTERNAL_SYSCALL_ERROR_P (sc_ret)) \ ? SYSCALL_ERROR_LABEL (INTERNAL_SYSCALL_ERRNO (sc_ret)) \ : sc_ret; \