From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1944) id 34DE73852C4B; Wed, 23 Nov 2022 14:42:55 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 34DE73852C4B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1669214575; bh=ltbQRMWuKtveOzEFOz6+0SgRWK809VPtzBPr+fSCaek=; h=From:To:Subject:Date:From; b=GgNkK67d9fslLH3VSjJ9UxK99cGOVX3JqDxb1W1CkH72wzEvqMxi6JUdbxAb2hh/F 8hTVNzN8c9o0Inmq4Pt1yyZ3cQEdFjtlcKhIkLh9M+RC+s8TCKGfnSpUKQHxdO6Ek7 0li39D0z43j+HbOaKvyjMBJMLHrPtIfCzmQX0jBs= 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: 2d432f9815d6666cd6a22c263fc3de999c1e00c2 X-Git-Newrev: e1a82e398439df8fbdb33faf540f91fd68de3c20 Message-Id: <20221123144255.34DE73852C4B@sourceware.org> Date: Wed, 23 Nov 2022 14:42:55 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=e1a82e398439df8fbdb33faf540f91fd68de3c20 commit e1a82e398439df8fbdb33faf540f91fd68de3c20 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; \