From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1944) id 03858384B0D4; Wed, 26 Oct 2022 15:14:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 03858384B0D4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1666797266; bh=iUxfr7NPOzx+85eyziTEqZEIjsr3PG3U1OwiGZeNSCM=; h=From:To:Subject:Date:From; b=xKMqs4+eHVpH7FvagAlof8mqQVyeOtMnjQNXQWUAQe730OFZnq0X+9oadHgCTF2de ea1xKgiNxefDO8TrrrULAUQpeWaqv4Xx/u/dYJU3Gl4YlWoXLaX+hyQMsvdvpkp+8U WoMtl7GDa5iD3cT44h5RXOstMLh1bdZG36MQ4NQU= 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: e641d2d5444b37230a1da04a91aace711b2b0c30 X-Git-Newrev: e3f06c370431067478d478ff596a2c4d53a1d00c Message-Id: <20221026151426.03858384B0D4@sourceware.org> Date: Wed, 26 Oct 2022 15:14:26 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=e3f06c370431067478d478ff596a2c4d53a1d00c commit e3f06c370431067478d478ff596a2c4d53a1d00c 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; \